Introduction: How to Control a DC Motor to Run in Both Directions

Picture of How to Control a DC Motor to Run in Both Directions
Those H-bridges are very useful and smart, but if you just want to control the direction of the motor with a switch (manually), there is a much simpler and cheaper alternative.

This little circuit is perfect for newbies. I've known this circuit for several years now, but I didn't got the idea of posting it until now.

Step 1: Parts Needed

Picture of 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

Picture of Assemble It

I don't think, this could be easier. Just follow my pictures.

Step 3: Applications

Picture of 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.


laurajane_blake (author)2017-02-20


What are the green and silver items in the materials here? Are they jumpers?

Also, is the circuit all soldered together? Apologies for stupid questions. I'm a noob!


sanjeevkumarbathe (author)2017-01-14


JohnA391 (author)2016-11-19


Trackaround70 (author)2016-10-26

Simple yet effective, thanks ??

Doctor90250 (author)2014-11-04

I had to laugh (at myself) when I saw this. I built a 3 motor, laser spirograph, but you only get the full effect when you control the speed and direction of each motor independently. I design and build a lot of high tech nerd toys, yet this concept has eludeded me for longer than I'm going to It's so simple. whoda thunk it! Thank you so much. Now if I can just figure out that "2 switches for one bulb" voodoo in my kitchen. LOL!

On this page go down to Diagram 4 ??

Bobby T (author)Doctor90250 2015-10-22

Hey you learn something every day. It just wasn't your day..

BenM89 (author)2016-01-16

Could you hook up 2 DC motors and if so how?

kumarsaroj (author)2015-11-13

It is a childish project. When wanted motor in both direction then suggestion for DPDT switch is given.

kaveh2 (author)2015-03-27

Thanks .I really needed to know this.

neardood (author)2008-08-29

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

rwhite19 (author)2013-08-09

for some reason I thought i would need a servo and micro controller to control the direction of something thanks so much

Arjun K B (author)2013-03-31

how to give signals from receiver to this dc motor

faerietree (author)2012-05-28

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.

ndeo (author)2012-03-11

Thank u..!
This helped me very much..!

jensenr30 (author)2011-02-20


ricwip55 (author)2010-03-07

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.

abhinavrana (author)2010-10-14

u have not mention the mechanism of seperate switch so plz do it .................

manbearpig001 (author)2010-05-27

 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.

gud work realy simple ...............i realy appreciate ur work............bcuse it is without using microcontroler or pic

kiss my donkey (author)2009-06-18

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.

electric45 (author)2009-04-09

thanks for the help;)

hornbadoing (author)2008-08-07

howcom so manny ppl knew this when they wher 7 an 8

Because they are smart and into electronics.

amando96 (author)thermoelectric2009-02-27

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.

thermoelectric (author)amando962009-02-27


raykholo (author)2009-02-15

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.

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_s (author)2008-10-01

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.

raykholo (author)richy_s2009-02-15

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 ?

richy_s (author)raykholo2009-02-16

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?


O its just its used in there ok never mind

fallenspirit123 (author)2008-11-10

Sometimes I feel so stupid for not noticing things, even if I was thinking about it this morning! :/

About This Instructable




Bio: Hi all, I'm a college student in the copenhagen technical college. I'm currently working with 3D printers and I'm building my own ...
More by Artificial Intelligence:DIY Copper Style LED Painting IlluminatorThe Arduino AA UndershieldLED Parachuties
Add instructable to: