I purchased a Pro Mini 5v to replace my UNO that is being used for other purposes now. I am trying to have the Pro Mini control a stepper motor. Since I'm still new at this I followed a plan over at http://learn.adafruit.com/adafruit-arduino-lesson-16-stepper-motors/parts. I bought the parts listed from them.
The problem I am seeing is the stepper motor's shaft doesn't spin but the whole motor kind of vibrates a little. I tried this on two different motors.
I am keeping my Pro Mini connected to my USB cable for power
Hardware:
Pro Mini 5v
5V Stepper Motor
L293D IC
I wired up the breadboard a couple different times:
I followed the code example:
/*
Adafruit Arduino - Lesson 16. Stepper
*/
#include <Stepper.h>
int in1Pin = 12;
int in2Pin = 11;
int in3Pin = 10;
int in4Pin = 9;
Stepper motor(768, in1Pin, in2Pin, in3Pin, in4Pin);
void setup()
{
pinMode(in1Pin, OUTPUT);
pinMode(in2Pin, OUTPUT);
pinMode(in3Pin, OUTPUT);
pinMode(in4Pin, OUTPUT);
// this line is for Leonardo's, it delays the serial interface
// until the terminal window is opened
while (!Serial);
Serial.begin(9600);
motor.setSpeed(20);
}
void loop()
{
if (Serial.available())
{
int steps = Serial.parseInt();
motor.step(steps);
}
}
I also tried modified the code so it loops spinning back and forth with a one second delay. The vibrations occur every second on queue. Is there some issue with the Pro Mini 5v that would cause this setup not to work ? Any ideas or suggestions on what to try ?
Thanks