Arduino Controlling a Stepper Motor Each line has an LED to show the sequence of which coils are being activated. There is also a diod on each one to drop the feedback from each coil when it is turned off.
And here’s the video: I have it running a program that picks a random number of steps and either forward or backwards then moves in that direction. There is a library included with the Arduino software that makes using stepper motors pretty easy once you get them wired up.
You can check out more here: Update: Here is a better illustration of what’s going on. This is missing the LEDs I added as a visual aid, but it has everything you need to make it work. I’m using 2n3904 NPN transistors and I added some diodes (1n4000 series) to prevent kickback from the motor. Here is a simple sketch to see if your stepper motor is working.
Great tutorial thanks! I’ve managed to successfully control a stepper motor with the circuit in part one. The stepper motor I’m currently using is smallish like yours. I have several larger stepper motors and was wondering if it was possible to add a separate power supply and larger transistors to this circuit for the larger stepper motors. I’ve tried a few things, but I don’t know a whole lot about electronics, so maybe you could point me in the right direction.
Just a single word that I can type into a search engine could make all the difference. Hi – thanks for putting up this very helpful circuit! Have you ever run into a stepper that wants really nonsense inputs and/or may be really picky about the delay timing computed in the Arduino library’s Stepper::setSpeed method?
I just hooked up a stepper from Radio Shack (I know, I just wanted batteries but it was right there and all shiny). The motor claims to be 4 phase with the following to say about step angle (I’ll quote because it’s weird): “Step angle:5.625/64; reduction ratio: 1:64” I assume they did not.literally. mean the step angle is 5.625/64, or 0.087890625. I tried running the arduino example stepperoneRevolution (which should just rotate the motor one full revolution and back) with a stepsPerRevolution of 64 but that only resulted in about an about an eighth of a rotation. So I multiplied my stepsPerRevolution by 8 to 512 and the motor just made a buzzing noise. Guessing it was unhappy about the delay timing, I dropped the RPM down to 30 and the motor would turn but this time only about a quarter of a revolution. I pumped the steps per turn up to 2048, got a motor buzz again, then pulled the RPMs down till the motor would function which turned out to be 8 RPM.
So, to recap those numbers, it seems to take a stepsPerRevolution of 2048 with an RPM around 8 to drive this stepper motor to one complete revolution. This seems totally nuts to me. Ever seen anything like this?
For the record, I’m.pretty. sure I have the motor wired correctly. This.did.
come from Radio Shack so naturally there’s no pinout diagram but the pin arrangement I settled on was the only one that resulted in any movement at all. Thanks, Henry.
. Section Navigation.