SG3525 PWM controller OCP cell - Page 1
Forum section: electronics / general

author: ym58
author_rank: Regular Contributor
timestamp: January 28, 2023, 09:02:24 am
content: How does that cell work exactly ?Does it produce some kind of delay (47uF/220nF ?) to the 'dis' output once a current limit has been reached on R9 (current sense) ?I am myself triggering OCP thru a sense resistor in a Meishile 1000W/12V/87A SMPS (that I want to limit to 50A) but my OCP feedback cell is much simpler than this one (I am using an opamp comparing the voltage across the current sense resistor to a REF voltage then sending a HIGH signal to the shutdown input if Vshunt > threshold) and it works as far as current limiting is concerned.But my cell keeps inducing an annoying'click-click-click'sound somewhere within the SMPS !--Will such a cell prevent this drawback ?

author: jonpaul
author_rank: Super Contributor
timestamp: January 28, 2023, 12:40:41 pm
content: the overcurrent sense is designed to shut down the 3525, and after a dealy timeout to restart.This creates a periodic start, stop cycle upon overload, very common technique especially in the 1980s ancient 3535 SMPS controllerJon

author: ym58
author_rank: Regular Contributor
timestamp: January 28, 2023, 01:27:25 pm
content: Yes, that's what I thought ...A few questions though :- Aside from the R9 value which is not quite convenient to source and swap (vous en conviendrez), do you have any idea wherewithin the cella threshold adjustement could be implemented (I am thinking of making one of the 2.2K resistors adjustable but maybe I am mistaken) ?- How does exactly work thedelay-before-restartfunction, which capacitor (and resistor) are involved in the timeout process (and calculation) ?- What's the use of thediode(not the Zener one !) ?- Where possibly does the'click-click-click'I mentioned in my OP come from ?Merci.

author: Njk
author_rank: Frequent Contributor
timestamp: January 28, 2023, 08:29:26 pm
content: Quote from: ym58 on January 28, 2023, 01:27:25 pmI think you'll get the answer sooner if you change the picture adding reference to every component of the "OCP cell" circuit (like R1, C1, etc.)

author: jonpaul
author_rank: Super Contributor
timestamp: January 28, 2023, 10:35:14 pm
content: click....magnetostriction of transformer and magnetscs at START><OVERLOAD><Shutdown.Repeats about 1/sec..1/5 secVery typical, see Tektronix scope PSU repairsj

author: xavier60
author_rank: Super Contributor
timestamp: January 29, 2023, 03:25:21 am
content: For OCP or current limiting circuitry to work properly, any leading-edge voltage spike at the CS resistor needs to be filtered out. That will be the purpose of the 2.2K/220pF RC filter. A crude but stable method of current limiting I have used with SG3525 is to simply connect the RC filter to the Base of a BC548 or similar. Emitter to ground.Connect its Collector to the Soft Start pin,8. Put a 100Ω resistor in series with the Soft Start capacitor. When current limit is reached, pulse-by-pulse limiting will first occur, then transition to stable PWM as the Soft Start capacitor discharges.The idea can possibly be refined using a comparator and reference.

author: ym58
author_rank: Regular Contributor
timestamp: January 29, 2023, 04:25:28 am
content: Quote from: Njk on January 28, 2023, 08:29:26 pmGood idea ...done!

author: ym58
author_rank: Regular Contributor
timestamp: January 29, 2023, 04:29:00 am
content: Quote from: jonpaul on January 28, 2023, 10:35:14 pmWell ... thanks!And what about my other questions ?

