EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: peter123 on October 03, 2017, 09:00:14 pm
-
Hi,
I'm working on a BLDC motor driver with three half-bridges controlled by an MCU (see attached schematic). At the moment the circuit is powered with a bench supply set to 24V/1.5A, and to power the MOSFET drivers, which need a lower supply voltage, I'm using an LM317 voltage regulator. The problem is that sometimes when turning the motor on, a large current is drawn from the bench supply and it toggles between voltage and current regulation, and in this process the LM317 is destroyed. :( I suspect it is because there are spikes in the supply voltage when this happens. I've measured the bench supply with an oscilloscope when shorting its output and managed to capture spikes of about 60V.
What is the best way to protect the LM317? A zener diode? Or do you think it's a bad idea to use an LM317 in this kind of circuit? In that case suggestions of alternatives would be much appreciated!
-
I have no idea for what you are using soft start capacitor for LM317, interesting when that capacitor discharged LM317 reminds current source circuit
Could help Low ESR capacitors or shorter/twisted power source wires..
-
There is nothing to protect the LM317 input against the +ve overvoltage spikes that will come in from the motor, through Q1 diode, to Vcc_bat.
C1 is too small, you could upsize it and see if it absorbs enough of the spike, or add a TVS at Vcc_bat to keep it under 37V.
I would add to C1 a 100-220uF electrolytic cap.
-
Unless you put some series resistance upstream of it, all a Zener will do is clamp it ONCE, failing shorted then blowing open as it attempts to pass all the current the supply can give it.
Try a 3.9R 10W series resistor (or a greater resistance and lower wattage if the max load on the 317 is less than 1.5A - the aim being to keep the input voltage to the 317 above 17V at full load to give the 317 enough headroom to regulate - make sure you allow for transient peaks in the load current), a 10uF electrolytic across C1 to damp any ringing there, a TVS diode to clamp the surge - a nominal 28V is probably about right, but you'll need to go up to 30V or even 33V if the nominally 24V rail is eventually going to be from a battery supply that may rise significantly at full charge, or if its going into an automotive application (and uprate the series resistor + use a x10 pulse rated one to handle an : ISO-16750-2 load dump with the TVS clamping). You'll also need to swap out the LM317 for a LM317HV to get enough margin for the clamping to be effective - although the LM317 can withstand up to 40V across it so can tolerate a surge to 53V when its output is at the nominal voltage, it wont tolerate that at powerup when its output is still at 0V, and 40V is *FAR* too close to the max clamping voltage of a typical 500W 28V TVS diode. The 60V rating of a LM317HV will vastly enhance reliability.
It should be noted that a lower ESR capacitor at C1 can make the problem worse as it can resonate with the wiring inductance and double the voltage. The use of low ESR ceramic input caps is *NOTORIOUS* for causing regulator failure at powerup in circuits where a regulator is supplied with an input voltage of more than half its max input voltage rating. Adding an electrolytic >10 times the value of the ceramic supplies enough damping to 'defang' a typical wiring inductance resonance spike - if the wiring loop area is minimised.
-
How long does the over voltage last for?
The resistor/zener will probably do but it's also possible to boost the input voltage range of the LM317 by adding a couple of transistors, see below. You might want to use a lower voltage zener than 39V though. I'd go with 33V.
(https://www.eevblog.com/forum/beginners/design-of-circuit-for-0-24v-5amp-regulated-power-supply/?action=dlattach;attach=352281;image)
-
LM317HV high voltage version
-
Thanks for your input!
@strawberry
Are you referring to Cadj? I was following the Typical application in TI's datasheet and I realize now that I didn't read it carefully enough. It says: "CADJ is recommended to improve ripple rejection. It prevents amplification of the ripple as the output voltage is adjusted higher." So I think it's only useful when R8 (in my schematic) is adjustable. I doubt it does any harm though.
@floobydust
Good point! In the final circuit there should be a large capacitance between Vcc_bat and ground, as per my understanding to compensate for the large inductive load of the motor. I plan to use 12x220uF electrolytic caps. There's no calculation behind that; just that I've found a previous implementation of a similar circuit that uses this number. I have temporarily removed them because having a large capacitance like that proved treacherous when experimenting. The current limit of the bench supply is very useful if there's accidental short! I should probably reintroduce a few of them.
@Ian
Thanks for the clarification about the Zener! I have attached a circuit diagram based on your explanation. Did I get it right? The motor driver is for an electric bicycle and will be powered with a battery with nominal voltage of 36V so I guess I need a TVS with a bit higher voltage rating. Would you say it's a big difference between using a TVS and using a Zener? Very interesting note on the low ESR input capacitor. I have not heard that before.
@Hero
I wasn't actually able to reproduce it now (maybe it has to do with inductance and how the cables from the bench supply are arranged) but I think the spikes were in the order of microseconds. Thanks for the schematic!
-
It's just that on the bench, you have no batteries which normally act as a zener and clamp the bus voltage to say 38V.
LM317HV (http://www.ti.com/product/LM317HV) rated for 60V so TVS can be higher V.
Depending on your controller, regen will also have nowhere for the energy to dump when no batteries connected, so be careful there.
-
I'd put a 0.1uF ceramic in parallel with the input capacitor as the wound foil construction of an electrolytic can have quite a high self-inductance so it needs some help to suppress high frequency noise. You may also want to keep the cap you had on the Adj pin (also with 0.1 uF ceramic in parallel) and its discharge diode, if you have anything sensitive running off your 13.75V rail, as the 36V DC bus will probably have a lot of ripple at your BLDC drive frequency. Otherwise it looks good.
A Zener is designed to regulate at its nominal voltage when passing the specified current, and can pass more current up to its wattage rating. Its surge rating wont be that impressive and often isn't well specified. It certainly wont have a well specified clamping voltage when passing a pulse of an order of magnitude more than its continuous current rating.. A TVS diode is designed to pass negligible current at its working voltage and clamp at a moderately higher voltage when passing a *LOT* of current during a reasonably short surge pulse aqnd are specified for that mode of operation. They are far more readily available with high pulse current ratings - e.g the 15KPA36A has a 36V standoff voltage and clamps at under 60V while passing over 250A.
If you are using a 10S LiPO pack, you can expect 42V fully charged, and the TVS diode shoud be appropriately rated. You *MAY* have to go with Hero999's transistor preregulator circuit if you cant find a TVS diode that will handle the surge duration, clamp at under 60V and standoff 43V.
Be aware that if you *DON'T* have some sort of clamping, and expect the batteries to hold down the voltage during regenerative braking, a loose or dirty connection to the batteries that disconnects them for even a few microseconds due to vibration could cause a massive spike on your DC bus. You need enough clamping to give your controller time to react to an excessive DC bus voltage and either put the motor in a safe low current fault mode, or if braking, switch in a resistor to dump power to.
-
@Ian.M
It should be noted that a lower ESR capacitor at C1 can make the problem worse as it can resonate with the wiring inductance and double the voltage. The use of low ESR ceramic input caps is *NOTORIOUS* for causing regulator failure at powerup in circuits where a regulator is supplied with an input voltage of more than half its max input voltage rating. Adding an electrolytic >10 times the value of the ceramic supplies enough damping to 'defang' a typical wiring inductance resonance spike - if the wiring loop area is minimized.
I am prone to looking for low esr caps at input side so am quite curious. I looked at several
LM317 Datasheets and see no cautions expressed about not using low ESR on input side.
Could you clarify your experience here, I may have some bad designs that need to be
addressed.
Regards, Dana.
-
See http://www.linear.com/docs/24956 (http://www.linear.com/docs/24956) - its not just switching regulators that are affected. You wont have a problem if the input is less than half the regulator's max rating because the LC circuit of the lead inductance + the input capacitance can only ring to double the supply voltage. You also wont have a problem if the regulator is drawing sufficient current to remove enough energy from the cap in 1/4 cycle of the ringing to prevent it peaking above the max input voltage rating.
Here's some sims of the switch-on transient assuming 2m of 2.5mm flex with 5mm conductor spacing fed from a source with negligible impedance e.g. a SLA or LiPO pack:
(https://www.eevblog.com/forum/projects/protecting-lm317-from-voltage-spikes/?action=dlattach;attach=357457;image)
24V peak from a 12V supply with a 1uF low ESR ceramic input capacitor.
Increasing the ceramic to 10uF doesn't help much.
Adding an ordinary 10uF electrolytic in parallel with the 1uF damps it to under 15V
-
Thanks Ian, thats an eye opener.
Regards, Dana.
-
Errr.... I goofed and forgot the resistance of the ground return wire. Change all the inductors to have Rser=27.2m :palm:
However it only drops the first peak by a fraction of a volt, 23.4V isn't much better than 24V for your poor regulator. :--
If the supply was 24V it could peak at nearly 47V, well outside the abs. max. limit of a LM317 with a discharged output cap. :scared:
-
If the transient is only brief and it occurs when the output voltage is zero, simply connect a zener between the input and output of the LM317. It will divert the extra energy around it to the output capacitor, which won't reach too higher voltage.
-
Thanks again everyone for your replies!
It's just that on the bench, you have no batteries which normally act as a zener and clamp the bus voltage to say 38V.
LM317HV (http://www.ti.com/product/LM317HV) rated for 60V so TVS can be higher V.
Depending on your controller, regen will also have nowhere for the energy to dump when no batteries connected, so be careful there.
I have one of those freewheeling hub motors so regenerative breaking is not on the table. I guess the rotor will keep moving a little bit due to its intertia, but it should be minimal.
I'd put a 0.1uF ceramic in parallel with the input capacitor as the wound foil construction of an electrolytic can have quite a high self-inductance so it needs some help to suppress high frequency noise. You may also want to keep the cap you had on the Adj pin (also with 0.1 uF ceramic in parallel) and its discharge diode, if you have anything sensitive running off your 13.75V rail, as the 36V DC bus will probably have a lot of ripple at your BLDC drive frequency. Otherwise it looks good.
A Zener is designed to regulate at its nominal voltage when passing the specified current, and can pass more current up to its wattage rating. Its surge rating wont be that impressive and often isn't well specified. It certainly wont have a well specified clamping voltage when passing a pulse of an order of magnitude more than its continuous current rating.. A TVS diode is designed to pass negligible current at its working voltage and clamp at a moderately higher voltage when passing a *LOT* of current during a reasonably short surge pulse aqnd are specified for that mode of operation. They are far more readily available with high pulse current ratings - e.g the 15KPA36A has a 36V standoff voltage and clamps at under 60V while passing over 250A.
If you are using a 10S LiPO pack, you can expect 42V fully charged, and the TVS diode shoud be appropriately rated. You *MAY* have to go with Hero999's transistor preregulator circuit if you cant find a TVS diode that will handle the surge duration, clamp at under 60V and standoff 43V.
Be aware that if you *DON'T* have some sort of clamping, and expect the batteries to hold down the voltage during regenerative braking, a loose or dirty connection to the batteries that disconnects them for even a few microseconds due to vibration could cause a massive spike on your DC bus. You need enough clamping to give your controller time to react to an excessive DC bus voltage and either put the motor in a safe low current fault mode, or if braking, switch in a resistor to dump power to.
Thanks for the explaination about TVS and Zeners. I've ordered a 51V TVS and a 33V TVS to experiment with. I will use a 10S LiPO battery pack indeed, so the 51V TVS should work in that scenario. The regulator is used to power the MOSFET drivers and the average current shouldn't be very high (even though each driver can source 1.5 A) so I chose a 5W resistor.
If the transient is only brief and it occurs when the output voltage is zero, simply connect a zener between the input and output of the LM317. It will divert the extra energy around it to the output capacitor, which won't reach too higher voltage.
Hm.. so you mean the resistor in front of the TVS should not be necessary for such short transients?
-
Possibly the classical parasitic inductance LC ringing happening with low-ESR ceramic input cap. In these cases, the answer is often the simple rule-of-thumb: add an extra damping RC network, where C is considerably larger than the sum of low-ESR ceramic C, R being something around 1-2 ohms.
Often a simple, cheap electrolytic cap provides the 1-2 ohm R and high C in the same package. For example, this circuit would most likely benefit from a 22 uF to 470 uF cheap elcap. Usually, little (almost no) ripple current goes through this cap, and the exact values are not critical, which is why the lifetime of this cap is typically not an issue.
Active clamping may be required in addition.
-
If the transient is only brief and it occurs when the output voltage is zero, simply connect a zener between the input and output of the LM317. It will divert the extra energy around it to the output capacitor, which won't reach too higher voltage.
Hm.. so you mean the resistor in front of the TVS should not be necessary for such short transients?
The second schematic you posted is fine.