How to get rid of ringing in high current PWM.  - Page 1
Forum section: electronics / projects

author: Fflint
author_rank: Frequent Contributor
timestamp: December 06, 2021, 04:58:16 pm
content: I'm currently testing various ways to pulse-desulphate some batteries. As a simple test I hooked up the circuit below with an N-channel mosfet (IRLB3034 40V-~160amp). Driven with a function generator outputting a 15kHz, 14V square signal with 7% duty cycle.This is my crude schematic:The 22V supply voltage goes between batt+ and circuit ground.Unfortunately, at switch off I'm seeing pretty large inductive ringing as you can see below (yellow trace is the Drain). The supply voltage is 22V, but ringing goes up to 37V.The connection between the drain and the battery is about 40cm long and it is about 5mm sq so a pretty thick wire, but still at this speed it has enough inductance to cause this.I planned to use this circuit with much faster switching speeds and voltages (with a driver IC and a different mosfet), but even in this scaled down test device I now have this problem which prevents me from increasing the supply voltage beyond 22V.Could someone suggest some method to stop it, please?Edit: this off-ringing is present at the gate too. So perhaps it is not the connection lead, but something in the gate circuit.Edit2:This is what I'm seeing at the input :-oThe generator is connected with a 1m long bnc to crocodile clips cable clipped to about 20cm of thin wire (not twisted).Any suggestions?Edit4: It seems to be some sort of EMF, perhaps? The ringing goes away when supply voltage is lowered. The higher the voltage (and current across the battery) the higher the ringing.

author: strawberry
author_rank: Super Contributor
timestamp: December 06, 2021, 05:25:26 pm
content: slow down switching edges =>1us and larger heatsink

author: Fflint
author_rank: Frequent Contributor
timestamp: December 06, 2021, 06:23:44 pm
content: Quote from: strawberry on December 06, 2021, 05:25:26 pmSlow down? I need them faster, not slower :-) once I get the driver IC it will be much faster (hopefully). This is just a smaller (and slower) experiment.I've added an electrolytic cap (1000uF across the supply). The overshoot went down to only 0.5V allowing me to use higher voltage. However, the ringing is still there, the cap seems to be heating up and the average current consumption went up. Perhaps I need a big battery of caps across the input voltage.

author: strawberry
author_rank: Super Contributor
timestamp: December 06, 2021, 07:44:37 pm
content: Quote from: Fflint on December 06, 2021, 06:23:44 pmwonder why? battery inductance, diode reverse recovery, capacitor inductance, wire inductance, ...

author: Fflint
author_rank: Frequent Contributor
timestamp: December 06, 2021, 08:41:22 pm
content: Quote from: strawberry on December 06, 2021, 07:44:37 pmYes, I wonder too.I really suspect wire inductance. Even in this scaled down version I expect peak currents up to a hundred amps. I suspect with such currents connection leads that are 40cm long (5mm.sq cross section, close to AWG21) have enough parasitic inductance to require own flyback diodes...I know for a fact the lab PSU I'm using has much more than 1000uF across its voltage supply rail, but still adding that 1000uF capacitor made a big difference in voltage overshoot. When I supply 18V I have only 0.5V overshoot. With 22V I get 2V overshoot. Previously it was 15V. I can also feel the capacitor (and its leads) get hot. The inductance of the connection leads must be affecting it.This is, however, just a guess. I was hoping for someone experienced in high frequency, high current switching to comment.

author: Fflint
author_rank: Frequent Contributor
timestamp: December 06, 2021, 09:15:03 pm
content: This is the circuit including the extra capacitor and Parasitic inductances in correct places.Diodes shown as one are actually 3 diodes in parallel.

author: strawberry
author_rank: Super Contributor
timestamp: December 06, 2021, 10:37:55 pm
content: lossy element

author: Fflint
author_rank: Frequent Contributor
timestamp: December 06, 2021, 10:54:32 pm
content: I think it is gate oscillation triggered. I swapped 470 ohm resistors at the gate for 220ohm ones and ringing went down very significantly :-)Edit: Well, it appears this is more complex than I initially thought. Some batteries ring more than others! Also, there seems to be a voltage threshold below which the ringing is much more pronounced, then it goes down. The value of that threshold depends on the battery (perhaps state of charge too). Interesting.

