**Edit 11/2/2020 : changed the reasoning for multiplying by the constant 8
**Edit 11/3/2020 : used 1A instead of 2A for safety purposes
Yesterday, I spent some time working on my senior design project (don’t worry, I still made time to have fun during Halloween hehehe).
I decided to focus on the NEMA 17 stepper motor. Like all the projects I’ve worked, the first thing I do is go to Google and see if anyone else has already done what I’m trying to do.
The first thing I had to do was get some kind of motor driver (so as to not destroy the motor with too much current), so we settled on an A4988 stepper motor driver (link).
For some reason, putting in the A4988 stepper motor driver into the breadboard was tough. I figured I could “loosen up” the breadboard spaces by shoving wires in and out of it. It seemed to work because the motor driver finally went in.
However, taking it out was a struggle. I ended up bending some pins in the process 😦
Good thing we bought a pack of 5 for the A4988 stepper motor driver. I got a second one out, but I think I ruined it by overturning the potentiometer (lesson learned = don’t overturn potentiometer).
But things got better with the third one. Here’s how I hooked up my stuff to test the current limit of the board:
Oh fyi, I followed this video to get that setup (link). To simultaneously measure and adjust the voltage, I connected the ground of the multimeter to the ground of the Arduino Uno and I connected the other lead to a small screwdriver which will touch the potentiometer:
…and third times the charm! I was able to adjust the voltage, and in turn, adjust the amount of current I need.
Speaking of current, I needed to calculate how much voltage my NEMA 17 stepper motor needed. So Ohm’s Law is V = I * R. Here’s the fancy version:
V_ref = I_motor * R_board * 8
- V_ref = the reference voltage that I need to drive the stepper motor
- I_motor = 1A (
according to the specs on my motoralthough my motor is rated for 2A max, I’m going to play it safe and use 1A)
- R_board = 50 mΩ (I couldn’t find the exact specs for my board. So I’m using this value from the “Current limit formula” section of this site, and because my board is kind of old )
- 8 =
because there are 8 resistors on the stepper motor boardbecause the formula says so lol, and there’s stuff in the datasheet about taking 1/8 of the reference voltage so I guess multiplying by 8 gets the reference voltage
V_ref = I_motor * R_board * 8 = 1A * 50 mΩ * 8 = 0.4 V
I need to get the stepper motor moving!