author: ym58
author_rank: Regular Contributor
timestamp: January 29, 2023, 04:50:23 am
content: @xavierVery constructive and meaningful answer ... thanks!I need a clarification though : you wroteQuoteI realized that my red arrowhead was masking the PWM controller pin the OCP cell is connected to (see my original post, I've changed it).Actually it is connected topin 10which is ashutdowninput, isn't it this input that you meant rather than the softstart input, pin 8 ?

author: xavier60
author_rank: Super Contributor
timestamp: January 29, 2023, 05:37:49 am
content: A High on pin 10 or Low on 8 for shutdown and also for pulse-by-pulse limiting.Extra: Analog voltage on 8 can take control of PWM.What is the nature of the load?

author: ym58
author_rank: Regular Contributor
timestamp: January 29, 2023, 09:13:18 am
content: LFP4/150Ah(and higher capacity).I need to monitor and control the output current coz such batteries may induce a high current demand when connected initially as they can accept charging currents as high as their capacity (BMS permitting) ... I've fried two times the 2xW45NM60 mosfets, don't want to repeat it anymore!

author: xavier60
author_rank: Super Contributor
timestamp: January 29, 2023, 09:34:38 am
content: The W45NM60 are a big improvement over the originals which were being pushed close to their limits. I don't like seeing large MOSFETs being driven directly by the SG3525 but we won't worry too much about that for now.Under what circumstances did the W45NM60 fail? That original OCP cell should provide more than adequate protection and should always be left functional.

author: ym58
author_rank: Regular Contributor
timestamp: January 29, 2023, 09:58:04 am
content: Quote from: xavier60 on January 29, 2023, 09:34:38 amThat's the point, shame on me ... during some testing I did with my own OCP, I left it disconnected, assuming that 3-5 seconds with high current output won't do any harm to the mosfets ...NADA!I think I shoud have put two fuses in the mosfets drains, at least during the testing period ...

author: xavier60
author_rank: Super Contributor
timestamp: January 29, 2023, 10:14:00 am
content: With the original OCP cell left functional, hopefully any extra current limiting circuitry should not be able to cause damage.You could try something simple at first. The added transistor I explained earlier with a 1K/470pF RC filter on the Base fed from the top of the CS resistor. Put the 100Ω resistor from Collector to pin 8. The current limiting transistor needs to act at a lower current than the OCP cell. Add some positive bias to the Base by connecting a resistor from the Ref 5V to the Base. Try a 22K first up.Even if the OCP cell trips due to a sudden overload, the idea is for current limiting transistor to take control as the Soft Start gradually ramps up the PWM during the proceeding restart.

author: ym58
author_rank: Regular Contributor
timestamp: January 29, 2023, 06:10:12 pm
content: @xavier60Well, actually it's a bit more complicated than that ... let me explain real quick.The schematic that I posted in my OP is something that I've foundhereandthere.Starting from there, I just wondered if I could adapt this type of cell to the current PSU I am working on !The PSU I am working on is based on a half-bridge topology and, actually, there is no RS (shunt for sensing current) in the source of the bottom Mosfet, nor in the ouput DC stage of the PSU !However, there is a small transformerT3"before" the AC/DC final transformer (T4) and IMHO thisT3senses the current by ways of a rectifier that feeds theshutdownpin of the SG3525 through a simple transistorQ1(no RC filtering).That's something I am not really familiar with ... needless to sayI am currently doing some reverse engineering on this PSU (not completed yet, but I think it will be done by t'row !) but so far here's what I have been able to find ... I think that the circle named9is the key issue and, as you can see, it only involvespin 10(shutdown) of the PWM controller :

author: xavier60
author_rank: Super Contributor
timestamp: January 29, 2023, 08:29:24 pm
content: What's connected to the Soft Start pin 8?

author: xavier60
author_rank: Super Contributor
timestamp: January 29, 2023, 09:06:34 pm
content: Does this PSU current limit rather than shut down? It looks like it should. Bridging the diode connected to R13 should cause a drop in limited current.Or increase the 33Ω resistor.

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 02:50:43 am
content: @xavier60No diode connected to R13, that was just an arrow!R13 (which value is finally 10R and not 100R) is directly connected to the rectifier though (D4/D5/D6/D7) and also to R7 which value is 3.3RTheSoft Start pin#8is connected to a simple C6 100nF capacitor ... reason why I keep thinking Meishile (manufacturer) handles the current limiting function through theShutdown pin#10, but I don't quite understand'HOW'it works!I've redrawn the thing for you :

