1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Z Axis - precision and accuracy

Discussion in 'Mods and Upgrades' started by Ziggy, Mar 25, 2014.

  1. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    With M8 1.25mm pitch threaded rods the steps/mm is 2560.

    3200 is the number of steps for a full turn of the rod (regardless of its size or pitch). (ie 200 * 16 = 3200 since the motor is 1.8 degree and we are using 16 microstepping).

    To raise the layer height .125mm the rod needs to rotate 1/10 of a turn (36 degrees) which = 320 microsteps. There should be no rounding error issues with that number of microsteps.

    However the data is showing the rod actually turns between 35 to 37 degrees (or 311 to 329 microsteps approximately) in a repeating and regular pattern.

    There is no reason why the motor can not move reliably and precisely 320 microsteps every time (assuming it has enough power of course). IMO there is no reason to disable microstepping (although perversely that might actually mask the underlying problem).

    The pattern of microstep variation is so precise and repeating that IMO everything points to a firmware (or maybe A4988 driver) issue causing this behaviour.

    I have some gear to count the number of microstep pulses being sent to the A4988. This should help isolate the issue further.
     
  2. savior2064

    savior2064 Member

    Joined:
    Mar 7, 2014
    Messages:
    47
    Likes Received:
    17
    Any news with the robo team helping out for a solution.
     
  3. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Yes. I am in contact with Jerry and getting support.

    Re the Z Ribbing

    I connected my pulse counter to the Z Step input on the A4988 driver to monitor the number of steps Marlin was asking the stepper motor to move. I was hoping I would see the number of steps vary to explain the variation in the way the rod turns, but there was none. "Hoping" because the easiest issue to fix would have been a firmware bug in Marlin.

    The video shows the cumulative step count for an M8 1.25mm pitch rod. I used a test gcode file which raised the Z height 20 times in 0.125mm steps. The counter shows the correct number of microsteps 320 is being sent by Marlin each time.

    https://vimeo.com/97378302

    Just to be sure I watched the counter during a real test print (in case there was some other interaction going on) but the microstep count was correct.

    So I am left with some mechanical (stiction, friction, motor, coupler, screw or nut) issue, Marlin speed/acceleration/jerk configuration issue or possibly an A4988 issue causing the variation in screw turn.

    I am still thinking through what to do next.
     
  4. AxisLab

    AxisLab Well-Known Member

    Joined:
    Dec 28, 2013
    Messages:
    322
    Likes Received:
    269
    Okay I cant say if this is coincidence or not But after nearly 6 months of printing without surprise crashes, Ziggy I did the firmware change the other day keeping the motors powered on. My machine just fatally froze mid print 26 minutes left in a 9 hour job.

    Couldn't get any response and the nozzle was locked melting the part. Obviously I cant say that was the cause of any overheating issues but I'm reverting back just in case.


    EDIT: did Jerry ever mention why they chose to give the motors intermittent power to begin with?
     
  5. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    No. But he has pointed out that the Z Stepper will be always powered on during Auto Levelling. So if there really are issues with the Z Steppers always being powered, they will definitely show up on Robos with Auto Bed levelling.

    Your entire machine freezing is very unlikely due to the Z Steppers being on. Maybe I could understand the Z axis freezing but not the entire machine. Did you look at the Repetier log?
     
  6. AxisLab

    AxisLab Well-Known Member

    Joined:
    Dec 28, 2013
    Messages:
    322
    Likes Received:
    269
    No, I didn't even think to. Had to restart my laptop to get everything back.
    No biggie. I have been pushing the machine like crazy. An entire spool nearly gone in 7 days time lol.
    I know freezes can happen. Just coincidence I recently made a significant config change I guess. I'm not focusing on it completely, but something to keep an eye on.


    EDIT: Jerry mentioned they would be on during the autoleveling I get for sure, but what about after that process? during normal run time are they still locked on for good?
     
  7. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    As you know auto leveling relies on the Z axis being "adjusted" during the print to compensate for the varying bed height.

    So if you have a slightly uneven bed, the Z stepper will be working to make the adjustments for the entire print (as well as layer raises) whether you have told it to disable or not.

    However if your bed is level or close to level, then of course the Z motor is just raising the height every few seconds/minutes of print or making the occasional level adjustment . And this is where there can be an issue if the Z motor power option is set to disable. Either the Z stepper will make an inaccurate layer raise and/or there will be an inaccurate bed height adjustment. To avoid this type of inaccuracy, the Z Motor must be always powered on during the print.

    If by "for good" you also mean whenever the printer is powered on - then I have noticed that all of the motors (x, y and z) seem to time out shortly after a print or when the machine is idle for a while. I will check how long it takes.
     
  8. Bob64

    Bob64 Member

    Joined:
    Mar 18, 2013
    Messages:
    104
    Likes Received:
    23
    I wonder if the solution is as easy as simply replacing the z stepper motors. Perhaps there is a "bad batch" of stepper motors from one of the many suppliers - which only affects some of the robo printers - which would explain the random timeline and the random people that it impacts.

    Is your degree measurement rotating thing on the threaded rod which is attached to the motor via the coupler? Have you tried placing it directly on the stepper motor - perhaps the coupler is introducing some errors somehow? Also, do you think that the Z steppers are impacted because that one driver is actually driving TWO steppers?

    Also, there appears to be a lot of debate on if microstepping actually reduces accuracy/torque. Would you think reducing or even turning off microstepping could be the solution of our z-step inaccuracies? At least it'll be worth a test to see if turning off microstepping would reduce the inaccuracy.
    http://gsnook.wordpress.com/2013/03/24/gears-of-wood-tuning-the-cnc-machine/#comments
     
  9. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    I have two good quality and higher torque Nema 17's which I bought for another project. So Yes I have planned to try that next few days.

    The protractor is at the top end of the threaded rod. I did look at whether the couplers could be winding up and releasing slightly. But it takes a lot of torque to do that and it's hard to see how that could be happening in such a regular pattern. However I haven't ruled that out.

    There are also some other possible variations which could be caused by the couplers (eg slippage between the coupler and rod or the coupler and motor shaft). I will be checking this out.

    Wiring the steppers in parallel will reduce the available power to each. There is an option in Marlin/Ramps to use separate A4988 drivers for each stepper, but that means a second extruder is not possible. But I haven't ruled this out as a solution as it might avoid having to replace motors for most users (if this turns out to be the problem).

    Yes. Turning off microstepping might reduce the inaccuracy and worth a test. But as a permanent solution it comes at the cost of lack of flexibility in setting layer heights. Most other 3d printers happily use microstepping. I think there has to be a better solution than turning it off.
     
  10. Bob64

    Bob64 Member

    Joined:
    Mar 18, 2013
    Messages:
    104
    Likes Received:
    23
    well, if you think about it. turning off microstepping - just for the Z axis, would only restrict you to multiples of 0.00625mm layer heights (with m8 1.25mm/rev rods) ... which is probably way too thin for most people...

    For your rods:
    1.25mm per turn/200 steps per turn = .00625mm each step

    for people with the stock rods, it would be:
    1.41111 / 200 = 0.00705555.... so I don't think turning off microstepping would have any impact on layer height at all.
    http://calculator.josefprusa.cz/
    Based on the optimal layer height calculator, which tries to round to the nearest whole step anyway...
     
  11. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316

    The pattern is shows it not holding at the specified microstep. If you started the moves at a full step position then you should not see this. Is there a way to ensure that this test starts at a full step? Is there any initial offset in your Gcode that could start it at a microstep position?

    I don't see any good mechanism for a "bad stepper" to display this effect. As mentioned these steppers have 200 full steps per rotation. Any error in the stepper will be a 3 to 5% of a step nonlinearity within a full rotation. The error will go back to zero after 200 steps. No bad stepper issue can change this. The problem must be that the driver can't hold the stepper at the end specified microstep (if it is not a full step) for some reason.

    OK - perhaps a weak/high resistance winding can cause it not to hold at a position. I'm not sure if this can be blamed on the stepper or the driver.
     
  12. Soupaboy

    Soupaboy Active Member

    Joined:
    Sep 29, 2013
    Messages:
    287
    Likes Received:
    49
    If the issue is the microsteps not being kept the same then can someone try a vase mode print whee the z-axis are always activated and moving up. if the issue is gone then it proves that the steps are not being kept but if we still have ribbing then it may be rounding errors from the threaded rods. right?
     
  13. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316
    It would interesting to try this with no load or with the new motors unloaded to see if the pattern holds.
     
  14. Peter

    Peter Member

    Joined:
    Jun 20, 2013
    Messages:
    81
    Likes Received:
    40
    Any chance the pitch/thread of the rods/nuts themselves could contribute? Perhaps the cheapish rods have a consistent defect.....
     
  15. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316
    From Ziggy's pulse counter test the firmware is giving the correct number of microsteps. So rounding error can't produce that pattern in the 36 degree angle. I'm at a loss to explain the sinusoidal pattern in the microstep position. It is the stepper driver that is attempting to drive the coil with the correct pairs of sinusoidals to produce the angle right?
     
  16. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316
    Again - as Ziggy said the threading on the rod will have no affect on the 36 degree angle test. That sinusoidal variation could be one component added to any threading issues.
     
  17. Bob64

    Bob64 Member

    Joined:
    Mar 18, 2013
    Messages:
    104
    Likes Received:
    23
    What if one of the magnets on the rotor is damaged/defective such that it's inaccurate on just that one step position?
    [​IMG]
    [​IMG]
     
  18. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,276
    Can you setup a dial gauge to verify your z travel corresponded to the angular movement? I'm sure it will
     
  19. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Mike

    I checked this once but will do it again. I've had some experiences in the past where you get fooled into thinking something is obvious/proven only to realise latter it was not.

    Re the earlier comments about microstepping it is fairly easy to test by changing Ramps jumpers and configuration.h. It's on my list of tests but I have some others to try with the couplers first.

    So far I must have spent over 40 hours on this with lots of help from others via one on one conversations. Fixing the Z_DISABLE inaccuracy is a step forward, but there is a solution to the ribbing as well, just a matter of more time.
     
    2 people like this.
  20. AxisLab

    AxisLab Well-Known Member

    Joined:
    Dec 28, 2013
    Messages:
    322
    Likes Received:
    269
    So grateful to have you attacking this Ziggy. It's been driving me nuts.
     

Share This Page