Some probing with an ohmeter, followed by some simple driver code on your microprocessor and you'll be stepping in style.
Remove these ads by
Signing UpStep 1: Get to Know Steppers
First step is to figure out if it's a unipolar or bipolar motor. Have a look at Jones on Steppers for some deeper background, then at Ian Harries' Site for a simple method to figure out an unknown motor.
Read up a bit, then join me in a walkthrough of this motor I got for cheap. (They're on sale for $0.99 right now. They're small, relatively light, but don't have much torque. Don't know what it'll be good for yet.)










































Visit Our Store »
Go Pro Today »




If you're serious, you usually start off with an idea of how much torque and speed you need for your application, then find a motor that'll deliver, and then pick a motor driver depending on the motor's current requirements.
But for low-current applications, I've had good luck with the SN754410, for slightly larger currents the 293D is good, and above that, especially if you're driving with a microcontroller or need microstepping, Allegro has some great offerings.
And there's always build-it-yourself from 8 MOSFETs. Google for "H-bridge" to get an idea.
Enjoy!
I want to make a 90 degree swing, that would be about 5 steps, based on the 20 steps for 360 degree
anyone an idea how to do this in the Picaxe Basic language?
I can make it step but not exactly 90 degree forward and backwards
Any suggestion is welcome, thanks
The language is C, and there's tons of good resources for that. For beginning I like the Kernighan & Ritchey book. Or search around for C tutorials on the web until you find one that looks good for you.
For AVR-specific C, everything you need is at the avr libc project page: http://www.nongnu.org/avr-libc/user-manual/index.html. While you're there, see their example projects link.
For AVR hardware-related stuff, there's the datasheet for the chip you're using (which can be a little daunting, but is very very good once you get used to it) and a bunch of projects online to learn from.
If I were just starting out, I'd pick up a project like a blinking-light kinda thing and learn just enough C to get that working. Then continue on project by project, expanding your hardware and software knowledge in tandem, but always with a concrete project in mind. At least that helps me...
I made a page of many helpful AVR resources for a class I taught: http://wiki.hacdc.org/index.php?title=Useful_AVR_Links
Or a dishwasher repair place may have a similar solenoid-driven water valve for use in dishwashers.
Unless your application is very strange, buying a purpose-built solenoid valve is probably a lot easier, cheaper, and more reliable.
If your application is very strange, you may need more torque to open/close the valve than a direct-driven stepper motor can provide. You may need a gearbox.
There's some extra tricks because usually switches "bounce" back and forth between on and off as you press them down. You're gonna want to debounce the switch.
This PDF on debouncing is pretty good. And google around to find more examples.
Another stepper to look at are the Japan Servo low-voltage models. For example. They're a little heavier/bigger, but offer a much smaller step size and some more torque. They also cost $5 each, instead of $1.
As for AVR vs Pic, it's like Coke vs Pepsi. (With the AVR playing the part of Coke, as far as I'm concerned.)
That said, I would bet that back EMF is not as important for steppers as for regular DC motors because of the way they're driven. I'll do some 'scoping and get back to you on that.
And anyway, the AVRs also have limiting diodes on the pins that keep the voltage in the 0-12v range. They're not as beefy as the ones in the motor-driver chip, and can overheat if you really overdrive the pins, but for this project, they suit just fine.
For a small (50mA) motor like this, I'd not hesitate to drive it directly from AVR pins. Everything's within spec all around as far as I can see. But I'll test out the peak back-EMF under heavy load before I bet the farm on it.
check this guy out!
http://www.taomc.com/gallery/sand.htm