Instructables

How to control a DC motor to run in both directions

Step 1: Parts needed

The parts, you need to make this can be found in any electronic store, or even lying around in your workshop (if you have any).

You'll need:

  • A DC motor.
  • A Double pole a.k.a. DPDT switch. preferably one with a center OFF position, so you can control the motor like this: Forward, stop and backwards.
  • A Power supply that suits the specs of the motor (has the voltage and amperage as the manufacturer of the motor recommends). In my case it was 2 AA batteries.
  • A Batteryholder (if you use batteries).
  • Some wire.

Step 2: Assemble it

IMGP6854.JPG
IMGP6857.JPG
IMGP6855.JPG
I don't think, this could be easier. Just follow my pictures.

Step 3: Applications

When I learned to make this circuit (I think I was 9 years old) I made a simple, little car that could drive forwards and backwards.

Now all you newbies out there: go make some creative with this circuit and post some pictures of it.
1-40 of 47Next »
neardood5 years ago
wow that is really simple! when I tried to do something like that I used heaps of diodes and sh1t like that but this works even better. Too bad I dont have a three-way switch like that on in my workshop anyway...
You could just use a 2 position switch and a separate switch to turn it on and off.
how would you do that
rwhite1911 months ago
for some reason I thought i would need a servo and micro controller to control the direction of something thanks so much
Arjun K B1 year ago
how to give signals from receiver to this dc motor
faerietree2 years ago
Thank you so much, too.
My problem now is, that I want to switch an AC motor.
But you mentioned this was for DC motors only. Is there a chance to get it work for an AC, too?
This would be genious..
It must me possible to invert the signal similarly ... don't you think so? (i want to control a vacuum cleaner at lower voltage -- i.e. 40 V - 120 V instead of 230 V)
Hope someone can help me noob.
ndeo2 years ago
Thank u..!
This helped me very much..!
jensenr303 years ago
NICE!
ricwip554 years ago
Good clear instructable. This is a question rather than a comment: can this be 'scaled' or 'beefed' up to switch a 12v starter motor running off a car battery ? Much higher currents - I'm trying to build a boat trailer 'tractor' . Thank you.
 Sure, That would be possible. You'll just need a pretty heavy duty switch!
Thanks for the clear instructions! This has really helped me. I am building a robot for my son with some spare parts that I got for RC Tanks . We are trying to build this as cheaply as possible and this has really helped! Thank You.
abhinavrana3 years ago
u have not mention the mechanism of seperate switch so plz do it .................
 Hey i was wondering if it is possible to use something like a flipflop circuit, and control a motor, so that when a two prong switch was flicked on, the motor goes one way, and when two contacts are made, the motor turns off. When the switch is flicked the other way, the motor should turn on, but the other way.

I know that this is easily accomplished using a microcontroller, however i was wondering if anyone knew how to accomplish it without one. I tried modifying this flipflop circuit, but i could use some input.


flipflop.JPG
gud work ......man.............its realy simple ...............i realy appreciate ur work............bcuse it is without using microcontroler or pic
How could I make this powered by a microcontroller
You'll need a completely other circuit. Try this circuit. I've used it several times with an Arduino, and it works flawlessly.
Thank you very much for that link it is very helpful and wasy.
electric455 years ago
thanks for the help;)
hornbadoing5 years ago
howcom so manny ppl knew this when they wher 7 an 8
Because they are smart and into electronics.
no because these switches can just be bough for like 1£! and are easy to find... i want one with transistors :(
This is just an Instructable for beginners with motors. Here is a link to a transistor H-bridge that I've used for small robotics etc.
Yeah
raykholo5 years ago
is it the same application if i were to use a dpdt relay instead of the switch, with some sort of robotics platform/ i/o module?
If you're using a microcontroller to drive a motor, I'll recommend using the original tilden H-bridge, which is the first schematic on the site. I've used it for a microcontroller controlled robotic arm, and it worked great.
whats the difference ? from the link u gave me all i can see, from first glance is that it just looks more complicated and hard to follow... also, is there some additional circuitry available to diy to add the "off" function of a dpdt switch into this application?
If you can find a DPDT relay, then go ahead and use that with a NPN transistor, but I wrote this link for you, because I don't personally like to use relays for this purpose.
right... so the npn transistor adds that off function? do u know how should i wire it up...?
If you hook up a relay directly from a microcontroller, you'll probably kill it. I've downloaded a little schematic to show you how to hook it up. Ignore the +12V on the schematic and use the voltage, that your relay requires. the transistor can be almost any common NPN transistor. Just make sure it can handle the power needed by the relay coil.
relay_example.gif
ok... but lets say the arduino... last time i checked it can have a 5.5v output voltage if i use a 5.5 relay, is it still gonna kill it? thanks for the schematic, and im not that good at reading them so to double check--- the circle is the transistor and the box is the relay- right? not sure what r1 means though
The ATmega168/328/8 on the Arduino board is capable of outputting 40mA on each digital output. Most relays draws more current than that, so therefore you'll kill that pin on the microcontroller. the circle is the transistor, the component marked D1 is a diode (your circuit will work without this, but some relays can sometimes kick voltage back into the transistor, so the diode is for protection) R1 just means that the component is the first (and in this case only resistor, so just ignore that). Try to google the transistor, that you use and check which of the pins matches the schematic. The "wire" that is formed in 4 "waves" next to D1 is the relay coil.
got it -- and i putting this idea on hold for now cuz i got a new one... i found an led that changes colors if you flip the polarities so its red if you hook it up ++, -- and green if u hook it up +-, +- ... to the battery im also working on a cheapo version of estes model rocket launcher, so im using the dpdt relay idea for the led to be used as a status indicator light.... its not a microcontroller so that makes my life easier thanks again for your help in me understanding this concept and it is a very interesting one..
richy_s5 years ago
Really nice instructable. Used this with an old CD drive to control both tray in and tray out with the same button. Simple but effective.
i did something like that a coule of years ago to convert a broken dvd drive into a motorized "safe tray", inside the computer knowing about these h bridges would have helped out a lot... was ur drive just missing some good gears in there or something ?
The actual drive was fully working but, because I could, I opened it up and found a use of it...well i say use more just something to do...
It's funny, cause I have used it for the exact same thing.
you wouldn't have happened to read 51 high-tech practical jokes for the evil genius (long title) would you?
Nope.
O its just its used in there ok never mind
Sometimes I feel so stupid for not noticing things, even if I was thinking about it this morning! :/
1-40 of 47Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!