Voltage transient from connecting a battery - Page 1
Forum section: electronics / beginners

author: jay
author_rank: Regular Contributor
timestamp: August 29, 2014, 02:33:57 pm
content: This newbie fried three, oops.. four, comparators..I made a really simple circuit with a dual comparator (TLC3702) driving two FETs. I re-used a circuit board I had made for another project because it had most of the things needed for this. I built the circuit, tested it with my bench PSU and it worked as expected. When I switched from the bench PSU to 12V lead acid battery the comparator failed. After couple of dead TLC3702 comparators it was time to use my oscilloscope to see what is happening (see attachment). I first ignored what I was seeingbecause I though it was just some meaningless ringing when I connected the battery. After another dead TLC3702and head scratching I was ready to accept the possibility that the transient voltage is the cause of the problem. I didn't have any TVS or zener diodes with suitable voltage so I tried suppressing the transient voltage peak with a largish electrolytic capacitor (100µF, low ESR, 35V). It did the trickWhile testing it was just cables from battery to the board. The board consumes only about 300µA.I've already solved the problem but I would like to get more insight about the electrical phenomenon behind this by bringing this up here. Why it failed with the battery but worked with the bench power supply (even with current limit set to 2A)?So what exactly happens when I connect the 12V battery? How the voltage transient can go up to 30V?The fourth TLC3702 died for purely learning purposes.. I just had to try how many volts kills it.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 29, 2014, 03:08:23 pm
content: A circuit diagram might bring forth more useful answers!

author: David Hess
author_rank: Super Contributor
timestamp: August 29, 2014, 03:35:51 pm
content: The inductance in the wiring between the battery and load causes the ringing. The large capacitor solves this by absorbing the energy stored in the inductance.

author: jay
author_rank: Regular Contributor
timestamp: August 30, 2014, 04:02:52 pm
content: David, thanks... There's clearly something about inductance that I don't quite grasp yetThe relatively long wire from the battery certainly has significant inductance.. but somehow it's difficult to understand how such a small increase in current (300µA) causes so significant voltage. Really low resistance in wire and connections allows "too" high rate of change? So the current increases rapidly inducing voltage there but how it rings instead of just being a single pulse?When using a capacitor to prevent the transient how do I determine needed capacitance and voltage rating of the capacitor?

author: IanB
author_rank: Super Contributor
timestamp: August 30, 2014, 04:21:07 pm
content: Quote from: jay on August 30, 2014, 04:02:52 pmInductance produces an effect like water hammer in a pipe. You will observe that water hammer occurs in a pipe when there is no flow, not when there is a large flow. You will also observe that water hammer tends to have repeated cycles when it happens just like the electrical ringing.I don't think sizing the capacitor is critical. Just make it big enough until the scope shows sufficient damping of the overshoot.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 30, 2014, 05:31:31 pm
content: Appears you had a high-K ceramic capacitor in there, and not much else?You have an LC resonant circuit, between battery (a pretty low impedance at most any frequency), cables (equivalent inductance) and whatever bypass capacitors your circuit had.Ironically, your circuit wouldn't have failed if you didn't bypass at all: the power supply would charge nearly instantaneously to 12V, and just sit there. Of course, the circuit might not have worked, either...Since the L and C are in series, the ideal series damping resistance is R = sqrt(L/C) (assuming you can measure or estimate L -- not difficult). But that either costs DC losses (if you put it in series with the battery), or ruins the bypass at the circuit (in series with the capacitor -- ESR).The best compromise is to add a lossy capacitor across the main one, usually 2-10 times the capacitance and R ~ sqrt(L/C) / 2.An electrolytic works because it has quite a lot of resistance, and the higher capacitance brings the resonant impedance sqrt(L/C) down to a similar range. Downside? Huge current spike when you connect it!Tim

author: David Hess
author_rank: Super Contributor
timestamp: August 30, 2014, 09:43:36 pm
content: Quote from: jay on August 30, 2014, 04:02:52 pmThink of inductance as inertia. Once the electrons start moving in the wire as a current, they want to keep moving. The battery has such a low impedance that it can get the electrons moving immediately and supply a high current to charge your small ceramic capacitor which looks like a short at high frequencies and short time scales but once they are moving, they want to keep moving (inductance) and push the voltage across the capacitor much higher while they slow down.QuoteWhat is needed is to limit the initial surge current which initially charges the capacitor. The easiest way to do that as others pointed out is to use a lossy capacitor like an aluminum electrolytic or solid tantalum. These capacitors have high series resistance compared to ceramic or film capacitors which limits the initial surge of current. The larger value of capacitance will also be able to absorb the energy stored in the inductance of the wiring without allowing the voltage across the capacitor from rising too high.