author: xavier60
author_rank: Super Contributor
timestamp: January 30, 2023, 03:09:11 am
content: The end result is kind of the same. Try increasing R7 to about 5Ωto check for effect. Double check that R7 is likely to be 3.3Ω by measuring it.Im assuming that the PSU is already capable of smooth current limiting? no rattles or squealing.What bothers me a bit is that primary snubber current is also being sensed, adding to leading-edge-spikes.From the Osemi's data PDF,https://www.onsemi.com/pdf/datasheet/sg3525a-d.pdf"An alternate approach is the use of the shutdown circuitryof Pin 10 which has been improved to enhance the availableshutdown options. Activating this circuit by applying apositive signal on Pin 10 performs two functions: the PWMlatch is immediately set providing the fastest turn−off signalto the outputs; and a 150 A current sink begins to dischargethe external soft−start capacitor. If the shutdown commandis short, the PWM signal is terminated without significantdischarge of the soft−start capacitor, thus, allowing, forexample, a convenient implementation of pulse−by−pulsecurrent limiting. Holding Pin 10 high for a longer duration,however, will ultimately discharge this external capacitor,recycling slow turn−on upon release."

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 03:16:56 am
content: "primary snubber current" ... ?"a 150 A current sink begins to discharge the external soft−start capacitor" ... actually C6 is a micro-SMD decoupling-type cap, in no ways could it stand a 150A discharge current !

author: xavier60
author_rank: Super Contributor
timestamp: January 30, 2023, 03:46:47 am
content: Quote from: ym58 on January 30, 2023, 03:16:56 amThe "150µA" didnt copy and pasted properly. It's on page 3 of the data PDF.

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 05:57:51 am
content: Can you believe that ?Now I understand why I kept blowing MOSFETs !!!

author: xavier60
author_rank: Super Contributor
timestamp: January 30, 2023, 06:15:32 am
content: There is no standard value for CT load resistors. It all depends on the CT turns ratio. 3.3Ω seems unusually low. Any idea what it originally had?

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 07:20:26 am
content: 3.7R means the resistor isFAULTYfor it should be a33R(orange-orange-black) !It means that the current measurement was definitelyunderestimated ... I will replace it with a valid33Rfirst then increase it step by step until I get my targeted lower current limit ...I will re-post to report the testings.

author: xavier60
author_rank: Super Contributor
timestamp: January 30, 2023, 08:18:33 am
content: Quote from: ym58 on January 30, 2023, 07:20:26 amThere appears to be a band after the black? The brown at the end is likely the 1% tolerance. It's very unlikely that a faulty resistor would drop from 33Ω to 3.3Ω.

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 08:40:40 am
content: Quote from: xavier60 on January 30, 2023, 08:18:33 amSilver.Quote from: xavier60 on January 30, 2023, 08:18:33 am3.7Ω not 3.3Ω !Unlikely but not impossible, apparently

author: xavier60
author_rank: Super Contributor
timestamp: January 30, 2023, 09:37:22 am
content: This calculator says it's 3.3Ω for a 5 band resistor.https://www.calculator.net/resistor-calculator.html?bandnum=5&band1=orange&band2=orange&band3=black&multiplier=silver&tolerance=brown&temperatureCoefficient=brown&type=c&x=56&y=20

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 10:16:10 am
content: Quote from: xavier60 on January 30, 2023, 09:37:22 amDamned, you were right !How come Meishile has chosen such low values for R7 whereas they could have changed the winding turns of T3 instead !With such a low value, how can you possibly bias Q1 with precision and hence adjust the current limit precisely ?To me the current protection cell made withT3+rectifier+R7(3.3R) +Q1+R13+R8+R2is a piece of s...---By the way, I just cooked my two last Mosfets, trying different values for R7.I ordered 10 pieces in China but I will have to postpone my further tests.That's not my day ...

