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

Solved Stepper Driver Calibration Information

Discussion in 'Troubleshooting' started by bamhm182, Aug 5, 2015.

Thread Status:
Not open for further replies.
  1. bamhm182

    bamhm182 Active Member

    Joined:
    Mar 17, 2014
    Messages:
    167
    Likes Received:
    87
    There are a few different schools of thought on how you should calibrate the stepper drivers. One says you should turn it all the way down and then slowly increase until it starts working, then give it a bit more. The other says you should use a volt meter and calibrate to specific numbers. I'm somewhere in the between and ABSOLUTELY insist that you should have a volt meter and you really should take down your current numbers before screwing with them. How I've settled on doing it is adjusting it to where it just starts working and then a little more, then if I feel it's still over or under, I'll hook it up to my breadboard and see what the it currently is and adjust it to a specific value I choose while checking the voltage the whole time. This method requires a lot of trial and error, but after I figured it out, I feel I've got a good grasp on this subject.

    I had a TON of trouble with these little buggers for longer than I would like to admit and it took me getting a breadboard and bench PSU to finally figure it out. I've had pretty good success with the previously mentioned process using the following methods.

    With Bench PSU and Breadboard:

    Connect the stepper drivers to the board like this. You can get the information for how they should be connected from Pololu for the A4988 and the DRV8825. Sorry that my wires are not colored by positive and negative, but instead by length. Keep in mind the potentiometer for the A4988 and the DRV8825 are on opposing sides so if you're doing both of them, make sure you either change the direction the pot is facing or you wire them differently as I have shown here. Don't just take my word for this wiring set up, double check the prior links. Pos = VMOT/RESET/SLEEP. Neg = STEP/DIR/GND/GND (NOTE: I didn't have a reason to try and measure one of the A4988s until tonight. I just realized I was missing one wire for them in the original picture, this picture has been updated to show that the VDD pin should be connected to positive.)

    [​IMG]

    I find it easiest if I plug the negative of the volt meter into the board directly and only have to worry about the positive.
    [​IMG]

    I also like to attach the positive from the volt meter directly to the screwdriver, but if you do it this way, make sure it has a plastic handle or your readings will be off since you're touching the circuit. If you find that the potentiometer is bent in such a way that your phillips does not work anymore, a small flathead will still turn it without a single problem. It actually does a better job.
    [​IMG]

    Keep in mind that turning it clockwise turns DOWN the voltage and turning it counter clockwise turns UP the voltage. This threw me off for the longest time because I was giving it too much voltage, then slowly decreasing it until it started working, then wondering why I was having overheating issues. It wasn't until I got a bench PSU and a breadboard so I could tune it while watching my multimeter that I figured this out.

    Once you have it set up, make sure the bench PSU is disconnected from the circuit, turn it on, and adjust to voltage to 3.3v. I don't know exactly what it "should" be at, but 3.3v is enough to get them calibrated without possibly frying them. Turn the bench PSU off, connect it, ensure all connections are firmly in place and turn it back on. Check the voltage by touching the positive lead of the volt meter to the potentiometer. I like to do this with a screwdriver so I can adjust the voltage while watching it. This isn't necessary though. I always touch the positive lead to the pot directly once I get it where I want it just to double check it.

    Without Bench PSU and Breadboard:

    I prefer the prior method SO much more than the one I am about to talk about because it allows me to actually see exactly what I'm doing and get an understanding of how much of a turn equals how much of a change. Even if you don't have a breadboard and PSU, I recommend reading through the prior section as it may help with understanding how this works.

    If you're insist on doing it this way, the process is the same, it's just harder to read and you have a higher chance of slipping and frying something. In my opinion, it is an outright requirement to use a ceramic screwdriver if doing it this way as it will prevent you from shorting something and a metal screw driver will cause noises to come from the motor, making it harder to find that "sweet spot"

    When checking the calibration with a volt meter, you'll want to touch the negative end of the volt meter to one of the GND solder points and touch the positive end to the potentiometer. This is the most likely spot that you will slip and fry something, so please take caution.

    Checking your calibration:

    I am unsure I'm doing this "right," but I will let you know how I've been doing it and what has worked for me. One of the tools I like the most to check my calibration is a few gcode files I created. I will set my stepper drivers to the value I feel is correct and then run these for around 20 or 30 minutes, then check the temperature and performance of each motor and each driver, then adjust them as needed. Basically, the gcode sets up the print, then moves the motor 20mm forward, then 20mm backwards over and over. Copy and paste the last two lines until you feel like your file is long enough to get a good test. Also, make sure that you move the axis to the center before starting to avoid it hitting either side.

    X:
    G90
    G0 X20 F4800
    G0 X-20 F4800
    Y:
    G90
    G0 Y20 F4800
    G0 Y-20 F4800​

    Z:
    G90
    G0 Z20 F4800
    G0 Z-20 F4800​

    E:
    G90
    G0 E20 F2400
    G0 E-20 F2400
    All:
    G90
    G0 X20 Y20 Z20 E20 F4800
    G0 X-20 Y-20 Z-20 E-20 F4800
    Another important aspect of making sure your printer is calibrated correctly is to touch the motors and heatsinks on the stepper drivers to ensure they don't feel too hot. It's not a huge problem if the motors are warm to the touch after running for a long time, but if you don't want to hold your hand on them for an extended period of time due to the temperature, it should be turned down.

    Another test I do is to test the resistance to you moving the motor with your hand while it is moving. With a good amount of strength, you should be able to make the motor skip a step, but if it is skipping a step after barely pushing on it, it's likely that it will skip a step due to the inertia it has while printing and should be turned up. I don't have a good way of describing how much force you should apply to it, but if you feel it's too low, turn it up a tad and keep an eye on the temperature.

    Collected Values:

    Below are the values that I have gotten from various Robo 3Ds. If you want me to add yours to the list, feel free to send me a PM.

    Refurbished Robo 3D R1 (24SEP2015)
    - X: .342 V
    - Y: .340 V
    - Z: .452 V
    - E: .321 V​

    New Robo 3D R1+Plus (18OCT2015)
    X: .598 V
    Y: .379 V
    Z: .472 V
    E: .339 V​

    Other information:

    I highly recommend watching these two videos on stepper driver calibration before attempting to calibrate them. The one from Polulu tells you how to come up with the value for your stepper driver, but I found this value to be much higher for me. It might have been because I did the math wrong, but I'm unsure. Either way, if you're looking for a solid number to start at, .285v should work for single motor setups (XYE) and .582 should work for multiple motor setups (Z). I wanted my Extruder to have a little more oomph, so I started by setting it to .582


     
    #1 bamhm182, Aug 5, 2015
    Last edited: Oct 18, 2015
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    bamhm182 likes this.
  3. bamhm182

    bamhm182 Active Member

    Joined:
    Mar 17, 2014
    Messages:
    167
    Likes Received:
    87
    Thanks, reading through this would have helped me a LOT during my nightmare of stepper driver calibration. Hopefully it will point others in the right direction.
     
  4. janot928

    janot928 Active Member

    Joined:
    Feb 20, 2015
    Messages:
    276
    Likes Received:
    40
    i´m sorry but i don´t see the point in doing that...couldd someone explain please?
     
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    The stepper drivers are the little daughter cards that the RAMPS uses to actually drive the steppers.
     
  6. bamhm182

    bamhm182 Active Member

    Joined:
    Mar 17, 2014
    Messages:
    167
    Likes Received:
    87
    If the voltage is wrong, the motors won't spin as well as they could. If your printer is fine, don't touch it.

    EDIT: At VERY least, get the current values before you touch it.
     
  7. janot928

    janot928 Active Member

    Joined:
    Feb 20, 2015
    Messages:
    276
    Likes Received:
    40
    i´ve got enough problems already :p do not whant add up
     
    bamhm182 likes this.
  8. Ryan TeGantvoort

    Ryan TeGantvoort Active Member

    Joined:
    Mar 11, 2016
    Messages:
    343
    Likes Received:
    172
    Anyone know the A/Phase of all the Stock Stepper Motors in the R1+? I can't seem to find this information anywhere. This information is very much needed to get accurate calibration, otherwise you are basically taking a guess at it.
     
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    This is what Pololu shows for a nema 17:

    Nema17A.gif nema17B.jpg

    Never in the past have I needed to do anything other than the default "tweak it until it moves smooth" S.W.A.G. method :)
     
    Geof likes this.
  10. Geof

    Geof Volunteer Moderator
    Staff Member

    Joined:
    Nov 9, 2015
    Messages:
    6,757
    Likes Received:
    2,339
    That is my process as well :) turn and try lol
     
  11. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    As far as I can tell with the RAMPS/Pololu configuration you can end up in one of the three configurations:

    1) too little stepper driver current
    2) exactly correct stepper driver current
    3) too much stepper driver current

    1 is bad because the stepper drops steps, 3 is bad only in that the stepper will run hotter than it needs. If it really is drawing excessive current the pololu will Self-limit (it will stop -- same as skipping steps really).
     
  12. Ryan TeGantvoort

    Ryan TeGantvoort Active Member

    Joined:
    Mar 11, 2016
    Messages:
    343
    Likes Received:
    172
    Thanks @mark tomlinson

    I just tested all the Drivers and received this:

    X Driver = 442mV
    Y Driver (new replacement) = 392mV
    Z Driver 0 = 448mV
    Z Driver 1 = 475mV
    E Driver = 434mV

    After doing some research, it appears most NEMA 17 Motors have a 1.7 Amps/Phase Rating. The A4988 Driver has a Continuous Current of 1A. According to Pololu, the Voltage Equation for the A4988 Driver is Current Limit = VREF x 2.5. With this information, if I set the VREF to 625mV (.625V) for all Drivers, I should receive 1.5625A (unless they use Full-Step Mode, which would decrease this Current Limit to 70%?) which should not be too much of a load? Or is this too much of a load because the Continuous Current of the A4988 is only 1A?
     
  13. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    the 1.7 Amps/Phase Rating is the point causing you grief I imagine.


    Power and current
    All recent stepper controllers use a current-limiting design. Because of this, the resistance (ohms, Ω) of the coils doesn't matter, as long as it is low enough for the current to rise fast enough for the current-limiting design to come into play. If the resistance is too high (i.e. 24 V steppers) the current simply doesn't raise enough. For this reason, stepper motors rated for 3-5 V and 1-1.5 A are generally recommended, as these motors will perform near their peak torque with a current-limiting stepper controller (such as a Pololu A4988).

    So the disconnect is in what the drivers/steppers need to perform at peak torque.

    Referring the data the OP @bamhm182 provided:

    New Robo 3D R1+Plus (18OCT2015)
    X: .598 V
    Y: .379 V
    Z: .472 V
    E: .339 V

    You can see how it compares to yours:
    X Driver = 442mV
    Y Driver (new replacement) = 392mV
    Z Driver 0 = 448mV
    Z Driver 1 = 475mV
    E Driver = 434mV

    I would say yours it fine. If you are worried bump it a little (even 598 mV is not excessive).

    Worst case if your steppers start running hot you back it down or add heat sink fins to the steppers.


    You might just be over thinking this a tad.

    The A4988 is rated at 1A CC only if it has no heat sink or forced air cooling (from the Pololu page) and the Robo has both heat sinks AND forced air cooling... so 2A is the limit
     
    #13 mark tomlinson, Jun 20, 2016
    Last edited: Jun 20, 2016
  14. Ryan TeGantvoort

    Ryan TeGantvoort Active Member

    Joined:
    Mar 11, 2016
    Messages:
    343
    Likes Received:
    172
    Excellent information @mark tomlinson ! I feel I am overthinking this way too much! So I will just adjust the Z drivers until they match and leave the rest.
     
    mark tomlinson likes this.
Thread Status:
Not open for further replies.

Share This Page