Jump to content
Ultimaker Community of 3D Printing Experts
Sign in to follow this  
stevegt

Z axis homing inconsistent on UM2: workaround and patch

Recommended Posts

Hi All,

 

In case you haven't noticed yet, Z isn't homing right on at least some UM2s running Marlin 14.03; for me it's about .7 mm too high on the first homing after the bed has been resting on the floor of the machine. It took me a couple of weeks to figure out that it wasn't my filament, glue, feeler gauges, thermal expansion, leveling technique, loose limit switch, or little green men. Patch below.

 

Symptoms:

 

If you start a print from a resting bed position, the G28 that executes at print start causes Z to home .7 mm too high, and you'll start grinding up your filament as you mash it into the glass. Sound familiar?

 

If you level the build plate starting from a resting bed position, you'll be .7 mm too low after the re-homing that happens at the end of the levelling routine. You'll air-print, right after you painstakingly levelled the bed. (Again, sound familiar?) :wink:

 

If you're homed correctly and are printing fine, bed level happy, then you abort it, the bed falls to the floor. If you then restart the same print, you'll be starting from that resting position, Z will home .7 mm too high, and you'll get filament grindage again, right after an otherwise perfect print with what you know was a levelled bed.

 

All of this filament grinding will then cause you to start hunting for causes for underextrusion, playing with temperature, messing with the feeder and bowden, trying to figure out why you're apparently clogging so frequently...

 

How to duplicate:

 

  • Start with the bed resting on the floor of the machine, such as when the power has been off. (If your bed doesn't drift down to the floor when the power's off, then consider yourself lucky; you won't see this bug. If you want to feel the pain though, just power off, gently push the bed all the way down, then continue with the next step...)
  • Send a G28 from pronterface (or just hit "Maintenance|Advanced|Lower buildplate" on the LCD). You'll see that the bed doesn't do the little bounce; it just moves up until the limit switch opens. It thinks it's homed, but it's about .7mm too high. Measure this with a caliper -- in my case it's about 29.5 mm from glass top to floor at this point. M114 in pronterface says we're at Z 215.95.
  • Now send another G28, and you'll see that it does the bounce this time. Caliper now shows .7 mm lower (about 28.8 mm in my case), but M114 still reports Z 215.95. Ouch!

If you don't have a caliper, then you might still be able to see this effect using a good metric ruler. In either case, you can see the lack of bounce easily.

Work around:

 

Manually do anything to cause the Z axis to re-home at least twice before you level the bed or print anything -- hitting "Advanced|Lower buildplate" a couple of times appears to work, for instance. Make sure you see the bounce before considering the Z axis to be homed.

 

Patch:

 

It looks to me like Z_HOME_RETRACT_MM is set too low in Configuration_adv.h -- it's set to 3 mm, but the X and Y axes are set to 5 mm. When I change Z_HOME_RETRACT_MM to 5, homing works consistently for me so far; I see the little bounce each time. Patched version at https://github.com/stevegt/Ultimaker2Marlin/blob/consistent_z_homing/Marlin/Configuration_adv.h.

 

If there are no objections or corrections, I'll send Daid a pull request for this after running it myself for a few days.

 

Steve

 

Share this post


Link to post
Share on other sites

Just a note that, going back through the history of Z_RETRACT_MM, it was originally 1 mm, way back when this config option was first created for some other printer (RepRap?), in https://github.com/stevegt/Ultimaker2Marlin/commit/a0dc66f7bfab6815c4a64a1fbf02dd82d1d75d11.

Daid increased this once, from 1 mm to 3 mm, to stop the bed from aggressively slamming against the limit switch: https://github.com/stevegt/Ultimaker2Marlin/commit/a8e7333937cfc52e518d8e6d913d0d8111277777

So it looks like we're on the right track, and increasing this again to 5 mm is likely just continuing the process of tuning it for the UM2.

I don't know that 5 mm is the "right" number either, so am open to suggestions. It does work for me. If anyone else wants to try this, the Makefile included in my patch branch should let you cleanly build against the Arduino 1.0.1 libraries. For more information about that, see http://umforum.ultimaker.com/index.php?/topic/5933-building-marlin-makefile-updates-for-um2-and-arduino-101/?p=54260.

 

Share this post


Link to post
Share on other sites

Hello stevegt

Thank you for your Interesting Report. :)

Maybe a handful, or more users in the German forums area have been discussed for a few weeks about the fact that each time you print the print bed needs to be realigned.

http://umforum.ultimaker.com/index.php?/topic/5493-drucker-vor-jedem-neuen-druck-am-n%C3%A4chsten-tag-neu-kalibrieren/page-3&do=findComment&comment=54280