author: xavier60
author_rank: Super Contributor
timestamp: January 30, 2023, 10:55:02 am
content: What were the operating conditions when the MOSFETs failed? Id expect that the charge current can be increased gradually by starting at a lower output voltage.When MOSFETs fail violently, it's common for the Gate resistors and other drive components to be damaged which if isnt fixed will result in a short life for the replacement MOSFETs.Even if the current limiting isnt working, no damage should occur until the PSU is actually overloaded.

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 11:24:12 am
content: Actually, I assumed (mistakenly, now we know !) that R7 was a 33R at the first place.So to decrease the current limit, I decided to increase the R7 value and I placed a 100R variable resistor in series with it.The initial test value was about 100R (33R + 77R) and the current limit decreased noticeably : an inverter connected to the PSU with a 25A input load was still working properly, but no longer worked on a 50A input load (using water heating resistances, one is 250-300W, the other one 500W).Good point, I thought, but I don't know exactly where the current limit is actually triggering, so I decided to lower R7 again but 'ON-LINE' and connected a 173Ah/12V LFP4 pack load in place of the inverter.The charge current settled to 20-25A or so (way better than the 100A++ that occured yesterday and which led to cook the Mosfets) but increasing the 100R variable resistor did not show any variation of the ouput current to the LFP4 pack ... strangely enoughSo at some point, I decided to remove the 33R resistor and left the 100R variable alone, but I must have screwed up with which way I turned the trimpot (multiturn) and the output current built up again and the MOSFETs fried ...Unfortunately, I had forgotten to place two fuses in the sources of the Mosfets, maybe it'd have prevented the mishap (should the fuses be fast enough ...)

author: xavier60
author_rank: Super Contributor
timestamp: January 30, 2023, 11:49:21 am
content: It's all getting messy now, too many unknowns.With R7 at 100Ω. the current limit should have been a few amps.If I was working on it, I would be using my DSO to get a clear understanding of what's happening.Also Id be checking that the Gate drives are good. Those are very rugged MOSFETs capable of handling very high currents.Poor drive usually results in MOSFETs getting hotter than expected.The signal on R7 has such a low impedance, I dont understand why Q1 is needed.

author: ym58
author_rank: Regular Contributor
timestamp: January 30, 2023, 12:19:49 pm
content: Quote from: xavier60 on January 30, 2023, 11:49:21 amNo real drives PER SE.The SG3525 outputA (11) and outputB (12) drive the gates of the Mosfets thru a set of diodes and a small dual transformer T1, then two 220R resistors and that's it !I will continue to reverse-engineer the PSU but it's a bit tough coz all the PWM and feedback section stand on a quite small piggy-back board.There is still another circuit (8327B, on the left of the pic) that I have to investigate on as I don't know what it does ...

author: Njk
author_rank: Frequent Contributor
timestamp: January 30, 2023, 12:29:04 pm
content: Quote from: ym58 on January 29, 2023, 04:25:28 amWell, the theory is quite simple. When the SMPS is operating normally (no overcurrent), T20 and T21 are both closed (not conducting current), so the "dis" output signal is not asserted (is at GND level). In the case of overcurrent, the current sensor voltage at "lim" input became high enough to open T21. It opens and that, in turn, causes T20 to open. Because of that, the "dis" output became asserted (5.1V) causing the SMPS to shut down. Meanwhile, C20 starts charging and that keeps T21 opened even if "lim" signal is no more active. So the C20 charging time determines the pause time. When the charging has finished, T21 closes, T20 closes, "dis" de-asserts enabling the SMPS to start again. Meanwhile C20 starts discharging. D20 speed-ups the discharging to make the OCP cell ready for the next cycle more quickly

author: mikerj
author_rank: Super Contributor
timestamp: January 30, 2023, 02:55:58 pm
content: Quote from: ym58 on January 30, 2023, 07:20:26 amOrange, orange, black,silver, gold is a 3.3 Ohm resistor.

author: ym58
author_rank: Regular Contributor
timestamp: January 31, 2023, 01:40:30 am
content: Quote from: Njk on January 30, 2023, 12:29:04 pmWonderful, thanksIt's now crystal clear for me !Just one point though : what'sC21for, is it just there for decoupling HF spikes ?

