You can rig a simple circuit where a digital out controls a transistor that powers the motor. Note that this will only give you 1-directional spinning; you can’t reverse this way. I did this a while back using TIP110 transistors to run some relays and it worked like a charm. I’ll post a schematic after I get home this evening.
If you need 2-directional control (forward and reverse), you’d need a more complicated circuit called an H-bridge and that would take up two digital ports.
Here is a more graphical representation, for folks who are not confident with schematics. I’ve used this circuit to run relays and incandescent lamps many times in the past. Radio Shack part numbers are included for your convenience.
I have some large IGBT’s i ordered a while ago for an inductor charging unit for capacitors but i never used them. I also have 10,000 diodes and 10,000 resistors.
The TIP110 is good for 2A, and the TIP120 is good for 5A.
Both are rated for up to 60VDC.
Just so you know, the diode is there to protect the transistor from back-emf/counter-emf. The circuit will work without it, but there is some risk of damage to the transistor.
Thanks! I used a Macintosh program called OmniGraffle Pro. It is mainly a charting and diagraming tool, but I’ve had a lot of luck using it for drawings like this.
Yes, though you will need a current limiting resistor of around 180Ω or 220Ω wired in series for a standard 20mA LED. For high-power LEDs, you would probably need a different value. Also, you can remove the 1N400x rectifier from the schematic above, since it is only needed when driving inductive loads like motors or relays.
If you are just trying to get an LED to glow enough that you can see it (like a status indicator) then you can hook it directly to an I/O port: cathode to white, anode to red. You really only need the transistor driver if you are trying to make an LED glow brightly (like a LED floodlight).