Even after an apparently correct bed orientation were unsuccessful starting operations, as the nozzle opening was then too Close or too far to the glass surface. There was bent end stop tongues. And hard impact of the print bed to the case-base has also been reported.

Also it seemed that bed-alignments after switching off the machine were not saved, and there were many more guesses. The troubleshooting was difficult, but before Cura 14:03 there was no similar abnormalities.

By the way: One of my glass plates (presumably tempered glass) did not survive this scratching of the nozzle, a piece in the form of a small plate is broken out of it. Fine, money again for the dumpster ...

I hope there will soon be a bug-fixed version Cura.

Markus

 

Share this post


Link to post
Share on other sites

Interesting.

I have been trying to figure out what is going on with my UM2 and the bed leveling for some time, but I did not investigate it this far yet.

I never had the nozzle hitting the glass yet, just the opposite problem (printing in air).

On my machine the leveling stays fine after calibration as long as the power is on.

After power cycling the gap increases 0.1-0.2 mm or so, enough for the walls of the first layer not to stick to the platform, ruining the print.

I was almost about to ask for a tune-option for fine tuning the Z-calibration on the fly when the print is started.

It would be more convenient than having to abort the print and go through the leveling cycle every time the printer has been powered off.

If there is a clear cause for this problem and it can be fixed it would of course be even better though :-)

 

Share this post


Link to post
Share on other sites

We have found that these deviations can go in both directions after alignment.

Also, it sometimes seemed to function normally for a short time.

Sometimes the orientation held for a few print jobs until you turn off the machine ...

Perhaps the damaged glass plate was also of poor quality. But whenever it was recognized poor alignment, then you could also hear a grinding noise of the nozzle tip on the glass. Unfortunately, a print cancel does not happen immediately, there probably always buffer contents are passed through to the end until the machine finally stops, unfortunately this is crap and can cause a lot of Trouble.

Markus

 

Share this post


Link to post
Share on other sites

I can easily print 10 or 20 things without releveling. Even when the first layer is .1mm.

 

Hi gr5,

When you turn the power off on your UM2 (or the steppers de-energize at other times), does the buildplate fall to the floor of the machine? I suspect that machines with a slightly tighter leadscrew nut or other source of friction might not be dropping as easily, so might not be seeing this bug as much. Pushing the plate down by hand with the steppers de-energized should allow you to reproduce this. (You'll mash the glass into the nozzle on the next print, I think.)

Even mine doesn't drop all the time; that made it harder to find the problem.

I wrote a snippet of g-code to lay down a set of large concentric rings in a single .1 mm layer -- that narrowed it down real quick: http://umforum.ultimaker.com/index.php?/topic/5951-um2-calibration-utility-leveling-ringsgcode/?p=54426.

Steve

 

Share this post


Link to post
Share on other sites

Interesting topic, i've had quite similar issues with my UM2 but not as important as yours.

Some prints have a perfect first layer, and sometimes it looks like the bed is too close (not smashing the head) no filament is layed down because of this (or a very thin layer that is almost transparent). Then sometimes it looks to far, and the first layers aren't squished together as they should.

I've been doing the following to get kind of rid of this... when i see that the first layer isn't good i abort the print then restart it. Usually this takes care of it.

My bed doesn't drop to the bottom each time. It can be down if i push it by hand. I think it happens more when the bed is on the bottom of the printer

 

Share this post


Link to post
Share on other sites

My bed never droops when power is off. I have to push pretty hard to make it go down. Hard enough that I always push down at the rear. UM put an amazing amount of grease on my lead screw. The assembly instructions for the UM1 said to use about the amount of grease in 1 pea. My UM2 has enough grease for 20 peas I think.

However when the UM2 finishes, the bed always goes to "down" position (actually probably right where the Z switch clicks).

I measured the distance from all the way down (mechanically stopped) to raising where the Z switch opens. It's about 3.0mm +/- .2mm on my machine. So even if I *did* push the bed all the way down the firmware will bring the bed up 3mm before homing so no problem. I also measured this distance by rotating the Z screw and it was 16 servo steps one time and 17 steps the other 2 times. Not sure how many steps/mm the Z is. Firmware says 200 microsteps/mm but that would mean 1/32 stepping rate - if true then it's only 2.7mm and I will never see the problems you saw.

I have had parts that need quite a bit of force to get them off the bed. I was removing them with the bed in the down position. I'm surprised I never moved the bed any further down. It never occurred to me to raise the bed 2mm before starting another print.

 

Share this post


Link to post
Share on other sites

It seems to me there are 3 solutions to this problem right now:

1) Modify firmware to go up 5mm instead of 3mm. This is advanced and if you haven't compiled the firmware will probalby take you a few hours.

