Welcome! Log In Create A New Profile

Advanced

Z-Axis Resolution

Posted by KilroySmith 
Z-Axis Resolution
May 01, 2021 02:45AM
I'm out of work and bored. Very dangerous combination.

I was toying with the idea of designing and building a new printer to replace my Anet A6 (which prints fine, on occasion, after an hour or so of tweaking), so I started looking at basic specs and was quite startled. Even my cheap-*** printer uses 1/16 microstepping on the Z-axis, providing 400 steps/mm of Z movement, or 0.0025 mm/step. Which seems a bit, err, overspecified for a 3D printer with a frame made from plastic sheets, but this also appears to be common for printers that hook up a stepper to the ubiquitous 2mm pitch/4-start leadscrew and is in fact the default Z resolution in Marlin firmware source code.

My question is, Why?
Why use 1/16 microstepping to create humorously tiny steps and glacially slow Z movement? Z speed isn't particularly important while printing, but it's excruciating when you need to spend half an hour tuning and tweaking to get a good print, and you have to wait for dozens of "home" operations. Why wouldn't 1/4 microstepping (0.01 mm/step) be the standard here, giving the same resolution as the X and Y axes have (100 steps/mm using 1/16 microstepping)? I guess full stepping (0.04 mm/step) is out because it'd be kind of difficult to do 0.1 mm (or 0.15 mm) layers, but 1/4 microstepping would seem to be perfect - why 1/16?

One part of my brain says "Just do it the way everyone else does; there's probably a good reason for it and it'll make your life easier". But there's another part of my brain that says "There's something here about printer design that you need to understand". Maybe it's just a stupid legacy practice - X and Y use 1/16 microstepping to provide 0.01 mm/step resolution, so Z gets 1/16 because the hardware design is identical. Or, maybe, there's some deeper reason that taking 40 steps to raise the platform by 0.1mm is a good idea.

So, inane consistency or fundamental constraint?
Re: Z-Axis Resolution
May 01, 2021 04:30AM
AFAIK there is nothing special about the usual setup.

The 8mm screw pitch seems reasonable since CNC machines probably use it for X/Y due to having lower friction/higher efficiency, so that's what was available cheapest and in large quantity when 3D printers were first being mass produced. But the microsteps make no sense. Some amount of microstepping is needed due to the numerical problem you mentioned with common layer heights, and it makes sense for X/Y to use 1/16 microsteps due to their much larger full step size, so maybe early on someone could have just copy/pasted that to Z rather than thinking about what value would actually be best. And maybe the reason nobody ever changed it is because homing is usually set to slow speed anyway to minimize damage in a crash if the limit switch doesn't trip for whatever reason, and homing is usually the only time you ever move the Z axis any significant distance.

Personally I prefer T8x2 leadscrews because you get 0.01mm full steps, which gives full torque to the target position, fast movement, no risk of backdriving, and no numerical problems.
Re: Z-Axis Resolution
May 01, 2021 09:29AM
16:1 ustepping is used mostly to make the motor run "quietly".

When you are printing, for maximum print quality, you usually want the layer thickness to be a multiple of the Z axis whole-step resolution. 0.0025 mm per ustep is the same as 0.04 mm per whole step. That means you want to print in layers that are multiples of 0.04 mm, so 0.1mm is OK, 0.2 mm is OK, but best not to print in 0.25 mm layers (use 0.24 mm layers instead).

When you build the new printer, it is possible to build it so that it won't need any tuning and tweaking before you print, so Z axis slowness won't feel like the problem it does now. It all starts with a rigid, square frame... OTOH, you can use autoleveling and mesh compensation to make up for a lot of less than ideal construction- all the tweaking will still need to be done before printing, but it will be automated so it won't bother you so much. I prefer the former construction method, but it may require more tools and a slightly bigger budget than the latter method. Either way can be made to work. The advantage of the former construction is it just works and is not dependent on sensors, extra motors/drivers, and complex configuration. That makes it easier to configure and a little more reliable.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Z-Axis Resolution
May 03, 2021 01:33PM
Quote
dekutree64
Personally I prefer T8x2 leadscrews because you get 0.01mm full steps, which gives full torque to the target position, fast movement, no risk of backdriving, and no numerical problems.
That makes a lot of sense, and is the kind of design principles I was expecting to find when I dug in. I like your analysis of "how we got where we are", mostly because it sounds pretty much the same as my line of thinking.


Quote
the_digital_dentist
When you build the new printer, it is possible to build it so that it won't need any tuning and tweaking before you print
That is precisely my goal. I've spent a buncha hours now reading over various builds/designs/blogs, and I'm in awe of the work and thought you've put into your machines and, just as importantly, the blog posts you've written and published that document your design concepts and builds. Thank you for doing that - there'll be a lot of your DNA in whatever I end up putting together.

Quote
the_digital_dentist
for maximum print quality, you usually want the layer thickness to be a multiple of the Z axis whole-step resolution.
I fully agree, but isn't that only true if you've homed the bed at a whole-step point on the Z-axis stepper? I mean, if I home my Anet A6 and the Z stepper ends up at e.g. microstep 11, every layer I advance still ends up with the stepper at a microstep 11. dekutree64's example points out that if your design only allows full step positions, and those full steps are sufficiently small, the microstep 11 problem simply vanishes and you get full advantage of always being at a full step along with plenty of resolution for whatever needs doing.
Re: Z-Axis Resolution
May 03, 2021 02:59PM
Correction: with 0.04 mm full step resolution, 0.1 mm layers doesn't work. Try 0.12 mm...

