Go Down

Topic: how to upgrade this h-bridge to support 31 kHz PWM (Read 4996 times) previous topic - next topic

Terraviper-5

Jul 25, 2013, 10:34 pm Last Edit: Jul 25, 2013, 11:10 pm by Terraviper-5 Reason: 1
Hi!

I have found this h-bridge http://letsmakerobots.com/node/24086 , bought components for it and built it on a breadboard. I tried connecting 12V adaptor at VBAT and 5V adaptor as power for logic and signals. The motor was spinning allright in both directions, if I used crocodile wires, but if I tried to make contact for signal wires by holding them manually (so that connection wasn't perfect), the h-bridge started to stink. This got me thinking, maybe me by not keeping perfect contact was actually somehow simulating PWM, and h-bridge couldn't close and open so fast and short-circuit happened. Then I connected Arduino to it and set frequency to 31 kHz. The program was to change direction of motor every 300 ms. I tried it at 255/255 duty cycle, and it was working fine. Then I started experimenting with lower duty cycles, and motor was very slow, with almost no torque. Soon, something started to stink, a fuse blew and when I touched a n-fet it was very very hot.

Now, I think this incident might be related to too high resistor values in this h-bridge. Maybe FET gates were charging and discharging too slow to keep track. OddBot has made a comment under that h-bridge that some resistors could be lowered to allow higher frequencies. I have calculated that that resistors only allows 1.2 mA (12V/10000Ohm = 1.2mA) through to FET gate, way too low in my opinion. I still dont understand though how short circuit could happen since I was just opening and closing one side of h-bridge 31000 times a second, not changing direction (which was set at 300ms) :\

Since I do not know for sure what to change, I am asking for help here. I thank you for any help!

dc42

#1
Jul 26, 2013, 06:05 pm Last Edit: Jul 26, 2013, 10:53 pm by dc42 Reason: 1
The obvious problem with the schematic you linked to is that it uses pullup resistors to turn the mosfets on, instead of active drivers. This will cause the mosfets to turn on slowly, resulting in a significant amount of energy dissipated in each mosfet each time it is turned on. You may get away with this at low PWM frequencies, but you won't at high frequencies.

Building high power H-bridges using discrete components is a bad idea. Either use an all-in-one mosfet-based H-bridge chip (if you can get one with sufficient voltage and current rating for your motor), or use half-bridge mosfet driver chips driving power mosfets. These chips provide active drive to the mosfets in both directions, and have shoot-through protection. However, many of them depend on the PWM to the high-side mosfet being less than 100% in order to generate the boost voltage needed to drive a high-side N-channel mosfet.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

zoomkat

A DIY H-bridge discussion.

http://forum.arduino.cc/index.php?topic=53425.0
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Terraviper-5

#3
Jul 26, 2013, 11:17 pm Last Edit: Jul 26, 2013, 11:42 pm by Terraviper-5 Reason: 1

The obvious problem with the schematic you linked to is that it uses pullup resistors to turn the mosfets on, instead of active drivers. This will cause the mosfets to turn on slowly, resulting in a significant amount of energy dissipated in each mosfet each time it is turned on. You may get away with this at low PWM frequencies, but you won't at high frequencies.

Building high power H-bridges using discrete components is a bad idea. Either use an all-in-one mosfet-based H-bridge chip (if you can get one with sufficient voltage and current rating for your motor), or use half-bridge mosfet driver chips driving power mosfets. These chips provide active drive to the mosfets in both directions, and have shoot-through protection. However, many of them depend on the PWM to the high-side mosfet being less than 100% in order to generate the boost voltage needed to drive a high-side N-channel mosfet.


Thank you for replying. I agree, but then again I wont need this h-bridge for such high currents, only to about 2A. I'm building it myself because its cheaper and in my country we have poor choice, I cant even find mosfet drivers mentioned in thread below, much less good h-bridges :( I ordered Arduino Motor Shield R3 from France and it cost me a fortune to get it here. The reason why I need 31kHz is because of noise it creates below 21 kHz and also because Arduino is hard to set to frequencies that are not power of 2 :( (I cant afford to sacrifice PWM pins for that). Is there no way to at least calculate how much current is needed to charge FET gates fast enough to be stable at 31 kHz, please? If I lower the resistor values to 330 it will raise the current from 1.2 mA to 36.36 mA, might be enough (or not :( ). Or, could you suggest me some well known driver that could do the job? I really have no idea what to search for in stores :\ (They probably cost a fortune anyway >.<)