author: rx8pilot
author_rank: Super Contributor
timestamp: September 03, 2014, 05:35:53 am
content: I read through this thread because I have a similar situation that I solved with a TVS. My circuit has two battery inputs that are diode OR'd to a very low current uC circuit. The early prototypes had a destructive transient problem that was blowing up the regulator that powers the uC section. I tried just a capacitor which helps smooth it out, but the TVS completely clamps the spike flat and has a very fast response time. Since the microcontroller section is so low current, a small TVS is all I needed. I also have much larger TVS devices protecting the high-current section of the PCB as well. It seems like the capacitor solution is needlessly large, only somewhat effective, and creates a big inrush current.Just my 2 cents, based on recent experience.....

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 03, 2014, 07:15:35 am
content: Quote from: rx8pilot on September 03, 2014, 05:35:53 amNo, this is not the case nor the reason -- the TVS isn't clamping excess current that's somehow some multiple of the MCU current draw (how could it know?). The transient is defined exclusively by the wiring inductance and the bypass capacitance. Using more capacitance makes it worse, because more peak current is drawn through said inductance -- use a big enough cap (assuming circuit resistances stay proportionally low, which isn't the case) and you can blow any TVS ever made!Also, clamping the spike causes somewhat more current draw, for a longer time, than the natural ringdown of the LC circuit thus formed -- the excess energy being dissipated in the TVS rather than sloshed around the LC circuit.How much is necessary? You can calculate from some basic estimates, of course. The peak current will be no more than Vbatt / sqrt(L/C). A meter of hookup wire (twisted pair, not loose!) might be about 1uH, so 10uF bypass connected to a 12V battery will draw a peak no more than 38A. How much energy? 1uH at 38A peak is 722uJ. So, you need one rated for at least 38A peak, ~1mJ or more avalanche energy, and probably an operational rating of 12-15V depending on your supply's tolerance, so that it will clamp around 20-25V, and be suitable for use with 30V devices. Make sure your regulator is rated accordingly, or else provide the necessary compliance by adding more regulator (or converter) stages, or a transistor and zener pre-regulator, or something like that. TVSs are usually divided into families by peak power, rather than peak current, so if you figure the peak voltage is ~20V at 38A, you need a 760W device -- an SMBJ or P6KE class device would be marginal to insufficient, but an SMCJ, 1.5KE or bigger device should last a very long time.The situation won't actually be as bad, because ESR, DCR and other losses cause some dissipation as the current climbs to its peak value. You can tell roughly how close you are based on the ratio of total ESR (battery, wire, capacitor) to sqrt(L/C): the closer to 1 the ratio is, the less it rings, until for ESR > sqrt(L/C), it doesn't ring at all (and more resembles an RC charging curve instead).The waveform in a previous post is a perfect example of things that work against you: nonlinear (any ceramic but C0G) dielectrics lose capacity strongly with voltage, so the inductor current causes the voltage to just keep shooting up and up and up! (If C remains constant, the overshoot cannot be worse than 100% -- just as the classic physics demo of swinging a pendulum at ones' nose.) This might be another good reason to use a TVS, but also a good reason to use a larger, lossier capacitor. An aluminum electrolytic -- 10uF 35V might have around 5 ohms ESR, which is well above the resonant impedance of ~0.32 ohms, so it will charge slowly. If there's a few 0.1uF ceramics on the circuit as well, they will want to resonate with a few ohms impedance, which is well damped by the ESR in parallel with them -- so it's great for both overshoot and damping circuit parasitics!Tim

author: David Hess
author_rank: Super Contributor
timestamp: September 03, 2014, 10:20:46 am
content: I have occasionally run across designs that used a TVS (avalanche rated avalanche diode, hehe) to solve this particular problem which were unreliable over the long term because repeated avalanching of the TVS caused it to short out.

author: cosmos
author_rank: Regular Contributor
timestamp: September 03, 2014, 11:58:20 am
content: Since your circuit only draws 300uA you might want to consider if you can reduce the inrush by adding a series resistor.1k would only drop 0.3V and would reduce the peak current and associated kick from the wire inductance a lot.Start-up time might be an issue, but 1k and 10uF (example) would still charge to near full voltage in some tens of ms.

author: jay
author_rank: Regular Contributor
timestamp: September 03, 2014, 03:09:06 pm
content: Thanks, guys! You're great.I almost wrote that I don't have any ceramic bypass caps on the boards but then recalled that I did solder one bypass caps on the first board just in case. After testing the first board I made two more without the capacitor that I considered unnecessary. I had no idea that the ceramic bypass capacitor could cause such ringing with the wire inductance. I had the basic knowledge of inductance and the different properties of most common capacitor types, but due to lack of experience in electronics I couldn't connect the dots..It was certainly instructive (educational) to ask why it didn't work without adding the electrolytic cap instead of just being happy that it worked with it.

author: rx8pilot
author_rank: Super Contributor
timestamp: September 03, 2014, 04:26:00 pm
content: Tim - thank you very much for the response. Very helpful. I am an ME making the move to EE [slow and painful - but totally fun]Is the series [current limiting] resistor a practical way to deal with this issue? In that case of the load being very low current, it would keep a TVS from being heavily loaded. The voltage would be clamped by the TVS and the current would not spike beyond what is allowed by the resistor chosen, right?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 03, 2014, 04:30:56 pm
content: Yes, at low currents it is practical. You also frequently see low power AC adapters / converters (including CFLs) with series resistors instead of NTCs for inrush prevention. And often for fusing too! (Fusible resistors are a thing, just make sure they're correctly rated for the purpose.)Tim