H bridge for PWM

dc motordriverh-bridgemicrocontroller

enter image description here

I made a schematic for an h-bridge motor driver that will be connected to a MCU.

Is this schematic correct? I'm not sure if the flyback diodes are working correctly since I added that NPN transistor.

A and B are used to control the motor's spinning direction.

Best Answer

There are several problems:

  1. I didn't look up to see what kind of FET exactly a IRF540 is, but in any case you can't just flip it upside down and expect it to work in a complementary way.

  2. Even with the right FETs oriented correctly, it doesn't make sense to tie the gates of opposite corners together. The motor voltage will be between the two FETs, so the same gate voltage won't apply the same way to both of them.

  3. I can't see a point to the top NPN transistor. You can already shut off the motor by switching combinations of FETs on and off, so all this additional switch does is waste power.

  4. Even if you wanted a master switch transistor, a bipolar in emitter follower doesn't make much sense. To saturate it, you'd have to drive it from a supply higher than Vcc.