SMPS based on TOP232 - Page 1
Forum section: electronics / repair

author: masterx81
author_rank: Frequent Contributor
timestamp: March 18, 2020, 08:06:14 pm
content: Hi! I'm repairing an smps based on the TOP232 controller.mouser.com/datasheet/2/328/top232-234-1512691.pdfThe schematic is almost the same as the suggested in the PDF.I've had to change the controller, a 220ohm resistor between the 230v rectified line (i think that's for limit the current), and an opamp after the transformer. The sensitive things are safe as after the smps there was a 3.3v ldo (that is ok). Also the transformer was burnt, so i've had to rewire it, as i wasn't able to find a valid substitute. For the primary side i wasn't able to measure the number of turns, as was an unique block of molten things, but i was able to measure the total lenght of the wire, with a little approssimation, i think that is enough to make it work. On the secondary side i was able to count the turns of the 2 windings.Now, the smps starts ok, i get on the "control" winding 17.5v (there is a 20v tantalum cap, so i think that is quite ok), but on the 5v line i have near 4.3 volts (must be 5v). The strange thing is that when i turn off the supply, when the >300v line starts to drop due to capacitor discharge, the smps start working perfectly, giving a perfect 5v output, until the voltage drops too much. On the 220ohm resistor with main line connected i have a voltage drop of near 1.3v, when the 300v line start dropping it goes to a 2.5v drop (as the logic is working it consumes more current).What can cause the problem? The winding ration of the transformer? Maybe i can do a better thing, isolate the onboard smps and put a 5v external smps, buth would be nice to make it work....Thanks!!

author: aqibi2000
author_rank: Regular Contributor
timestamp: March 18, 2020, 10:37:34 pm
content: 20V cap on a 17.5V line is not good practice at all.Did you measure the peak amplitude using an oscilloscope or just going by the RMS value your multimeter is giving? Because you will have 17.5*1.41 = ~25V peak

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 01:18:21 am
content: I've measured after the rectifier diode, where is the smoothing cap.When i remove the power, and the switching start working normally (during the main filter capacitor discharge period), that voltage remain the same.

author: Circlotron
author_rank: Super Contributor
timestamp: March 19, 2020, 02:03:29 am
content: Sounds like it is going into overvoltage shutdown mode when the DC input voltage is too high. The example circuit shows a 3M3 resistor from DC input to the M pin on the IC. Is that the value you have? Too low a value would make it shut down at normal DC input voltage.

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 02:10:25 am
content: Quote from: masterx81 on March 18, 2020, 08:06:14 pmIt's completely not OK and asks for trouble. Even if it was electrolytic, it would be marginal but tantalum caps should be derated by at least 50%, preferably 70% for better reliability. You can sort of use them at 80% of rated voltage but failure rate will be abysmal. And if there is enough current supply, wait for firecrackers.

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 02:26:23 am
content: There shouldn't be 17.5V BTW, schematic in the datasheet has 10V capacitor (page 14).

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 07:41:19 am
content: Look at figure 26, the control winding can produce 15v.I think that 15v can be the right voltage, i not know why i get 17.5 (actually 17.2) as i have mantained the same turns of original transformer. In this case i think that is important to mantain the same turn ratio of the 2 secondary windings, but i've maintained it. I not think that 17.2 can harm the smps ic as from the schematic there is some sort of internal limiting. Maybe the cap is a bit overstressed, if all other things are ok i change the cap with a different one. But before i need to find why it's not working

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 07:43:53 am
content: @Ciclotron,I'll check it, thanks!Checked! Two 1.8m resistor in series, both ok.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 09:42:17 am
content: Just one curiosity: What can cause an incorrect wiring direction of the windings?All other things seem ok, on the secondary side if i power the device with a separate supply i get a 150ma power consumption on the 5v line, and seem in line with the sizing of the core, on the primary side all components seem ok. So i can only think that the rewinded transformer can have some problems. But why it works well when the power supply drops? The diameter of the enameled wires was checked several times (with centesimal micrometer). Maybe i have choosen a little smaller primary wire, so at same wire lenght i have more turns, and the smps ic working at lowest duty possibile. But this ic can work from 200vdc to 375vdc (by now i am powering it with 320vdc), so must have quite a wide range of duty available. I not think that i was able to go so much off. But i can check with scope the duty that is working.Next thing i try to power it through a variac and see if it works well with lower voltage...---Variac testing done. If i start with 230vac then drop to 130vac, i get a clean 5v. If i start at 130vac, it does not neither start (as expected).What's going on???

author: PKTKS
author_rank: Super Contributor
timestamp: March 19, 2020, 10:55:55 am
content: First time I see such mixture of things into a single IC.IT LOOKS LIKE MUCH MUCH MORE A TYPICAL RCC ...than the advertised forward...It made me wonder what kind of typical wave youmay have on the switcher mosfet...So considering it more RCC it may have the resonatorcapacitor mismatched since you rewired the primary coilRCC things must be matched to proper resonance..otherwise they go haywirelong guessPaulp.s/: actually I remember some time ago from these folks TOP221being somewhere advertised as innovative "QuasiResonant" thing...may be some published slides presentation of that... google for it

author: Circlotron
author_rank: Super Contributor
timestamp: March 19, 2020, 11:24:27 am
content: Quote from: masterx81 on March 19, 2020, 07:43:53 amMaybe add a bit more?...Seriously though, maybe the controller is just out of spec and a bit more resistance might do the trick. At least it's easy and cheap to try. Just divide the max rated voltage by the max voltage it actually runs at and multiply the resistance value by that figure. Example... max rated = 400V, actual max = 275V so (400/275) x 3.6 meg = 5.236 meg.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 11:58:54 am
content: @PKTKSI've seen a similar thing in a active pfc smps of an lcd tv, but had a big polyester cap that was resonating with the transformer (and was an hell to repair!). In this circuit the only capacitor that i have on the primary side is the c5 on the pdf ref. page 16 figure 26, and seem part of an rc filter. The other caps are smoothing caps on vcc and after the rectifier diode.I've also edited the previous post with the result of playing with the variac...@Ciclotron uhm, that multifunction pin is something strange (a lot of functions for a single pin!), eventually i can try to put it to source and disable all the protections, to see if it works.PS: I have the DIP package, so i not have the FREQUENCY pin

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 12:08:01 pm
content: If i well understand, the Multifunction pin now is set in UV, OV, and DCmax limits, as per figure 14. Maybe at full voltage i'm hitting DCmax limit as i have LESS turns on primary side as the original transformer?

author: PKTKS
author_rank: Super Contributor
timestamp: March 19, 2020, 02:07:51 pm
content: Quote from: masterx81 on March 19, 2020, 11:58:54 amYes I am also puzzled with so many "functions" on a single pinthey sacrifice a clean design for that.. WTF?47u is too much for frequency compensation...as far as I can guess.. by position I would guessbut that value is far too much.Anyway it sure have internal things forfrequency compensation and stuff.Guessing the inductance value is out ofprevious calculation would justify a lot of thingsplaying a bit those unique components capableof tweaking the steady state would be my shot.Paul

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 02:10:32 pm
content: Are you sure some winding isn't connected backwards?QuoteYou said primary winding was completely toast. So I wouldn't be surprised you did it wrong.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 02:49:09 pm
content: Quote from: wraper on March 19, 2020, 02:10:32 pmNo, i'm not sure. That's why i was asking. But as the signals are rectified right after the transformer, it can cause problems? How i can know how was wired?I think that the typical application circuit is correct, but the dot marking has always puzzled me. If i remember well when i've wired it i've used always the same direction for primary and secondaries. I think i can confirm stimulating it with the function generator

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 02:55:07 pm
content: Quote from: PKTKS on March 19, 2020, 02:07:51 pmMy cap is 47uF too... strange that a "tuned" component have the same value of the reccomended schematic.The resistor is low value, can explain why the cap is so big

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 03:10:50 pm
content: Quote from: masterx81 on March 19, 2020, 02:49:09 pmIt's rectified in one direction only. It's not like you have nice symmetric sine on the output, so it does matter a lot in which direction windings are connected in regards to each other.QuoteOpen the datasheet and there you can see direction (dot) of each winding. Or try connecting primary winding backwards and see what happens.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 03:36:31 pm
content: As i can understand the dot is the polarity, but how i can know how correlate it with wiring direction?Let me understand, the polarity is important because on the primary side there isn't a push pull transistor configuration, but only a pull down to gnd, so we have only "power" on one half of the wave. That's why we have only a one diode rectifier on the output. But if it's badly wired, i think that i get almost any current from the secondaries.I am wrong?

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 05:34:25 pm
content: Consider dot as start of the winding considering all of them are wound in the same direction.https://en.wikipedia.org/wiki/Flyback_converterThe most important part:Quote

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 06:32:55 pm
content: Ok, got it..but if the windings of the transformer are wrong, the diode on the secondary side never goes in conduction, as the flyback has no positive part. So no voltage on the secondary. Instead i have voltage on both secondaries, and when it work it can source 150ma of current. It's impossible if the polarity of the windings is wrong. And as told, i'm quite sure to have wound them all in the same direction.In any case, thanks, because i've (maybe) understood the difference from a normal transformer and a flyback smps transformer

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 06:37:38 pm
content: Quote from: masterx81 on March 19, 2020, 06:32:55 pmTotally wrong assumption. Doesn't it look familiar?https://en.wikipedia.org/wiki/Forward_converter

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 07:00:57 pm
content: Ok. Now i think that i've not understood so wellSo, actually is not working by flyback, the core doesn't store energy but passes energy to the secondaries (like a normal transformer?). But how it can generate a negative part so strong to source 150ma of load? And if the negative part is so strong, why not recover it?I've repaired smps, but actually never knew the magic inside the core of the transformer

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 07:09:29 pm
content: It works but half-arsed if it was not designed properly as forward converter. Which correlates with your case.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 07:15:20 pm
content: As now that the core is already glued, can i test it with a waveform generator and checking with a scope it's output?But why on the top232 datasheet the secondaries are polarized inverted from the primary?

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 07:17:31 pm
content: Quote from: masterx81 on March 19, 2020, 07:15:20 pmBecause it's how flyback converter works. If it's opposite, you get forward converter.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 08:03:18 pm
content: So, that's why you was suggesting to simply invert the primary winding. Maybe the controller increase the dc a lot for try to have enough "negative part" of the flyback to reach the 5v.Buh how recognize on the fly a flyback converter from a forward converter? Looks so similar.

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 08:09:31 pm
content: The simplest would be according by PWM controller model.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 19, 2020, 08:18:27 pm
content: Perfect, was hard, but (maybe?) i've learned somethingIf it's a flyback, i'm sure that the the windings are wrong as i've wound them all on the same direction.Try to invert the primary tomorrow.Really thanks!!

author: wraper
author_rank: Unknown
timestamp: March 19, 2020, 08:20:28 pm
content: TOP232 is flyback controller. It's not supposed to work as forward converter.

author: Circlotron
author_rank: Super Contributor
timestamp: March 20, 2020, 03:11:27 am
content: Quote from: masterx81 on March 19, 2020, 08:03:18 pmA flyback converter has no filter inductor. The rectifier diode on the output side feeds straight into a big capacitor. This is because the transformer secondary winding of a flyback converter is a current source, with a forward converter it is a voltage source.

author: wraper
author_rank: Unknown
timestamp: March 20, 2020, 03:21:04 am
content: Quote from: Circlotron on March 20, 2020, 03:11:27 amYou need to be aware that flyback often has inductor as well. Just a bit later in the circuit for noise filtering purposes. So simply presence of inductor does not mean anything unless you checked how it's actually connected. Though inductor in forward converter most likely will be larger in size.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 22, 2020, 08:41:48 pm
content: Inverted the primary and now i have 15v on control line and 5v on the output. Perfect!Thanks for the help and for the expalaination on how works smps transformers!EDITStill something wrong... it start, i have clean 5v and 15v on the outputs, then after 10/15 seconds the output goes down. If i power off, it start working ok during the main filter capacitor discharge like before... it start working when voltage goes down at near 200v. Seem temperature dependant, if i do it when cold seem work longer than doing several tries. I not see nothing overheating

author: masterx81
author_rank: Frequent Contributor
timestamp: March 23, 2020, 10:59:30 am
content: Leaving it connected it works for 10/15 sec, then turn off, after few seconds start working back for 5 sec, and so on. Seem a protection triggering. It's not an overtemperature.I attach the waveform of the primary side. The waveform seem good (no strange duty cycle, in the 29% region with 220vac input). I not see any appreciable variation in the waveform before shutting down.With 180vac i have a duty of near 34% and it does the same thing (on-off-on-off etc).I attach also the waveform when it's not working...What sort of protection can be?Thanks!

author: PKTKS
author_rank: Super Contributor
timestamp: March 23, 2020, 11:17:46 am
content: Quote from: masterx81 on March 23, 2020, 10:59:30 am**IF** this was your first post on the subject...with just the waveform ...asking for guesses...I would just say:- by the waveform - THIS IS AN RCC (not a forward converter)- and pretty much RCCs gone haywire with bad parts...- a minor aged component or with different/changed values for RCC steady state....if I was just looking that waveform and ignoring the rest...go figure why this chip behaves like RCC...Paul

author: masterx81
author_rank: Frequent Contributor
timestamp: March 23, 2020, 11:33:06 am
content: Seem a flyback converter (for sure as the primary of the transformer is out of phase from the secondaries, also in the pdf).The smps ic have really few components around it. I attach a photo of the d**n thing.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 23, 2020, 11:39:24 am
content: D18 is the rectifier of the 5v output, c39 is the 5v smoothing cap, u2 optocoupler, d17/c36 rectifier of 15v control voltage, c41 and r56 seem an rc filter (not tuned, same values of the pdf), d19/d20 as per pdf. C35 seem a 300v smoothing cap placed near the smps. C42 smooth the input voltage of the smps ic.

author: masterx81
author_rank: Frequent Contributor
timestamp: March 23, 2020, 02:51:26 pm
content: I've checked the pdf and i've not seen any requirement about needed inductance, and neither nothing about capacitors to "tune". But from pdf the switching frequency must be typ 124-140khz, while i've measured around 107khz.

author: PKTKS
author_rank: Super Contributor
timestamp: March 23, 2020, 03:27:09 pm
content: Quote from: masterx81 on March 23, 2020, 02:51:26 pmThey all do. Implied on design of flybacks.But we have today a off-the-shelf ready numerated coils to choose.Another shot:- using that TL431 transconductance error amplifier...- Try to play the feedback loop current to voltage ratios...Eventually you may have luck tuning the FB loop itselffor steady state operation at some load ranges.Paul

author: masterx81
author_rank: Frequent Contributor
timestamp: March 23, 2020, 07:17:22 pm
content: QuoteThe internal oscillator is not tied to the inductance. Is linearly charged and discharged, i think by an internal resistor.The feedback loop has nothing strange or that can be tuned. Filters and resistors, and the optocoupler. And in any case the voltages of the feedback are good (5v and 15v).Really, i think to remove that damn thing and put an external trasformer!

author: shakalnokturn
author_rank: Super Contributor
timestamp: March 23, 2020, 07:39:59 pm
content: Have you checked transformer's temperature itself?Primary winding too thin?

author: masterx81
author_rank: Frequent Contributor
timestamp: March 23, 2020, 08:28:06 pm
content: The original winding was measured with a precision micrometer... i've checked by hand and with an infrared gun and nothing more than 35*c.

author: shakalnokturn
author_rank: Super Contributor
timestamp: March 23, 2020, 08:58:54 pm
content: New TOP232 came from a reliable source?

author: masterx81
author_rank: Frequent Contributor
timestamp: March 24, 2020, 12:10:39 am
content: Ehm, not. Ebay or aliexpress... i try to find a different smps ic...

author: masterx81
author_rank: Frequent Contributor
timestamp: April 01, 2020, 03:42:33 pm
content: Replaced the smps ic with one new of the same batch, ad it works. The temperatures are low. All seem ok.Thanks to all for the help!I've lost some time but i've learned a lot of things