Optocoupler feedback for a dual power supply and over current protection? - Page 1
Forum section: electronics / beginners

author: Herschel
author_rank: Regular Contributor
timestamp: August 16, 2024, 05:10:24 pm
content: So i was making an SMPS dual powersupply for a 5.1 hometheater system, which could output a ±40 volts with a SG3525 and IR2110 mosfet driver combo.Is there any way to add an optocoupler feedback to both +ve and -ve rails of the power supply?The circuit already has a feedback circuit, but its only for the +ve rail of the powersupply. So does the -ve rail voltage drops when its loaded?Also, does the SG3525 have an over load/current protection? and how can I add it to my circuit?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 16, 2024, 10:36:36 pm
content: There are better ways, and better schematics to pull from.The most fundamental issue is voltage-mode control. There's... really no compensationat allhere, it's just a resistor into an opto into the controller. Whatever the actual gain and response, the LC output filter is contained in the loop, and it's very easy to oscillate with that. Maybe it would, maybe it won't, but there'snot even any awareness[in the schematic] that it could be an issue, to provide some means to adjust it.Joint regulation, is simple enough by doubling the zeners and wiring it +/-, but clearly there is no degree of freedom to control both independently -- or limit their current. The transistors simply explode if overloaded. The thing only starts up at all because of the generous soft-start capacitor, but an overload at the output, or restarting before CSS has discharged, will prove fatal.These ancient voltage-mode controllers are easy enough to run current-mode. Simply read the average output inductor current (since this is isolated, a Hall-effect sensor might be used) and close the loop on that. Thus the controller reads an input voltage and delivers a target output current; it's a gm (transconductance) amplifier. Set that voltage by opto, and use a TLVH431 to regulate output voltage. This accomplishes two things: 1. output currentcan never be higher than the setpoint, as long as the controller is regulating and not just completely busted; 2. the output LC poles are split, handled by separate loops, independently compensated. The resulting overall system bandwidth can be higher than 1/sqrt(LC), breaking the limitation that voltage-mode feedback has. (This might still end up rather slow due to the opto's response -- a bandwidth of a few to 10 kHz is typical for even "high speed" optos in cascode connection at ~2mA. This limitation will most likely dictate output capacitor minimum value.)A buck-style illustration (and much of the same discussion repeated) can be found here:https://electronics.stackexchange.com/questions/718765/tl494-step-down-converter-with-cc-cv/718770#718770A forward converter is just a transformer-isolated buck, so all the logic applies.Since you have two potentially-independent outputs, two independent controllers are required. Basically, double up the circuit. Annoying to build, but the reduction in power component size saves a little cost; it's less than double, but more than zero added.Alternatively, total load current can be measured with a combined sensor (sense +/- inductor currents and add their magnitudes). This isn't so easy to find among SO-8 style Hall sensors; you can use two and sum their signal outputs, or you can use a THT multi-winding or open-loop style sensor, and just loop through or wire up whatever connections are needed. The output stage (transformer, rectifiers, capacitors) must be rated to handle full (current limit) output into one load, i.e. double rated, to survive the potential fault condition here -- but diodes are fairly cheap, so this should be easier to provide than outright doubling up the circuit.A hiccup-mode fault behavior wouldn't be a bad idea to implement, either. This isn't trivial with these old controllers, but a modern self-powered one typically implements it by nature, or by internal state machine. Then you don't even need the overrated output section, the controller shuts down before much of anything heats up.Current can also be measured at the primary side, but be careful: obviously, you only know secondary current while the inverter is active (during a pulse). The controller can't read the current inbetween pulses. A peak detector circuit might be used, but be careful that leading-edge peaks (diode recovery + transformer ringing) are filtered out, and use a decay rate fast enough that the inductor current is being read reasonably correctly from cycle to cycle, at a similar rate that it can vary in the inductor(s) themselves. (Thus, a low ripple fraction is preferred, i.e. use relatively generous inductances. This is desirable anyway, as such circuits can use cheap powdered-iron cores for the inductors, and low ripple fraction saves on core loss.)I have an old example of that here,(Ignore the bottom-left section, and the specific ratings. If you're curious, this was for a vacuum tube oscilloscope, hence the wide range of voltages.) Notice the 1:50+50 current transformer, burden resistor, and peak detector. As I recall, this was still rather crude: for one, there's no compensation from pin 3 to 15, but also the dynamics of the peak detector itself aren't good, and chaotic behavior resulted. (It's also voltage-mode feedback, positive sense only, so has all the problems identified above.) This, among other issues, led me to drop the design, and move to a flyback converter instead. (Also, the inductive-clamped gate drive is terrible, don't use it, lol.)Tim

