battery charger DIY flyback SMPS output instability and exploding caps. - Page 1
Forum section: electronics / projects

author: Refrigerator
author_rank: Super Contributor
timestamp: June 14, 2016, 06:29:12 pm
content: I'm a bit new to SMPS in general but i decided to make a simple self excited flyback converter for a Li-Ion battery charger.The flyback converter is based on this schematic:http://www.pocketmagic.net/wp-content/uploads/2012/05/simple_smps_3.pngI need three isolated 5V outputs at 1A for a lithium battery charger so i changed the transformer abit.The primary is 38 turns of litz wire while the three 5V secondaries are 5 turns of litz and the feedback is 5 turns of thin magner wire.While i was at it i also added a 12v output with 12 turns of litz.At first i made the opto feedback to work off of the 12 V secondary and it worked out well, it gave me 13.3 volts (12v zener + 1.3V opto) and the voltage kept constant with different loads, i then took a look at the 5V outputs, which were at 4.8V no load but would not regulate at all as the voltage would drop instantly even on light loads, the voltage would also increase if i put load on the regulated output.I then connected the opto to the 5V output with a 5V1 zener and the output regulated well at 6.4V but now the 12V output was at 34V and higher if i put load on the regulated output, which damaged the capacitor on the 12V output.Also the other two 5V outputs were not regulating at all and would drop with a light load and also while the voltage was at 6.3V no load the output 220uF 16V caps ( generic SMD caps from a LG plasma TV ) were getting very hot.But that's not all, after i put the opto back on the 12V output and put a 470uF 16V cap ( ESR was 0.13 Ohm ), which was fine at no load but would get mighty hot under light load and completely blew apart at a moderate 200mA load.More info on my SMPS:The core used was taken from an old CRT monitor ( E-E core ) and is pretty decent in size.The switching MOSFET is a generic one designed for switching ( came from a LG plasma TV ).At no load the switching side stays ice cold.The SMPS operates at about 30kHz.Output diodes are SS110 shottky diodes.The is no snubber network on the primary ( not enough space on proto-board ).The transformer was wound on the original bakelite bobbin.I took care of isolation between windings.Would be used with three TP4056 chargers to charge an internal 3S Li-Ion pack on a portable speaker.The 12V output was intended to power the amp while the batteries were charging.When i was making the SMPS i thought that all the voltages would come from a common magnetic field thus all the outputs should be the same and if one is regulated then all of them are but i guess i was wrong.Then again when i check out other flyback SMPSs that have multiple outputs of them only one is tapped off for feedback which does make me wonder if i should consider winding a new transformer and maybe try to calculate the number of windings instead of eye-balling it.Also i don't know if 30kHz switching frequency is acceptable for a flyback SMPS, most switching IC i see operate at 100-200kHz, i guess the only way to increase the frequency would be to decrease the number of turns on the primary to saturate the core quicker.I would greatly appreciate if anyone who has a bit more experience/knowledge in this could help me out.Thanks.

author: johansen
author_rank: Super Contributor
timestamp: June 14, 2016, 06:32:54 pm
content: rewind the transformer with lower leakage inductance.try winding the 5v winding first, primary on top of that, then the 12 v windings.

