The vref calculation that I have found online is as follows:
I_TripMax * 8 * .1Rs
I_TripMax is the current going through one winding of the motor. The current/phase on the motor’s datasheet is the current for both windings (or .4A).
I have read that the current rating shown on the datasheet of the motor is 70.71% of I_TripMax. If this is true, do I take the current rating of .4A and divide it by .7071?
if I_TripMax is .4A / .7071 = .57A then the Vref calculation should be .57A X 8 X .1 = .456… This doesn’t seem right. What am I missing?
The correct calculation to use to set the reference voltage on our A4988 drivers depends on which current sense resistors your A4988 driver has. You can find that equation, along with pictures that help you identify which resistors you have and how to modify the equation, under the “Current limiting” section of the A4988’s product page.
The 70.71% value you noticed in the datasheet is the percentage of I_tripMax current that is allowed to flow through each coil when the driver is in full step mode. (This value reaches 100% in the microstepping modes, so if you are planning to use microstepping, you should not need take that 70.71% value into account.) We have written an example of how to deal with that value at the end of the “Current limiting” section of the A4988’s product page. If there is anything in there that you do not understand, let me know specifically what you are having trouble with and I can see if I can help.
I think I have that issue figured out know… Thanks for the response. I do have another question regarding the DRV8825. I am using Marlin for a 3D printer and was wondering if I need to double the steps because of the 1/32 stepping? Also, I have heard that the DRV8825 skips steps at certain speeds. If I run the DRV8825 in 1/16, will it eliminate any of this? What would be a benefit of running it at 1/16?
I recommend talking to the manufacturer of your 3D printer since how well that driver performs in each microstepping mode depends on the particular system it is used in.
It’s a homemade 3D printer.
Switching microstepping modes from 1/16 to 1/32 will mean the motor turns half the angle when given the same number of step pulses. You might check a 3D printing forum for information about what sort of firmware changes would be necessary when changing the microstepping settings. In general, microstepping with smaller steps sizes should make the motor turn a little smoother, and it might allow the motor to run a little faster without missing steps, though whether or not it does depends on the specific stepper motor being used and how much load is on its output, among other more complex factors. Ultimately, which microstepping mode is most appropriate for your custom 3D printer is something you will have to figure out through testing.
I have figured it out… Thanks for replying so quickly. I am using 2 different kinds of drivers on my machine (a a4988 for the extruder and 4 DRV8825s for the XY and dual Z). It was just general math problems, but I have the vrefs figured out now, and the printer is functioning well.