Update: Gio and I have discussed using the converted ATX power supply I built. Note to self: Document the voltages on the power supply if I build another one. We are unable to test and verify what we think the voltages are because we don’t have sufficient materials (We need one additional banana clip).
—————————————————————————————————-
The ArduMoto becomes hot whenever this program is run on it. This could be because the shield+motor are being powered by a 12v, 1 amp power supply. The motor takes a 3v, 2 amp power supply. Reference: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Robotics/57BYGH420.PDF
The following is code that makes the stepper motor rotate through one full revolution:
// BLUE - Pin 3
// RED - Pin 4
// BLACK - Pin 2 ** RESISTER 10W8R2J
// GREEN - Pin 1
#include
const int stepsPerRevolution = 200; // Stepper has 200 revolutions
Stepper myStepper(stepsPerRevolution, 3,13,11,12); // See reference for ARDUMOTO- use pins 3,11,12,13
void setup() {
myStepper.setSpeed(20); // set the speed at 70 rpm:
// 70 is a nice fluid move 60-70 rpm, and a nice slow rotation could be 20
}
void loop() {
myStepper.step(stepsPerRevolution); // Do a full revolution, 400 steps
delay(1000);
}
————————————————————————————————————-
Anything larger than 40 rpms starts to cause jerky movement. This may be due to the power supply. Gio and I decided to not use the power supply and to just use the power coming off of the USB and going into the arduino. It allowed for smoother movement of the motor.
When we increase the RPMs of the motor, it does become a little jerkier, and starts to rotate less and less fully (as in less than 360 degrees). This is easily fixed manually, but is still inconvenient.