2) Always raise the bed a few mm before you start a print. And before you level it.

3) Bend the Z limit switch a tiny bit so that the bed hits it 1mm lower than normal. I don't have this problem as the distance between all the way down and limit switch opens is 2.7mm. I measured this by twisting the Z screw with power off and I get 17 "stepper clicks" which is 2.72mm = 17/(6.25 full steps/mm).

So bend the z limit switch down until you have 17 or less clicks between all the way down and limit switch open. This gives you the full printing volume also.

 

Share this post


Link to post
Share on other sites

If you're having issues with the bed leveling after a power cycle, you might try doing a factory reset on the printer; I suspect if might be related to incorrectly saving the settings in PRAM - perhaps because the PRAM layout has changed between versions of Marlin?

 

Hi Simon! This is a brand-new printer, and had only ever had 14.03 installed on it. I'm the guy who showed you the blue robot Sunday morning at Bay Area Maker Faire; I'd just printed it on this printer and you gave me a buncha suggestions for improving the quality. I was happy enough with the whole experience that I didn't want to dampen the mood by mentioning one key fact: That robot was my second attempt. The first, printed at the end of the first-run routine, had air-printed.

Here's what happened: I unboxed the printer that morning, powered it up and carefully went through the first-run bed leveling, taking my time and reading both the manual and LCD instructions in parallel. Looking back, I'm pretty sure that the bed must have settled to the floor of the machine before that first powerup (or maybe I pushed it down after removing the shipping cardboard that was underneath). That would be consistent with the symptoms I'm seeing now, and would have caused the first print to be executed with the bed .7 mm too low. As soon as I saw the first layer going down badly, I aborted, re-ran the bed levelling routine, and then printed the robot you saw. Again, consistent.

I'm a little concerned that first-run users are probably seeing this behavior pretty frequently.

Remember how you commented that I'd put too much glue on the glass? That extra dollop of glue was what I'd applied before the second print, thinking that I needed more to make it stick, when in fact it turns out the bed was probably just too low.

It sounds like you've never seen this -- does your bed not settle to the floor when the steppers are de-energized?

Steve

 

Share this post


Link to post
Share on other sites

Hi Steve! No, it's only started being reported recently... maybe something has changed about the configuration. It sounds like the issue is that the travel on the switch can be more than 3mm past the click point - so if the bed goes all the way down, moving it up 3mm doesn't fully unclick it?

I'm thinking that a couple of ways to fix this - apart from the firmware fix. One might be to bend the switch as George suggests, but I think it needs to go the other way - to trigger it later? Alternatively, giving the trigger screw in the base of the bed a few turns to shorten the amount protruding downwards might overcome the issue too?

 

Share this post


Link to post
Share on other sites

Steve if you turn off power on your UM2 and rotate the z screw with your fingers so that it goes all the way down, then go up and count the stepper motor steps - how many steps does it take before you hear the Z limit switch click? For me it's 16 to 17 (2.56 to 2.72mm).

 

I'm not at the machine today so can't count that right now, but I did do a quick measurement this morning with a caliper: I'm seeing 1.3 mm difference from resting on the floor vs properly homed, *after* I've applied my firmware patch. That's substantially different from the 2.5-3 mm you're seeing. This evening I'll go back to 14.03 and measure that same distance, and see which way it changes, if any. I don't have the geometry in my head as well as you might, so I don't know if the retract distance subtracts or adds to this number. Could it be that my 14.03 "resting vs homed" difference is about 5 - 3 + 1.3 = 3.3 mm? If that's true, then changing this to 5 mm like I've done in my patch lowers the bed by 2 mm. That might risk some machines banging into the floor when trying to home, and the correct fix might need to be elsewhere. We'll see tonight. In the meantime, I'll ask Daid to hold off on merging the change.

If, on the other hand, my difference of resting versus homed is only 1.3 mm regardless of firmware, then that would lead me to believe that you might be on the right track with some sort of limit switch height adjustment. 1.3 mm doesn't sound to me like it gives enough collision margin.

Steve

 

Share this post


Link to post
Share on other sites

The purpose of the homing-retract distance is to move the head up above the switch, and re-approach more slowly. Setting any amount there shouldn't cause the bed to ever bang into the floor when homing. The bed will move down until the endstop is triggered, then move up by the retract distance, and then go down until it triggers again.