If you drive the motor in full steps, yes, you'll always be on a full step multiple point, and you'll still need to specify layer thickness in full step multiples. There's a minor problem if the full steps don't exactly match up with the positions of the bed and nozzle for the first layer. For example, if your "zero" the bed/nozzle using full 0.04 mm steps but the bed is at 0.025 mm, your first layer thickness will be off a bit. Maybe not enough to matter. If your leveling system allows you can adjust the bed/nozzle to really be at Z=0 when the Z axis is homed.

Have you heard a motor slewing the Z axis in full steps? Let's just say it has low spousal acceptance factor.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Z-Axis Resolution
May 03, 2021 04:20PM
Quote
the_digital_dentist
Have you heard a motor slewing the Z axis in full steps? Let's just say it has low spousal acceptance factor.

No, I haven't - I'll take your word for it eye popping smiley

It seemed to me that there was a low enough duty cycle on the Z axis that movement wouldn't be a big deal - I mean, it moves once per layer, right, two or three times a minute? Then I thought about Z-hop, and realized it might be a bit more often than that.
Re: Z-Axis Resolution
May 03, 2021 05:22PM
Oh yeah, the noise problem does make sense. Not a problem nowadays with Trinamic drivers, though.

BTW, a handy trick is to put a gcode file on your SD card containing only the command G00 Z0. After a tall print, run it to zip back to zero at full speed smiling smiley
Re: Z-Axis Resolution
May 03, 2021 10:55PM
Motors are only quiet if you use microstepping, Trinamic drivers will be as noisy as any other if you're driving the motor in full steps.

Homing the Z axis at the end of a print is potentially disastrous. You might want to home X and Y to get the print away from the extruder, but leave Z where it is until after the print is removed from the bed. There's no need for a separate gcode file to home Z. Just select homing from the LCD panel, web control, or Pronterface console, etc., depending on how you control your printer.

Edited 1 time(s). Last edit at 05/03/2021 10:56PM by the_digital_dentist.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Z-Axis Resolution
May 04, 2021 12:42AM
Quote
the_digital_dentist
Motors are only quiet if you use microstepping, Trinamic drivers will be as noisy as any other if you're driving the motor in full steps.

Homing the Z axis at the end of a print is potentially disastrous. You might want to home X and Y to get the print away from the extruder, but leave Z where it is until after the print is removed from the bed. There's no need for a separate gcode file to home Z. Just select homing from the LCD panel, web control, or Pronterface console, etc., depending on how you control your printer.
Right, of course the print should be removed from the bed before running the Z0 program. That's why it needs to be a separate file on the SD card rather than simply included at the end of every gcode file. The point is that once the printer has been homed and printed something, it knows where home is so you can safely move back at high speed. The usual homing operation is waiting for the endstop signal, so it has to move slow and careful since it can't decelerate in advance.

Trinamic drivers always interpolate to 1/256 microsteps, which is why they're able to be silent even on full step input. It may be possible to do something similar with A4988 drivers, using 1/16 microsteps but always stopping at a full step position. I'm not sure if there's any way for the firmware to know whether it's on a full step position or not.
Re: Z-Axis Resolution
May 04, 2021 02:05AM
Quote
dekutree64
I'm not sure if there's any way for the firmware to know whether it's on a full step position or not.

I'm guessing that, on power up, an A4988 sets it's microstep counter to 0, so as long as the firmware knows what the microstepping is on the driver, and knows that it hasn't reset since the last power on (since that'll reset it's counter but not the A4988's counter), and does a good job of keeping track of steps, it could know whether it's on a full step position or not.
Re: Z-Axis Resolution
May 04, 2021 08:13AM
We were talking about driving the motor in full steps, not the driver. Microsteps are what makes the motor run quietly. Driving the motor with full steps will be noisy. Interpolated or not, 256:1 is microstepping. It doesn't matter if the input to the driver is full steps, the motor is driven in microsteps which is specifically what we were talking about not using.

Hey, why not add X0 and Y0 to that special gcode file? Imagine the hours you'll save by homing all axes at maximum speed, ignoring those useless, pointless, pesky endstops! I'm being silly, of course. G00 ignores the endstops. Ignoring any endstop when homing, including/especially Z, is a hazardous thing to do. Yes, you can home using G00- it will work, until it doesn't. Endstops are only active during a homing move that is started using a G28 command. Use G28/endstops. Endstops are there for good reasons, even if you don't understand them or think they are bullshit.

I can't actually think of a good reason to ignore endstops when homing, but there must be one. Oh, I know! If I were trying to set a world record for baby groot or tugboat production (now that would be something to be proud of!) I might take a chance on homing at maximum speed without using the endstops...


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Z-Axis Resolution
May 04, 2021 03:35PM
X and Y are quicker to move by hand.

If you're worried about crashing, then make it G00 Z5 or something so it will stop with some distance to spare. If you just printed a 400mm tall model, and Z homing feedrate is set to the default 4mm/s, and rapid feedrate is 16mm/s, then you'll save over a minute of boredom.
Re: Z-Axis Resolution
May 04, 2021 05:41PM



Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Z-Axis Resolution
May 04, 2021 07:00PM
What sort of scenario are you envisioning where there would be a problem? If the printer hasn't already been homed, then the G0 will do nothing, and if it has been homed then it's going to a known-safe position just like every other movement during printing. Unless maybe if there have been missed steps on the way up due to some mechanical problem, but in that case your print would be messed up so you'd know there's something wrong. And you're exposed to the same danger any time you use one-at-a-time printing for multiple models in a single batch, since it does a rapid to Z0 before every model.
Sorry, only registered users may post in this forum.

Click here to login