author: CaptDon
author_rank: Super Contributor
timestamp: December 07, 2021, 12:35:10 am
content: Why do you feel the need to switch at such high frequencies? Anything over 1khz is a waste of time for desulphating. Your battery is not just a battery but also a big electrolytic capacitor and looks like a dead short to high frequencies. Also, don't most desulphating schemes include not only a charge path during the conduction phase, but also a discharge path of about 30% of the charge path during the non-conducting phase of the mosfet/transistor with a duty cycle of 50/50 charge/discharge?? All of this has been tried before and even a 'win' is only a marginal win. A polished turd is still a turd and I would never want one of those installed in any critical equipment like a U.P.S. or something medical grade, or the starter battery in my boat as I am drifting toward the falls with a dead engine screaming "Why didn't my cheap ass just by a new battery??" Those high frequencies DON'T act like an ultrasonic scrubber as some think they do. Those plates would shudder and shake better at their self resonant mechanical frequency of a couple of hertz.

author: strawberry
author_rank: Super Contributor
timestamp: December 07, 2021, 05:35:13 am
content: lossy RC network to damp LC tankdont know if particular battery is dead short for 45kHz but capacitative load is bad for transistors (voltage / ESR = ~collector current)batteries have much higher ESR than capacitorsposible drive MOSFET gate with bipolar source +/-15V and single resistor