It seems that the distance is also used as the initial 'try to move up until its not triggered anymore' distance if the endstop is already triggered when homing. Not sure that it really should be - it's two totally different concepts. The way it should really work is that there's a maximum limit set, and if that's not enough to untrigger the endstop, then the printer should abort. E.g., set a limit of 20mm. If the endstop is already triggered when homing, then it should move up until it's not triggered any more. Then move up more by the homing-retract amount, and then go back down to the trigger point, and stop. If in trying to do that it goes up by more than the limit of 20mm without ever untriggering the switch, then the printer should just abort with an error message, as that means that there's an endstop problem.

 

Share this post


Link to post
Share on other sites

A summary:

1.- I am FED UP of levelling the bed before each print. Really fed up...in Spanish... hasta los huevos.

2.- I have tried raising and lowering the bed before the calibration and before printing... and it does not work.

3.- It is a too expensive printer to be levelled each time.

4.- I really want a solution.

5.- Thanks people who is trying to solve this issue

 

Share this post


Link to post
Share on other sites

Hi Steve! No, it's only started being reported recently... maybe something has changed about the configuration. It sounds like the issue is that the travel on the switch can be more than 3mm past the click point - so if the bed goes all the way down, moving it up 3mm doesn't fully unclick it?

I'm thinking that a couple of ways to fix this - apart from the firmware fix. One might be to bend the switch as George suggests, but I think it needs to go the other way - to trigger it later? Alternatively, giving the trigger screw in the base of the bed a few turns to shorten the amount protruding downwards might overcome the issue too?

 

Ah, okay, now I see what George is going on about -- as I said to him, I'm still getting the geometry into my head. I'll measure the switch travel on mine tonight. I've been assuming that the UM2 works like my old CNC mill, refusing to execute a G move if any limit switch is closed. But if Marlin actually will allow a G move when the Z switch is closed, then, yes, it's possible that my Z switch is never even opening when homing is started with the bed against the floor. I'll check that as well.

Even if the screw adjustment works for me, though, we're still going to have that question of how best to fix the printers that are already in the field. Because the UM2 is supposed to be more of a turnkey machine, normally I'd say "fix it in firmware", while anyone who doesn't want to wait can just twist the screw. But given that the screw adjustment would decrease the clearance under the bed (unless I'm thinking backwards), suggesting that people shorten the screw now might actually prevent them from safely applying fixed firmware later -- I'll try to think all of this through some more after I check things out tonight.

Steve

 

Share this post


Link to post
Share on other sites

I was almost about to ask for a tune-option for fine tuning the Z-calibration on the fly when the print is started.

 

By the way, I was thinking of adding this same feature, which is what led me to write the leveling rings gcode as an interim tool. You can run that and adjust things before you start your real print. Google's crawled it now, so you should be able to just search for 'leveling-rings.gcode'.

Steve

 

Share this post


Link to post
Share on other sites

The purpose of the homing-retract distance is to move the head up above the switch, and re-approach more slowly. Setting any amount there shouldn't cause the bed to ever bang into the floor when homing. The bed will move down until the endstop is triggered, then move up by the retract distance, and then go down until it triggers again.

It seems that the distance is also used as the initial 'try to move up until its not triggered anymore' distance if the endstop is already triggered when homing. Not sure that it really should be - it's two totally different concepts. The way it should really work is that there's a maximum limit set, and if that's not enough to untrigger the endstop, then the printer should abort. E.g., set a limit of 20mm. If the endstop is already triggered when homing, then it should move up until it's not triggered any more. Then move up more by the homing-retract amount, and then go back down to the trigger point, and stop. If in trying to do that it goes up by more than the limit of 20mm without ever untriggering the switch, then the printer should just abort with an error message, as that means that there's an endstop problem.

 

Okay, Simon, your description of how the algorithm should work is the way I would do it. I was thinking it already does that. If it doesn't, then that would be a good reason why I haven't yet been able to understand the code. It's not making sense to me as-is, which is why I wasn't too sure why messing with the retract distance was working in the first place. If it turns out that it's really this broken, I'll take on the job of trying to refactor it, assuming Daid doesn't beat me to it.

Steve

 

Share this post


Link to post
Share on other sites

I wonder what has changed in 14:03, since my machine is a little older than six months ago and there were no obvious leveling problems. I'm not sure but after turning ON the machine (with older firmware), there was always a brief reference movement of the z-axis, right?

At first I thought to wear.

(19 full steps from the bottom to switch click, and only 12 to 13, from click to the bottom, is this normal?)

When the machine is turned off, the bed position is 12 to 13 full steps in front of the ground and does not slide by itself down to the ground.

What if or would be if the home position (0.0) is within 32 micro-steps and the bed sinks down to the nearest whole step, once the machine is off?

Markus

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!