Monday, April 18, 2011

Success with the Stepper Motors!

Today we figured out exactly how to wire the stepper motors, and got them fully functional. We were also able to write code that does output compare to input a specified number pulses into the STEP input of either the X-axis stepper motor or the Y-axis stepper motor. We could also specify the direction (clockwise or counterclockwise), by setting DIR = 0 or 1 respectively. We also thought it would be good to toggle the sleep mode on when the motors were not stepping, because they got warm when we were using them. Keeping them in sleep mode might prevent the larger motors that we’re getting soon from overheating the driver board. The driver board has an onboard temperature sensor that shuts off the driver if the temperature is too high.


The main issue was figuring out how to set the current limit on the board. We figured out that there is a small circular Vref pin in the center of the driver board. If everything is connected up correctly and the logical voltage and motor voltage is applied, this voltage can be measured. The current limit is then Vref/(8*.05). The value of Vref can be changed by adjusting the potentiometer on the back of the board with a screwdriver. We adjusted the current limit to 0.5A for this motor, but we’ll need 1.2A for the larger motors coming in the mail soon. 
Pull up resistors had to be used for logical inputs: DIR, STEP, MSx, SLEEP, RESET, ENABLE. We still need to decide whether to use single-step mode, half-step mode, or quarter-step mode. The exact circuit diagram we’ll use for each motor is shown below, wired for single step. All grounds are common.



No comments:

Post a Comment