We also worked on moving a single axis, we used a
A4988 stepper motor driver
to control the speed and rotation of the stepper motor (Nema17). Below is the pin configuration:
- VDD & GND : Connected to 5V and GND of Controller
- VMOT & GND :Used to power the motor
- 1A, 1B, 2A, 2B :Connected to the 4 coils of motor
- DIRECTION : Motor direction control pin
- STEP : Steps control pin
- MS1, MS2, MS3 : Microstep selection pins
- SLEEP : Pins for controlling power states
The wiring connection diagram below was helpful in figuring out how to connect the A A\ B B\ wires to the corresponding pins in the motor driver.
Before testing the motor driver, we've set the maximum current used by the motor by adjusting the potentiometer on the stepper driver.
The maximum calculated voltage is 0.8 and has been deduced as follows:
Current Limit = Vref x 2.5
Nema17 = 2A (as extracted from the data sheet - from the following
website )
2 = Vref x 2.5
Vref = 0.8V
The axis is moving! We used the following code written in arduino. Although, I noticed a lot of vibrations occuring which were both noisy and problematic, resulting in some of the screws loosening.
I'm not sure if the issue is with the assembly of the parts or with the motor settings itself, but we'll be looking into trying to reduce the resultant vibrations.