Hey Everybody,
I wanted to create a very simple stepper motor circuit and driver software using an Arduino Uno.
I started with MOSFETS P/N IRF510 and could not get these to work.
So I had some TRANSISTORS P/N N4921G in my shop and plugged these into my breadboard. With a small amount of rewiring, I got these to work great.
The PROBLEM is that my stepper motor turns VERY SLOWLY. When I decrease the time delay in my software to about 2000 microseconds (2 milliseconds), the motor does not turn at all...probably switching power in coils faster than the motor can physically turn.
HOW DO I SPEED UP THE MOTOR TO THE SPEEDS OF 100-600RPM AS LISTED IN THE SPEC'S?
(https://www.jameco.com/z/42BYGH404-R-Unipolar-Stepper-Motor-12VDC-0-4A_238538.html)
My circuit diagram looks similar to the attached GIF file. I have added pull-down resistors, not shown.
My code looks like:
int t = 3000; //time delay in microseconds
void setup() {
DDRB = B11111111;
}
void loop() {
PORTB = B00000001;
delayMicroseconds(t);
PORTB = B00000011;
delayMicroseconds(t);
PORTB = B00000010;
delayMicroseconds(t);
PORTB = B00000110;
delayMicroseconds(t);
PORTB = B00000100;
delayMicroseconds(t);
PORTB = B00001100;
delayMicroseconds(t);
PORTB = B00001000;
delayMicroseconds(t);
PORTB = B00001001;
delayMicroseconds(t);
}
TIA,
--Neal