author: ym58
author_rank: Regular Contributor
timestamp: January 31, 2023, 01:44:18 am
content: Quote from: mikerj on January 30, 2023, 02:55:58 pmYeah, my mistake ... that's what I realized, afterwards.

author: ym58
author_rank: Regular Contributor
timestamp: January 31, 2023, 02:00:34 am
content: Quote from: xavier60 on January 30, 2023, 11:49:21 amYou bet !Quote from: xavier60 on January 30, 2023, 11:49:21 amMaybe the trick isNOTto play with theR7value to move the current limit threshold but withR8andR2, hence why there is Q1.You're right, I should use my scope & watch exactly what's going on at current limit.The point is to be able to test the cell on several different high-current loads and this I don't have much : only two water heater resistors and nowadays, there's no more high-watt filament bulbs out there except maybe in the deep countrysides of Irak, Burma or Brazil (no offense intended for this guys) !

author: ym58
author_rank: Regular Contributor
timestamp: January 31, 2023, 02:10:23 am
content: Quote from: xavier60 on January 30, 2023, 11:49:21 am

author: xavier60
author_rank: Super Contributor
timestamp: January 31, 2023, 02:30:57 am
content: If you can adjust the output voltage? you can control the battery charge current.Needing a mains isolation transformer, the low-side MOSFETs Gate waveforms should be checked first. Because the design uses no drivebuffering, the waveform is going to be normally messy.

author: ym58
author_rank: Regular Contributor
timestamp: January 31, 2023, 03:23:14 am
content: Quote from: xavier60 on January 31, 2023, 02:30:57 amDuring the CC phase (constant current), I leave the battery dictate the PSU its output voltage and the PSU adjusts consequently (no choice !) while providing the battery the constant current that it's been set for (hence this thread !).I never thought that I could **still** adjust (slightly) the voltage during this phase to modify the current, I need to test that as it's not a normal procedure for LFP4 technology.On top of that, voltage range on LFP4 batteries is quite narrow (mostly from 12V min to 14.6V max, no linearity !).Quote from: xavier60 on January 31, 2023, 02:30:57 amI don't get it, why do I need a mains transformer ?Can you clarify ?

author: xavier60
author_rank: Super Contributor
timestamp: January 31, 2023, 04:00:18 am
content: Quote from: ym58 on January 31, 2023, 03:23:14 amThe suggestion of adjusting the voltage to vary the charge current is for testing reasons.The PSU needs to be powered via an isolation transformer to be able to take oscilloscope readings on the live side.

author: ym58
author_rank: Regular Contributor
timestamp: January 31, 2023, 11:36:47 am
content: Quote from: xavier60 on January 31, 2023, 04:00:18 amYes sure and that's what I had understood but, still, I have to make sure the BMS will like it or not !Otherwise, I will have to disconnect it.Quote from: xavier60 on January 31, 2023, 04:00:18 amActually, since there is a fourth transformer which does not appear (yet) on my schematics, I have to wait until my reverse eng-ing the board is completed before clarifying how the FET gates drive is really handled ...

author: Njk
author_rank: Frequent Contributor
timestamp: January 31, 2023, 04:10:03 pm
content: Quote from: ym58 on January 31, 2023, 01:40:30 amA sort of. "lim" input signal is of square wave. C21 shapes it to a triangle form to prevent false triggering at high (yet acceptable) output current levels

author: ym58
author_rank: Regular Contributor
timestamp: February 02, 2023, 01:49:12 pm
content: Quote from: Njk on January 30, 2023, 12:29:04 pm@NjkSo, if I understood you well, that cell is more an 'OCP' cell than a 'CURR LIMITING' cell, is that right ?By reducingC20, do you think I could make the controller recoverFASTfrom the OCP state, at least fast enough to mimick a 'CURR LIMITING' behaviour that is to keep the current constant at a certain value (dictated by the choice ofR9, e.g.) ?Actually, my point is more to be able to control and adjust theCURRENT LIMITthan the OCP ...(you will find the final PSU diagram in my previous post)