author: Buriedcode
author_rank: Super Contributor
timestamp: June 14, 2016, 07:06:18 pm
content: Without knowing the specs of the ferrite I'm surprised it worked at all. Whilst the primary has peak current limiting - a good thing, you can work out the primary inductance, and therefore the Al value of the core, by the switching frequency. That is all assuming its operating 'nicely' as a flyback (current ramp in the primary, peaking at roughly 0.65V/0.22R = 2.95A.Do you have a scope capture from the secondary when it was kicking out 13.3V ? A scope capture of the primary would also be nice but of course, a bit dangerous.I would first measure the Al value of the core, then work from there. The very fact you've built an offline supply implies you're experienced in power electronics and perhaps magnetics, but if you're not, working with unknown ferrites can be extremely hit and miss. The miss being components popping over all the shop.With no scope, it'll be hard to work out whats happening. Although its hardly the same as a real circuit, you could use LTspice, plug in the values you've used, and play around with the inductance values (you can set the secondaries inductance as functions of the primary) until you get your '30kHz'. You would have to add an inductor in series with the primary to add leakage inductance (likely to be on the high side by the number of turns you've used) and reduce the coupling constant in spice.

author: Refrigerator
author_rank: Super Contributor
timestamp: June 14, 2016, 07:46:28 pm
content: Quote from: johansen on June 14, 2016, 06:32:54 pmThanks.How should i position the three 5V windings ? One next to each other or layer the windings on top of each other, maybe wind all three windings at the same time with the three wires parallel to each other, should they be close to the center of the bobbin or away from it?Also should i consider avoiding winding over the gap in the core, since i read that it's the most energy dense spot and can overheat the windings at that spot at high load also in the same paper i read that the switching frequency should be above 50kHz for flyback converters.I read it all here:https://www.ti.com/lit/ml/slup127/slup127.pdfI also have a couple cores, both smaller and bigger than the one i'm using.Quote from: Buriedcode on June 14, 2016, 07:06:18 pmThanks.I've just received my VDS1022 scope a few days ago so i guess it's about time i take some real world measurements with it.Also would it be most appropriate to increase or decrease the amount of turns on the primary to adjust the operating frequency ?This here isn't my first attempt at making a flyback converter, i have made a couple attempts at making a relatively high power flyback, this here is the only one that i dared to plug into the mains without a 1uF cap in series to the mains, who knows maybe the other ones would have worked of i plugged them directly in, of course i do have fuses with common mode chokes and NTCs to be safe.After the first two failed attempts i made a tiny flyback ( based on thishttp://www.pocketmagic.net/wp-content/uploads/2012/05/simple_smps_2C.png) just as a sanity check to see if i can get it to work and it does work well, operates at about 495kHz and regulates well at low currents, can even maintain 2V at 200mA.The transformer was a tiny one, about 2cm3total sizeHonestly i'm not surprised that this works, after all the whole circuit adapts to the transformer and it's saturation determines the frequency, which is why i chose this particular circuit, as long as i don't goof the circuit up i should be fine.

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 14, 2016, 08:16:54 pm
content: Just a quick couple of notes...First is that flyback's pretty much require a clamp across the primary (or the switch). The easiest solution is to use a transzorb (or larger wattage zener to handle the peak current), but an arguably better solution is a properly designed RCD clamp.Pick a transzorb/zener voltage that is at least ~20% higher than the sum of the input voltage and the reflected output voltage (ie - the output voltage times the primary:secondary turns ratio).And while the flyback is theoretically capable of delivering any output voltage at any turns ratio (amp*turns are conserved in flyback "transformers", as they act like multi-winding inductors, rather than conventional voltage transformers), it always helps to pick a reasonable turns ratio. Unless I am designing an offline power supply I like to start with a turns ratio that is approximately half what would be necessary for a true voltage transformer. For example, if the input is 24V and the output is 12V then I would start the design with a 1:1 turns ratio (adjusting as necessary to accommodate expected input voltage range, core area, switch voltage rating, secondary rectifier ratings, etc.).Secondly, the output capacitors (and the input capacitors, for that matter) are subjected to relatively high ripple current in a flyback. It is not usual for the peak current to be 3x the average DC output current, and that really tends to heat capacitors up... especially junk-box electrolytics that are well past their prime, or Wun Hung Lo specials (or both).

author: Refrigerator
author_rank: Super Contributor
timestamp: June 15, 2016, 08:20:02 pm
content: Just took some "screenshots" with my owon scope but they're in .txt format so i don't know how one would go about viewing them, MS Excel maybe?I think it would be better to maybe do a screen capture with some other program, i'll see what i can do.Anyways, i did find why the output cap for the 12V rail was blowing up and it was due a damaged opto not providing proper regulation, probably did something bad to it while tinkering. With opto replaced the 12V out is now at 13V ( 12v zener + 1v opto ) and is rock solid under many different loads. 12.88V @ 60mA, 12.82V @ 550mA, for example.I used a .33 Ohm resistor for the primary current limit, maybe i could change that one for a lower/higher value to see how it performs ?

author: Gyro
author_rank: Super Contributor
timestamp: June 16, 2016, 09:00:33 am
content: Why are you doing your screenshots in .txt?Just go to the Utility menu and do a save image - you get a choice of BMP, GIF or PNG.

author: Refrigerator
author_rank: Super Contributor
timestamp: June 16, 2016, 10:00:49 am
content: Quote from: Gyro on June 16, 2016, 09:00:33 amIt was my first time using the scope and the .txt format was by default, thanks for the advice.

author: Refrigerator
author_rank: Super Contributor
timestamp: June 18, 2016, 10:23:42 pm
content: There, i've attatched some screenshots.I tried adding an inductor in between the cap and the diode but in the end i had 7 blown mosfets with just as many blown fuses.Also started winding a new transformer, i'll exclude the 12V winding and focus on making the 5V windings as similar as i can - i'm running all three 5V wires parallel to each other.As suggested the secondary will be on the first layer, followed by the primary and then the feedback coils, i'm also using a smaller core to hopefully obtain a higher operating frequency of above 50kHz.

author: rob77
author_rank: Super Contributor
timestamp: June 18, 2016, 11:14:29 pm
content: just a side-note... for a lipo charger you need a voltage limited constant current source (precisely 4.2V voltage limit and act as a current source set to you charging current), so i would definitely avoid any kind of self oscillating setups.. i would rather go for something with 2 error amplifiers, something very common like tl494, or tl594 (594 has a better accuracy 5V reference).

author: Circlotron
author_rank: Super Contributor
timestamp: June 18, 2016, 11:35:53 pm
content: Nice sharp scope trace BTW. None of this fuzzy blurry thick line nonsense!

author: Refrigerator
author_rank: Super Contributor
timestamp: June 19, 2016, 05:33:27 am
content: Quote from: rob77 on June 18, 2016, 11:14:29 pmI said it already, three TP4056 will be used to charge an internal 3S battery pack, but to do so i need three isolated/floating power supplies, which is why i'm making this PSU.At first i thought of making a 12.6V power supply and adding something to shunt the cells that go over 4.2V to dissipate the excess power and obtain a rough balance but i couldn't find a way to shunt the cells reliably and individually, which brought me to the decision to use the TP4056.Quote from: Circlotron on June 18, 2016, 11:35:53 pmThanks, just got my new scope and i'm loving it !

author: rob77
author_rank: Super Contributor
timestamp: June 19, 2016, 08:29:25 am
content: Quote from: Refrigerator on June 19, 2016, 05:33:27 amthat's usually done by switching resistors with mosfets controlled by a mcu - most balancing chargers are done like that. you read the voltage of each cell with an ADC and switch a resistor parallel to the cell(s) with the highest voltage to let the other cell(s) with lower voltage to "catch-up".

author: Refrigerator
author_rank: Super Contributor
timestamp: June 19, 2016, 02:17:28 pm
content: Quote from: rob77 on June 19, 2016, 08:29:25 amYeah, chargers like the Imax B6 slightly overcharge the high cells just to bring them down slightly without having to charge the low cells up separately.Now that i think of it i could get away with a simple TL431 across each cell.

author: Md Mubdiul Hasan
author_rank: Regular Contributor
timestamp: September 17, 2020, 06:47:43 pm
content: Quote from: johansen on June 14, 2016, 06:32:54 pmHey refrigerator,I am thinking to make a smart charger for e rickshaw/ auto rickshaw or schooter , suggest me which topologies should best fit.1. Flyback2. SMPSNeed to think cheap design.

author: Refrigerator
author_rank: Super Contributor
timestamp: September 21, 2020, 12:00:28 pm
content: Quote from: Md Mubdiul Hasan on September 17, 2020, 06:47:43 pmFlyback is an SMPS topology. So you really only listed one option.