These are datasheets for my FETs and BJTs:
http://www.ic-elect.si/pub/files/product_files/078005400100.pdf
http://www.ic-elect.si/pub/files/product_files/078095400100.pdf
http://www.ic-elect.si/pub/files/product_files/043005470100.pdf

I have also seen this post about this h-bridge:


And here is someone that got it to work at 15 kHz:



A DIY H-bridge discussion.

http://forum.arduino.cc/index.php?topic=53425.0


Thanks, but they never found a solution :(

dc42

What voltage do you want to drive the motor at, and what country are you in?
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Terraviper-5

#5
Jul 26, 2013, 11:33 pm Last Edit: Jul 26, 2013, 11:44 pm by Terraviper-5 Reason: 1

What voltage do you want to drive the motor at, and what country are you in?

I need to drive 12V motor(s) (I will need to drive 4 of these motors, independently - I can use my R3 Shield for 2 of them but I still need to drive two more, although I was hoping I could build two dual h-bridges for this application and keep R3 for experimenting purposes), and Im from Slovenia. I was also hoping that I finally found good h-bridge design that I could build for myself for later applications. My friend is trying to automate  8 kg bell and that would need a little bit stronger motor than LM298 can support. This h-bridge would be perfect for that.

dc42

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Terraviper-5

#7
Jul 27, 2013, 12:09 am Last Edit: Jul 27, 2013, 12:19 am by Terraviper-5 Reason: 1

How about this http://si.farnell.com/allegro-microsystems/a3959sb-t/motor-driver-full-bridge-pwm-smd/dp/1521714?Ntt=a3959 or this http://si.farnell.com/stmicroelectronics/l6206n/ic-full-bridge-driver-dmos-dip24/dp/1271018 ?


Thanks for suggestions. I only found IC A3959SB-T in one store, and its currently not available. Looks like ill have to order from Farnell if I decide for gate driver (they are not cheap :( ). But I think I'm gonna try burning some more MOSFETs first before I give up on that cheap design :D Someone said he got it to work at 15 kHz (I added a picture to my upper post). If I knew which values to look at I would try to calculate if its even possible (worth attempting). There are so many values for "gate capacitance", and then there's "gate charge". So confusing :S I know that I shouldn't save money on this, but... I was really hoping I could make use of my new Weller WS-81 instead of buying expensive pre-made stuff. You know, beginner's drive and excitement to make something :P I havent really realised yet whats possible to make at home and whats not...

zoomkat

You might consider a TLE5206-2S H-bridge chip. They appear to be available from a number of sources such as Digikey, Farnell, and china via ebay. Rated for 5A and cost ~$7.

http://www.digikey.com/product-detail/en/TLE5206-2S/TLE5206-2S-ND/1283081

https://www.google.com/search?as_q=tle5206&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

dc42

#9
Jul 27, 2013, 08:25 am Last Edit: Jul 27, 2013, 08:45 am by dc42 Reason: 1

Thanks for suggestions. I only found IC A3959SB-T in one store, and its currently not available. Looks like ill have to order from Farnell if I decide for gate driver (they are not cheap :( ).


Those chips I suggested are full-blown motor drivers, not gate drivers. The TLS5206-2S suggested by zoomkat looks nice, however its switching times are unfortunately far too high to run it at 31kHz.


But I think I'm gonna try burning some more MOSFETs first before I give up on that cheap design :D Someone said he got it to work at 15 kHz (I added a picture to my upper post). If I knew which values to look at I would try to calculate if its even possible (worth attempting). There are so many values for "gate capacitance", and then there's "gate charge". So confusing :S I know that I shouldn't save money on this, but... I was really hoping I could make use of my new Weller WS-81 instead of buying expensive pre-made stuff. You know, beginner's drive and excitement to make something :P I havent really realised yet whats possible to make at home and whats not...


A good start would be to reduce the mosfet gate pullup resistors. Unfortunately, if you reduce the ones for the upper mosfets from 10K to 330 ohms, then the B inputs will have to sink 36mA, which is a bit too much for an Arduino. I suggest you start by reducing the four gate pullup resistors to 1K, and leave all the other resistors at 10K.

EDIT: on second thoughts, the base resistors on the top two BJTs should also be reduced a little too. Try 3.3K or 4.7K.

EDIT: also, try it without the 100nF capacitor in parallel with the motor, that's going to give rise to high peak currents in the mosfets. Or put an inductor between the mosfets and the capacitor/motor junction.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Terraviper-5

#10
Jul 31, 2013, 11:39 pm Last Edit: Jul 31, 2013, 11:45 pm by Terraviper-5 Reason: 1
Sorry it took so long to respond, I had to wait until I could buy more fuses in stores. I thank you very much for these suggestions, Ill be sure to test them out. Just to be sure that it works (that I havent made a mistake in building the circuit), I have removed that capacitor from circuit as you suggested and tested it again at 15kHz (default 10K resistor version). It worked nicely, the FETs were almost cold, I used multiple duty cycles to be sure and used smooth direction changes by "slowly" lowering duty cycle to 0 at stop and "slowly" incresing from 0 at start: https://www.dropbox.com/s/f0ic1s4ppxpgw7u/DSCN1782.MOV (at the beginning there is 50% duty cycle)

dc42

If it runs almost cold at 15kHz with 10K gate pullup resistors with the capacitor removed, then you could try reducing the four gate pullup resistors to 2.2K, and leaving all the other resistors at 10K. Try this at 15kHz first, and if it runs just as cool or cooler, then try 31kHz.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

MarkT


or use half-bridge mosfet driver chips driving power mosfets. These chips provide active drive to the mosfets in both directions, and have shoot-through protection.


_Some_ of them have shoot-through protection, many have none...

With 31kHz switching you'll definitely need high current MOSFET drivers to get good performance, as you are
switching on average every 16us - you'd aim for switch times of a few hundred ns or so.

If you are switching large amounts of power you want high-current drivers anyway to prevent gate voltage
excursions from gate-drain capacitance (or zener diodes).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Terraviper-5

#13
Aug 03, 2013, 07:50 pm Last Edit: Aug 03, 2013, 07:56 pm by Terraviper-5 Reason: 1

If it runs almost cold at 15kHz with 10K gate pullup resistors with the capacitor removed, then you could try reducing the four gate pullup resistors to 2.2K, and leaving all the other resistors at 10K. Try this at 15kHz first, and if it runs just as cool or cooler, then try 31kHz.


Nice! Thanks very much! It doesn't short circuit this time :D At few hundred milliamps of current, at 31 kHz, they become semi-hot after a minute or two of operation, not so much that I wouldn't be able to hold them with my hand, but still (that is without any coolers installed). This is progress indeed :D If I take those gate pullup resistors down even further (to 1k Ohm), will it much improve the heating or will it have only minor impact?

If this proves to be too hot, Ill consider not connecting it to Arduino directly but via optocoupler, and external 5V power supply, that can sink that increased current at 330 Ohm pullup or lower.



or use half-bridge mosfet driver chips driving power mosfets. These chips provide active drive to the mosfets in both directions, and have shoot-through protection.


_Some_ of them have shoot-through protection, many have none...

With 31kHz switching you'll definitely need high current MOSFET drivers to get good performance, as you are
switching on average every 16us - you'd aim for switch times of a few hundred ns or so.

If you are switching large amounts of power you want high-current drivers anyway to prevent gate voltage
excursions from gate-drain capacitance (or zener diodes).


Thanks, I'll consider them if this solution will prove to be too hot to use at 1 Amp or max 2 Amps. For my application, I won't need more current, but I might use this design for something more hungry later. And thank you for the warning, but I do not fully understand what this means, could you explain it a little more please? (I wish to learn what needs to be considered when designing circuits).

MarkT

As a MOSFET switches the current and voltage across it both change in a ramp-like way
(so for instance the current increases and the voltage drops).  During the change the device
can dissipate perhaps about 25% as much as the load is supposed to.  If the load is 200W
that would be 50W.  If the switching is slow and taking 20% of the time, that's 10W in each
switching device purely due to switching (probably the dominant loss).

With inductive loads the losses can be different, and larger.

If you reduce the switching time as a percentage of the PWM cycle then less heat is generated.

So if you reduce the PWM cycle time (raise the frequency) you usually have to speed up the
switching to keep these switching losses under control.

The point about switching large amounts of power is that the drain voltage can change rapidly and
feed significant current into the gate via the gate-drain capacitance, the worst case being enough
to burn out the gate oxide and destroy the device (usually they explode - seen this happen, I wear
eye protection for high power circuitry now). 

Having a good solid driver on the gate prevents the gate voltage swinging out of spec, and speeds
up the switching.  Large devices can need gate currents of amps infact.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up