author: Herschel
author_rank: Regular Contributor
timestamp: August 17, 2024, 12:12:34 pm
content: I did found a way to add an overload/short circuit protection in to my circuit. I have seen a very similar circuit to this before while repairing an old smps. It used an unknown 8pin chinese ic...and this circuit detects load on the mosfets in primary high voltage part of the smps and this circuit seems to work fineAlso I think using a TL494 makes the circuit much more complicated and I have to modify the power transformer plus add another driver transformer to drive the mosfets...For me the short circuit / overload part is solved"Since you have two potentially-independent outputs, two independent controllers are required. Basically, double up the circuit." so repeat the same feedback circuit two times for the negative voltage?

author: David Hess
author_rank: Super Contributor
timestamp: August 17, 2024, 01:45:34 pm
content: Quote from: T3sl4co1l on August 16, 2024, 10:36:36 pmThe compensation capacitor at the transconductance output, pin 9, seems awfully large, so I think the designer went for brute force dominant mode compensation. That will work, but severely limits bandwidth of the control loop for worse line and load regulation at higher frequencies. This would also produce a lot of overshoot during startup without soft start.I am not sure why they did not add some phase lead at pin 9. Maybe the designer was an amateur?Quote from: Herschel on August 16, 2024, 05:10:24 pmSometimes multiple output regulators take feedback from multiple outputs and sort of average them. The optocoupler could be connected across both output supplies, and the two zener diodes doubled up in series, to regulate the total output voltage of 82 volts.QuoteAssuming that the controller is operating in continuous conduction mode, the unregulated output voltage is fixed by the duty cycle without feedback, minus various losses which depend on current. So it does drop more when loaded, and increase when the other outputs have greater loads, but in an audio application it should not be significant. Audio applications should not require tightly regulated supply voltages.QuoteNo, the SG3525 lacks a second error amplifier for current control. The TL494 that T3sl4co1l uses in his example has two error amplifiers with combined outputs to support independent voltage and current regulation. I think there is a dual amplifier version of the SG3525, but I do not remember the part number, and of course it has to use a different pinout.Current control could be added to the SG3525 by pulling down pin 9, which is how the TL494 does it, but this would require adding an external error amplifier.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 17, 2024, 02:03:04 pm
content: Quote from: Herschel on August 16, 2024, 05:10:24 pmThat would require a significant redesign.As long as you have a single transformer (and thus a single primary winding) you can not control the outputs independently.You could add two feedback circuits parallel to each other. This may be (marginally) useful if you don't know which of the secondary windings will have the heaviest load. Secondary voltage sags because of copper resistance, so the lightest load will have a slightly higher output voltage. Two parallel feedback circuits would limit the output voltage based on the lightest load current, instead of always on the same secondary winding.

author: Herschel
author_rank: Regular Contributor
timestamp: August 17, 2024, 05:13:30 pm
content: ok, the overload/current limiting circuit that i have found actually works fine!, but when I wired the transformer in dual supply configuration, the power rail connected with the feedback optocoupler outputs the desired 41.3 volts but the other rail (-ve, not connected with the feedback) just produces 27volts, but not 41.3volts.Does connecting the optocoupler, the way shown in the image works?Quotedoes this actually work? the image shown does the same configuration but with two optocouplers?

author: Herschel
author_rank: Regular Contributor
timestamp: August 18, 2024, 04:00:19 am
content: Quote from: Herschel on August 17, 2024, 05:13:30 pmI solved this issue, Its because of the output line filter i used,which had different no. of turnes of copper wire, started to oscillate. I got the line filter from a computer powersupplyDoes connecting the optocoupler, the way shown in the image works?[ Attachment Invalid Or Does Not Exist ]Quotedoes this actually work? the image shown does the same configuration but with two optocouplers?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 18, 2024, 05:47:22 am
content: Quote from: Herschel on August 17, 2024, 05:13:30 pmI don't know what they're doing there, but it seems that they wanted a variable resistance sort of connection. That is, current into the feedback resistors biases the LED, which biases the output phototransistor (and controller), and is cascoded into a feedback opto LED, the phototransistor of which shunts the first LED. So current into the LED is opposed by current from the other opto, a negative feedback loop. But the amount of feedback is variable with a resistor, which in turn offsets the setpoint.The loop gain is very low, so the output voltage regulation will be pitiful. There's no manufacturing tolerance, both optos' CTR can vary by a factor of 2 or more, and thus the transfer gain (and impedance).Better to use a TL431 or other local error amp, so that opto current is controlled to whatever is required, removing that variable (CTR) from concern -- or rather, solving for it automatically.Tim

