Let's Make Robots!


I have noticed several people using an H-bridge schematic (commonly circulated on the web) that will work, but if both inputs are high at the same time, can throw a short across the motor power supply.  As long as they never let that happen, these circuits will work, but I consider it unsafe. Since many people here have different levels of expertise in both hardware and software, it is better to use an arrangement that prevents accidentally shorting anything.

Here is a circuit layout with 4 transistors that will drive a motor, but without the chance of shorting the power. In my circuit below, when Q1 is on, Q3 must be off, and when Q2 is on, Q4 must be off.

The reverse EMF diodes can be any fast switching diodes, but Schottky diodes would be preferred. They switch in like 100 picoseconds --(one ten billionth of a second.)


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


I was just wondering if maybe you can help me repair a controller board for a MK2 UNIVERSAL COIN HOPPER. It has a blow diode and a transistor TIP127. The problem is i can't seem to find a replacement diode for it since it uses smd and its coded. I have tried for hours looking to decode the markings on the diode with no luck. I saw this thread and realized that the diagram is a lot similar to a H-BRIDGE motor control. The diode seems to be a supressor since it is connected to the 24V (+) which supplies power to the motor,i don't know if i need to replace it with a zener diode or a regular diode.

here is the photo of the PCB


here is the diode in question


thank you


deleted sorry for the double post.

This is a very clever circuit.  At first I was worried that the top left NPN would have its Base-Emiter junction breakdown (zener) when the first input was driven to ground.  The zener voltage of the NPN BE junction is about 5 volts.  But then I see that the lower left PNP pulls the left motor connection to ground (+.2 volts or so), so the Emitter of the NPN goes to 0.2 volts and therefore the NPN base/emitter junction will not get to the breakdown potential, unless the NPN is much faster than the PNP.    I still don't understand if that would be a problem, but am guessing that it would be best if the NPN and PNP are about the same speed.

Thanks for the great circuit

Thank you. Aye, you have hit on a key factor, that the transistors should be similar, such as using 2N3904's and 2N3906's together.

You might use ones like the TIP transistors I mentioned below in another post. Everything should work well as long as the two types on transistors picked are similar to each other in specs even though of NPN and PNP types.

Oh and I have bread-boarded the circuit more than once with different types of transistor combos. All have worked properly.


I am a beginner and have been searching around a lot to find a safe h-bridge schematic. All the time people have been scaring me about dynamic shoot-through. Is this h-bridge dynamic-shoot through safe? Or is that only a problem at MOSFETs, because people say they switch off longer than they switch on? I would require about 2A 12V h-bridge.

One easy way to use the same schematic I included would be to switch out the transistors for power darlington transistors which could support the 2 amps you need. You could use transistors such as PNPs like TIP125, TIP126 or TIP127 and NPNs like TIP120, TIP121 or TIP122. (The only differences between those are the voltages they can handle)

All of those can handle an (absolute) maximum of 5 amps each, and could be drop-in replacements for the transistors shown in the schematic, because as Darlingtons, they require a lower input current than a single transistor.


Just built one of these using some pn2222a and 2n2906a transistors I had on hand. I first breadboarded it, and then moved it onto a densely packed 1-3/4 inch by 7/8 inch perfboard. 

Check out the crazy, solder-globby madness.

Can't wait to try it out. 

I presume it worked out well. I still have a few of those in the metal cans as well. (The newer ones I purchased are in the epoxy bodies.)


Yah, I tested with a couple motors and it works OK. I haven't installed it on a robot yet, but I will.

My robot (the FEZ Mini Robot) comes with a motor controller built in called a TB6612FNG. Looking at the data sheets it is based on MOSFETs and has overload protection, and some other internal stuff. 

The only sour apple in the bunch is it is SMD, not nice pins through holes I am starting to miss. I probably couldn't install another if the original one went out.


Lots of people like MOSFETs, could one of these circuits be fairly easily designed using them??? MOSFETs have an incredibly low on resistance (very little power loss).