I am very knew to electronics and was planning to build my first robot. I search around google for H-bridge designs and drew the following schematic(OLD)enter image description here

NEW enter image description here I know that testing a circuit on a simulation and in real life are to very different things, on the simulation the circuit works good. The two inputs are coming from a RF module with a PT2262 decoder, that's why I chose two logic level n-channel mosfets(IRL520) at the low side. The motors are both(same circuit twice) 12V and 2,19A of stall current each. Each optocoupler is a 4n35. My power source is a 12V 5A lead acid battery.

The problem: (When testing on a breadboard)When one input is high, the mosfets that are not being used get really hot and the motor turn very slow or not at all. I was thinking maybe the way that I wired it to my breadboard is off? This problem has been bugging me for a little while. I am hoping one of you experts are able to tell me what might be happening here? I decided to build my own motor driver for educational purposes and cannot get any other components for now

*EDIT: I've uploaded a new schematic with the changes and switched the p-channel mosfets(my bad)

*EDIT 2: Motors are 12VDC brushed gearmotors.

EDIT 4: Sorry for the delay, here are some measurements that might aid in answering;

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

  • 1
    \$\begingroup\$ After you edited That's something that you'll be able to put on your breadboard that won't burn up. The only "major" danger here is if you press down both buttons simultaneously. or if the time between pressing one button and the other button is too short. Because you got pull-down/pull-up resistors which are bleeds out slower than activating. \$\endgroup\$ Jul 25, 2017 at 22:06
  • \$\begingroup\$ What would you recommend to improve that? \$\endgroup\$
    – lamboant
    Jul 25, 2017 at 22:15
  • \$\begingroup\$ If you will keep having it with just buttons, Either put a warning text nearby saying "never ever press both buttons down simultaneously". Or use two and-gates which works as enablers, if one button is pressed then that will disable the other button, if both are pressed they disable each other. If you are going to control the H-Bridge with a MicroController(aka µC), then just don't write bad code. \$\endgroup\$ Jul 25, 2017 at 22:19
  • \$\begingroup\$ I'll be very careful during simulation. My H-bridge will be controlled through RF by a PT2262 decoder, I'll ensure to wire it up good when putting the robot together. The RF modules I have can only send HIGHs and LOWs one at a time, but they have an impressive range. Besides that, could anything else go wrong(before I go testing it). \$\endgroup\$
    – lamboant
    Jul 25, 2017 at 22:47
  • \$\begingroup\$ Some extra if you want to really go "all" the way. Put some capacitors from GND to the 12V to smooth out the voltage and voltage dips. I don't know exactly what kind of "motor" you'll drive, but if you will play with PWM and duty cycles. Then you should definitely check up on "bipolar and unipolar pwm". I'm really bad at explaining things, but unipolar switching is what you should always go for. The red lines are the voltages the motor sees. Unipolar is more kind to your circuit and more efficient. \$\endgroup\$ Jul 25, 2017 at 23:13

3 Answers 3


When input switches go open circuit, there is nothing significant pulling charge from the mosfet gates on the low side. Try adding 1 kohm resistors to ground between gate and source on the low side mosfets. Without this addition, you cannot rely on the photodiode circuit for dragging down the gate to 0 volt and this will leave the lower mosfets partially on.

I'm not ruling out that there are other problems of course.

  • \$\begingroup\$ And what other problems do you see? \$\endgroup\$
    – lamboant
    Jul 25, 2017 at 22:03
  • \$\begingroup\$ The main problem is that you replaced the old circuit with a modified circuit incorporating the changes. This is not good because it invalidates any answers previously given potentially so retract your edits and play properly. \$\endgroup\$
    – Andy aka
    Jul 25, 2017 at 22:31
  • \$\begingroup\$ Ok, I changed it the schematics \$\endgroup\$
    – lamboant
    Jul 25, 2017 at 23:07

Q1 and Q2 are wired in reverse. They're PMOS.

The optos are useless, simple NPN transistors would work.

Also, your optocouplers will introduce a delay which will cause both FETs to conduct at the same time on every transition, shorting the power supply. They will heat a lot (or burn).

What is wrong with buying a cheap, ready-made H-bridge module from the net?

  • 1
    \$\begingroup\$ I already have a backup L298n motor driver module ready for use, but I would like to make one myself for educational purposes. \$\endgroup\$
    – lamboant
    Jul 25, 2017 at 22:06

Looking at the "NEW" schematic...

Your P-types have \$10k\Omega\$ gate termination resistors. This is hte only source of gate charge discharge & this will produce a longer turn-off time (relative to the N-TYPE)

The N-Types have \$1k\Omega\$, equally their gates are directly connected to the A & B terminals and these may provide a low-impedance LOW -> Fast turn off & equally a possible fast turn-on.

A slow Turn-off and a fast turn-on in a leg will result in a soft shoot-through at each complimentary switching transient & this will increase the losses & temperature of the switches. This could result in premature ageing or thermal damage


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.