author: David Hess
author_rank: Super Contributor
timestamp: August 18, 2024, 12:09:41 pm
content: Quote from: Herschel on August 18, 2024, 04:00:19 amOf course it would work. It would be regulating the total of the two supplies rather than one of them while leaving the other unregulated.I do not understand how the two optocoupler version shown is suppose to regulate the output voltage.

author: Herschel
author_rank: Regular Contributor
timestamp: August 19, 2024, 05:37:15 am
content: Quote from: David Hess on August 18, 2024, 12:09:41 pm"I do not understand how the two optocoupler version shown is suppose to regulate the output voltage."I don't know either, but I found it here:https://320volt.com/en/2x30-volt-6-amper-smps/anyway, if ths circuit worked, how does it balance the ground voltage under load or is it balanced by how i made the transformer?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 19, 2024, 05:52:44 am
content: Yes, transformer winding matters. The inductor can also be coupled to help out some.Tim

author: David Hess
author_rank: Super Contributor
timestamp: August 19, 2024, 08:09:53 am
content: Quote from: Herschel on August 19, 2024, 05:37:15 amThe balance becomes unregulated in the same way that the negative rail was unregulated before. The transformer itself now balances the outputs.

author: Herschel
author_rank: Regular Contributor
timestamp: August 19, 2024, 01:44:58 pm
content: Quote from: David Hess on August 19, 2024, 08:09:53 amSo, does the -ve/+ve voltage ratio changes under load ? i.e if I loaded the +ve terminal, does the voltage increase at -ve terminal and reduces at +ve terminal making the overall output voltage same?

author: David Hess
author_rank: Super Contributor
timestamp: August 19, 2024, 06:05:14 pm
content: Quote from: Herschel on August 19, 2024, 01:44:58 pmThat is right; the total voltage is regulated, but the ground shifts one way or the other depending on the difference in load between the positive and negative outputs.But that was already the situation when only one side was regulated and it was the total voltage changing with load.

author: Herschel
author_rank: Regular Contributor
timestamp: August 20, 2024, 05:19:20 pm
content: "That is right; the total voltage is regulated, but the ground shifts one way or the other depending on the difference in load between the positive and negative outputs.But that was already the situation when only one side was regulated and it was the total voltage changing with load."so is it possible to add two feedback circuits to the same smps controller circuit, by using two opto couplers...? so each of the outputs can be controlled at the same time?

author: David Hess
author_rank: Super Contributor
timestamp: August 20, 2024, 08:46:14 pm
content: Quote from: Herschel on August 20, 2024, 05:19:20 pmNot in a transformer isolated design because the transformer flux must remain balanced.Linear or magnetic amplifier post regulation could be added. I suspect at that point a different switching regulator arrangement would be a better solution.

author: Herschel
author_rank: Regular Contributor
timestamp: August 21, 2024, 06:12:26 am
content: [ Specified attachment is not available ]So, in this circuit how do they adjust the output voltage? I found this circuit for a voltage boost converter from a class AB sony car audio amp

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 21, 2024, 06:32:52 am
content: They don't. Open loop design, no control. Only works by circumstance -- slow startup and robust transistors to absorb inrush, and a fault on the output (amplifier) just takes out the whole fuckin' thing, who cares, it's a non-repair item, toast is toast.Tim

author: David Hess
author_rank: Super Contributor
timestamp: August 21, 2024, 05:15:16 pm
content: Like T3sl4co1l writes, the output voltage is not adjustable. It is an inverter so the output voltage is a fixed multiple of the input voltage. Like I said, audio power amplifiers do not and should not generally require regulated supplies.

author: Herschel
author_rank: Regular Contributor
timestamp: August 22, 2024, 11:25:12 am
content: after a loong time of pocking around, i found out there is only needed to controll the +ve rail of my powersupply. But there is a problem, I have regulated the +ve voltage as usual but the -ve voltage is higher by 4 to 5 volts(44 to 46 volts) and it reduces to 41.4 volts, i.e the same voltage as the regulated output from the +ve rail when I load it a bit. I solved it by adding a zener across the -ve railas soon as I added an inductor (line filter), the regulated output (+ve) was doing great, BUT the voltage at -ve rail went upto 55v and now when I tried to add the the zener, the zener just got burnt. so is there any way to prevent that. does using this circuit solves that?and still if I load the unregulated part i.e -ve rail, the voltage just drops even when connecting a 3volt led