author: Fflint
author_rank: Frequent Contributor
timestamp: December 07, 2021, 09:46:16 am
content: Thank you both for the replies :-)Quote from: strawberry on December 07, 2021, 05:35:13 amI think the transistor would let the smoke out immediately if the battery was a dead short (or close to it). Also one can observe the voltage drop on the battery to estimate what's happening.I've inserted a diode in the driving circuit to protect my function's generator input in case the mosfet fails shorting the gate to the drain. That's why I have to use positive drive only.Where would you put that lossy RC network on my schematic? I tried few places with not much joy. The biggest change happened when I swapped 470 ohm for 220ohm resistors at the gate.Quote from: CaptDon on December 07, 2021, 12:35:10 amI only found out yesterday 500Hz to 1500Hz repetition rate is used in another "industrial quality" circuit. I previously read somewhere the way those desulphators work is by exciting a resonance frequency of those sulphate crystals that is between 1MHz~5MHz. So to achieve useful amounts of power. (harmonics etc) in this range I thought one needs to switch pretty frequently with as steep of a slope as possible. I'm not so sure any more about the above.Today I'll try 500Hz~1500Hz with duty cycle of around 0.1%.Regarding the periodic discharge pulses during charge, so called reflex charging or burp charging I think the technique is sufficiently debunked (see further explanation and details of scientific studies herehttp://www.batterypoweronline.com/images/PDFs_articles_whitepaper_appros/Powerdesigners.pdf)Regarding "a polished turd etc" I generally agree with the sentiment, but:- there are so many claims of miraculous recovery of 50% (or more!) of capacity- I already have a number of dead or dying lead acid batteries- I very much like the idea of squeezing extra life from batteries.- I like the idea of lead acid battery technology. It is simple to manufacture in small facilities. The technology can be made to be green providing people making and recycling those batteries actually care about it. Look at this for example.https://youtu.be/9vdvDgjes78Please disregard obvious health&safety&environmental issues. I'm just showing how lead acid is the only battery tech that can be made from scratch in "Low tech" setups therefore it is available to almost anyone anywhere in the world. Improving the lifetime of those batteries can have huge cumulative impact on the environment / people's lives etc.All of the above, and lack of properly done scientific studies that would prove or debunk the "pulse desulphation" makes this a worthy cause to explore.Regarding, your final statement about ultrasonic scrubbing. I didn't think of it, but it is an interesting possibility :-) if I lower the frequency into audible range (for me around 6kHz) I can hear the battery. The amount of instantaneous power in those pulses it pretty high. Is it that far fetched to imagine the battery cells act as little transducers and actually do "ultrasonic ally scrub plates"? I don't know. I would love to.I wish people that did the experiments already publish their results in detail rather than "if it is not completely dead it might restore, or not". What repetition rate, duty % and voltage was used, for how long? What were battery conditions before (tested capacity, voltage, internal resistance etc). How long was the process run, what happened later, or what other techniques were also used on same batteries? All this info is skipped.Pictures of sulphates batteries exhibiting pretty clean plates are 100% meaningless. In my magnesium sulphate testing (a chemical method of restoration) all, even the worst batteries look marvellous after few days. They still have under 10% CC A and capacity, but you wouldn't be able to tell a difference between them and a new one by the way plates look.I suspect it is because the chemicals act on the surface of plates first, while 99% of surface area is in the pores.

author: Fflint
author_rank: Frequent Contributor
timestamp: December 08, 2021, 12:32:46 am
content: Also the circuit I'm using (shown few posts up - including parasitic inductances) seems to be destroying mosfets. It doesn't happen during operation. I had it run for almost 24h with various batteries and twice I had a mosfet failure on disconnecting/reconnecting or powering off/on. I'm not sure which event caused it.In every case the circuit has been pulsing happily for hours, then I switched off the generator's output, then I switched off the supply voltage. Finally I disconnect the battery and I bring a different one. I reconnect another battery (I get a spark for some reason, but why?) I switch the supply on, then the generator. No current flows the mosfet is dead.When a new battery is connected the generator is off, the mosfet should be off too. There is a resistor that connects the gate to ground. There is that 1000uF capacitor that supplies some voltage in absence of main supply, but unless some potential appears on the gate it shouldn't matter. Also the mosfet I use is rated at 1200pulsed amps. I find it strange a single pulse from a 1000uF cap across a battery can fry it. Still, it happened twice.Since then I've been using a different procedure to turn off and on. I have been lowering the supply voltage until there is almost no current. Then I switch off the generator, the supply. And before the battery is disconnected the 1000uF cap is shorted. So far it hasn't happened again.Any ideas?

author: strawberry
author_rank: Super Contributor
timestamp: December 08, 2021, 06:38:58 am
content: https://eu.mouser.com/c/circuit-protection/esd-suppressors-tvs-diodes/

author: Fflint
author_rank: Frequent Contributor
timestamp: December 09, 2021, 01:33:54 pm
content: Thanks. I'll try one of them.

author: Terry Bites
author_rank: Super Contributor
timestamp: December 09, 2021, 05:55:01 pm
content: You need a snubberhttps://www.ti.com/lit/pdf/slua831?keyMatch=SLUA831

author: strawberry
author_rank: Super Contributor
timestamp: December 09, 2021, 06:08:59 pm
content: RCL lossy resonant elementor RCD clamp similar operation to TVS diodes

author: Fflint
author_rank: Frequent Contributor
timestamp: December 10, 2021, 02:33:55 pm
content: Quote from: Terry Bites on December 09, 2021, 05:55:01 pmQuote from: strawberry on December 09, 2021, 06:08:59 pmI don't think this "mosfet dying" problem has anything to do with ringing. If it was the mosfet would die during operation, not once I've stopped the driving generator, I disconnected the power supply, and then upon reconnecting to a battery (no drive no power yet). There is a spark. That spark can happen only if the current flows into the capacitor (only one on the schematic) via the mosfet that should be off at the time. The capacitor(and a diode in reverse) is the only thing that ties the battery + and - together in absence of the external power supply.I've obtained some TVS diodes and I'll incorporate them in the circuit. I think it is good to have overvoltage protection, but I'm not convinced it is going to solve this problem I'm having.For any current to flow when the battery is connected, before drive and supply voltages are started the mosfet has to be conducting so I suspect the generator maybe was stopped when the waveform was high and kept the output high? It is pretty unlikely. When I switch the output off, I want it off, not waveform paused at whatever level it happens to be. It is a cheap Chinese generator, but I find the idea incredible. If I encounter the situation again I'll definitely test the voltage on the generator's output.Still my only idea (other than a genuine ESD) is that somehow occasionally the mosfet is in conducting state during connection of the battery which sends large current to the cap(if discharged).I'm planning to simulate the circuit so I'll try simulating the situation and I'll see if this sheds any extra light on the situation.

author: strawberry
author_rank: Super Contributor
timestamp: December 10, 2021, 05:17:58 pm
content: signal generator overshoots when power cycle? or some grounding problemif gate voltage above 20V possibility is high10nF gate capacitance should be relatively immune against ESD

author: Fflint
author_rank: Frequent Contributor
timestamp: December 11, 2021, 12:03:21 am
content: Quote from: strawberry on December 10, 2021, 05:17:58 pmThe maximum gate voltage is 20V for the mosfet :-)Grounding should be good, because when the supply voltage is turned off it is done with a button on the lab PSU rather than physically disconnecting cables. The minus of the psu is connected to its ground lug.The generator's negative side is connected to the same ground the PSUs minus and ground. Same as with the PSU the generator's output is switched off with a button.Both devices (psu and the generator) are connected to one of 3 ac circuits that have their neutrals and grounds bonded just 5m away in an electrical panel(it is a small building). It is puzzling.Perhaps the mosfet dies not when that spark happens on reconnection of the battery but earlier, when the power, or the generator is turned off. Perhaps the generator sends an overvoltage pulse to thd gate? If that's the case the problem will resolve itself in the next version of the circuit. The mosfet will be driven by a driver IC.