Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

H-bridge using mosfet transistor + PWM

Status
Not open for further replies.

konradIC13

Member
Hello,

Im currently trying to use some existing design with eventual modification to make H-Bridge for controlling DC brushed motor with PWM. One bridge will control 1 DC motor. Bridge will have 3 inputs: A, B and PWM. A and B will be direction control while one PWM signal will control motor speed no matter in which direction it will spin.

Unfortunatly most designs i found are either used with bipolar transistors, they use mosfets but require 2 pwm signals or they are not usable with PWM.

I found very nice schematic of simple H-Bridge using Mosfet transistors **broken link removed** and its using 2 inputs A and B to control motor.

This is my modified version:
mostekha.gif

Will this circuit work (of course ill have to add protection diodes but first i want to know if it will work with PWM)? A and B will select direction of motor and no matter if it will spin clockwise or counterclockwise same one PWM signal will set its speed.

Transistors connected to A and B are 2n3904, P and N mosfets of bridge will be IRF7317 and mosfet with PWM will be IRF7905. Motor voltage is 6V and maximum current draw is 1.1A. PWM freq 1kHz
 

Attachments

  • mostekha.gif
    mostekha.gif
    10 KB · Views: 1,245
With the 10Ks (your R2 & R8) at the gate of the PWM NFET, they create a voltage divider, and a high impedance path to charge and discharge the gate capacitance. If the drive signal is a 5V port pin on a MCU, the NFET will not turn on due to the 2.5V at the gate. Just get rid of R2.

Never switch A or B with the PWM signal high. Use the PWM signal to Start/Stop the motor. Do not use A or B for that.
 
Updated schematic:
mostekha2.gif

" Never switch A or B with the PWM signal high. Use the PWM signal to Start/Stop the motor. Do not use A or B for that. " Do you mean that i should never do: A=1, B=1, PWM signal on?
 

Attachments

  • mostekha2.gif
    mostekha2.gif
    9.9 KB · Views: 1,325
Updated schematic:
View attachment 71527

" Never switch A or B with the PWM signal high. Use the PWM signal to Start/Stop the motor. Do not use A or B for that. " Do you mean that i should never do: A=1, B=1, PWM signal on?

No, I mean that if switching direction, turn off PWM first then Switch off A (B if other direction), then turn on B (A if other direction), and finally turn on PWM for the desired width. Before changing A or B, always turn off PWM first.
 
Ok, thanks i now get it. But out of curiosity, what will happen if i would switch direction while PWM will still be high?
 
... what will happen if i would switch direction while PWM will still be high?

That is a crappy H-bridge, and you would get a large shoot-through current spike as either A or B goes high. That is because when either PFET turns on, initially both ends of the motor are pulled high (because the resistance of the motor is so low) so both NFETS start turning on together. If the PWM FET is turned off as that happens, no foul...
 
Ok thanks, ill keep that in mind.

"That is a crappy H-bridge" Would you suggest changing something or maybe using other design to prevent this from happening or this is unavoidable (large shoot-through current spike, both NFETS start turning on together) ?
 
Use a commercial H-bridge driver IC, they avoid the shoot-through, or just turn off PWM when changing direction.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top