Pololu A4983 stepper motor
Adds support for a Pololu A4983 stepper motor controller.
This powerful controller can supply up to 2A per coil and contains a chopper circuit with a potentiometer to limit the current. Make sure you read the manual
as to how to use this as its too complex for me to describe here.
You can either power the board from your micro controller regulated supply or you can power it from the same battery as you are using to power the motor.
To power it from your micro controller then attach one of the Vdd pins to the regulated supply on your micro controller. This should be the same voltage that is used by the micro controller. For example: the Axon has both a 5V regulated supply and a 3.3V regulated supply but, since the ATMega640 is powered from the 5V supply then you must connect Vdd to the 5V supply.
To power it from the motor battery then leave Vdd unconnected and instead you will need to short out one of the solder jumpers on the board. For example: the ATMega640 on an Axon uses 5V so you should short out the 5V jumper on the A4983 board.
- connect - Connect the actuator to the drive system.
- disconnect - Disconnect the actuator from the drive system. Once an actuator is disconnected it will stop responding to other commands until it is connected once again.
- getActualPosition - Returns the current position of the stepper motor between 0 and getStepsPerRevolution()-1. eg if the stepper motor has 200 steps per revolution then it will be a number between 0 and 199.
- getActualSpeed - Returns the actual drive speed of the stepper motor.
- getSpeed - Returns the value you specified in your previous call to setSpeed.
- getStepsPerRevolution - Returns the number of steps required to rotate the motor through 360°.
- getStepsRemaining - Returns the number of remaining steps from the last step() command.
- isConnected - Test if an actuator is connected
- isInverted - Test if an actuator is inverted
- setConnected - Connect or disconnect the actuator from the drive system.
- setSpeed - Set the required speed to a value between DRIVE_SPEED_MIN and DRIVE_SPEED_MAX.
- step - Tell the motor to move by the specified number of steps and then stop.