Forums

Small transformers and LTSpice simulation

Started by Grant April 22, 2011
Grant wrote:
> On Sat, 23 Apr 2011 10:18:57 -0700, Joerg <invalid@invalid.invalid> wrote: > >> Grant wrote:
[...]
>>> I have lots of toroids recovered from power supplies, no idea of what >>> inductance they have until I power up some circuit and try to match >>> LTSpice inductance with observed waveforms ;) I'm guessing 33uH at >>> the moment for 40 or 50kHz operation. >>> >> Pretty easy to measure: Short a secondary and read the inductance again. >> It isn't terribly accurate for a multi-winding transformer but give you >> a ballpark number. > > I don't have an inductance meter, seems it's time to make or buy one > since I want to play with inductors and transformers? Another PIC > project -- I think Jan worked on one? I already bought some 1% > polystyrene reference capacitors to make one. Yet another distraction.
Nah, come on, you Australians are supposed to be the masters in improvising :-) (Saw Crocodile Dundee in L.A. yesterday) Take a function generator and a scope. If no gen available the sound card of your PC will do if it spits out a decent sine wave. Place a resistor is series with the winding and feed at the top. Now measure the amplitude at the top (where the gen connects) and then again across the coil. This is like a voltage divider. The ratio will tell you the impedance Z of the coil at, say, 15kHz. Now L = Z / (2 * Pi * 15kHz) In a pinch you can also use the sound card to measure the levels.
>> >>> I do notice that over-voltages start at close to ideal coupling, for >>> example 0.97 can give a nasty over-voltage spike on the leading edge >>> in LTSpice. I don't know how much of that to expect in a real circuit, >>> any guidance here? >>> >> 0.97 is quite realistic although I had 0.995 recently, with an EI-core >> no less. You've got to deal with those spikes, they will happen in the >> real world. There will also be ringout. I always try to tackle this >> without snubbers because those kill efficiency. Better to dump that >> energy back into a rail and get the covered Energy Star sticker :-) > > Right. What about the fuzz LTSpice adds to the primary waveform? It > doesn't look real to me? I certainly believe the spikes, I've seen > that on hardware, but aggressively dumping it back to the rail killed > power transfer to the secondaries in my simulation. But that's where > I need to play with hardware as well, to see what's real and imagined :) >
Not sure what fuzz you mean, maybe post the sim? You can copy it into a post. As long as you don't use any fancy part models others can then run it. Some fuzz is actually ok, like the minor ring-out that leakage inductance causes during off times.
> Balance how much energy to capture on the primary side, without snuffing > the life out of the system.
Well, essentially it's the flyback kind of energy in a non-flyback converters that is often not healthy, needs to be dumped somewhere so parts don't suffer. For example, if the primary FET can take 100V but the spikes want to go to 150V that needs to be taken care of.
>> >>> What I plan to do is drive a transformer with a current limited latch >>> circuit, +ve edge turns on a 'hc74 flip flop, current sense through an >>> npn will pull 'hc74 reset line down. Should be safe enough to watch >>> the waveforms. >>> >>> Frequency of interest is 20 to 100kHz, current up to 2A through N-chan >>> MOSFET driving the transformer, small snubber on primary as suggested >>> by LTSpice, secondaries are standard flyback, pair of schottky diodes >>> and caps. >>> >>> I might even use a 555, as it has a -ve reset line? :) Save me building >>> a separate oscillator, add the voltage cutoff and it's done, cheap'n'nasty. >>> >>> Can one make a 50KHz oscillator from half an 'HC74? and an R + RC? Is there >>> a odd numbered ring of inverters hiding in there? >>> >> Why not use a real PWM chip for starters? You can always back down from >> there to reduce cost once everything runs to your satisfaction. > > Because my favourite chip at the moment (NCP3063) is not a proper PWM, it > can be talked into PWM by injecting current onto the timing cap node, but > I didn't have much success with that yet in hardware*, and cannot find a > model for simulating it, to help me get into the ballpark. > > * Drawback is one has to add a reference to complete external control > loop, so there's little incentive to go that way, too many components. > > Got some of the common 2843 (?) series chips, could try them. Otherwise > I'm open to suggestions! >
What architecture were you looking at? Why not pick one of the LTC parts and then later after the simulation runs try out something else? For step-up and SEPIC the LT3757 is pretty good. -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
Grant wrote:
> On Sat, 23 Apr 2011 10:58:30 -0700, Joerg <invalid@invalid.invalid> wrote: > >> Grant wrote:
[...]
>>> Got some of the cheap TI 430 series intro kits too, not powered one up yet, >>> kit comes with a little USB interface, loads of software for download -- but >>> they're not getting a mention from anyone here? 'Cos they bad or just new? >> >> Well, they run on 3.3V and the ports are kinda wimpy for driving a big >> FET. Also not much direct HW-interaction with the timers is possible and >> that can make a switcher risky. One little hang-up in the code ... *POOF* > > Okay, the intro kit cost $4.30 includes a short USB cable almost worth it ;) > > They sending them out for free too, 'limited time only'... For months now. > > But product design shouldn't go *POOF* if the CPU hangs, that's why there's > watchdogs and stuff -- perhaps I show my age here. Or that's why stuff > still has builtin fuses -- in the software doesn't lockup something might > fail anyway? > > Safe uC design? I used to make stuff that had to work 24/7. That meant > watchdogs and undervoltage reset -- though the last only accepted by the > boss only after field failures were solved by the extra part cost. Grrr! >
Watchdogs don't do all that much in a switcher. By the time that comes on a few clock cycles might have gone by. It can be a matter of microseconds for a switcher to go from fully ok to kablouie. On a current-controlled switcher things have to react within a fraction of one cycle. Once the inductor goes too deep into core saturation all hell breaks loose. Fireworks and all. The UVLO is a smart thing you added there. Switchers should never run without, else it'll kill the FET some day. All it takes is a slow brown-out. -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
On a sunny day (Sun, 24 Apr 2011 08:57:59 +1000) it happened Grant
<omg@grrr.id.au> wrote in <lkk6r6tjc53hig7mtlva20a6so2skojq27@4ax.com>:

>Photo here: http://grrr.id.au/image/adc-card.jpg
Now that is nice :-)
On Sat, 23 Apr 2011 17:38:12 -0700, Joerg <invalid@invalid.invalid> wrote:

>Grant wrote: >> On Sat, 23 Apr 2011 10:58:30 -0700, Joerg <invalid@invalid.invalid> wrote: >> >>> Grant wrote: > >[...] > >>>> Got some of the cheap TI 430 series intro kits too, not powered one up yet, >>>> kit comes with a little USB interface, loads of software for download -- but >>>> they're not getting a mention from anyone here? 'Cos they bad or just new? >>> >>> Well, they run on 3.3V and the ports are kinda wimpy for driving a big >>> FET. Also not much direct HW-interaction with the timers is possible and >>> that can make a switcher risky. One little hang-up in the code ... *POOF* >> >> Okay, the intro kit cost $4.30 includes a short USB cable almost worth it ;) >> >> They sending them out for free too, 'limited time only'... For months now. >> >> But product design shouldn't go *POOF* if the CPU hangs, that's why there's >> watchdogs and stuff -- perhaps I show my age here. Or that's why stuff >> still has builtin fuses -- in the software doesn't lockup something might >> fail anyway? >> >> Safe uC design? I used to make stuff that had to work 24/7. That meant >> watchdogs and undervoltage reset -- though the last only accepted by the >> boss only after field failures were solved by the extra part cost. Grrr! >> > >Watchdogs don't do all that much in a switcher.
Sorry, I never made uC controlled switchers before, just products that had to run 24/7. Switching supplies I worked on decades ago were mains commutated SCR monsters (up to 500A) charging industrial batteries -- so one had a filter inductor about half the size of the mains transformer with an air gap adjusted for no saturation pip at full current, high input and lowest output. Battery model? Short circuit with a voltage offset!
> By the time that comes >on a few clock cycles might have gone by. It can be a matter of >microseconds for a switcher to go from fully ok to kablouie. On a >current-controlled switcher things have to react within a fraction of >one cycle. Once the inductor goes too deep into core saturation all hell >breaks loose. Fireworks and all.
I agree, one must switch off on current or not allow saturation by inductor and cap selection -- what I did with the simulator was dangerous in the sense I built what appears to be a safe power circuit without a current sense. So I rewired a 100mR into the prototype so I could at least loot at the current in operation -- but this particular whatsit is only a couple amps and polyswitch or fuse protected.
> >The UVLO is a smart thing you added there. Switchers should never run >without, else it'll kill the FET some day. All it takes is a slow brown-out.
Yeah, not supposed to happen, I had a visitor from interstate yesterday who told of a brown-out lasting two hours! I was surprised, more than a few minutes here and the power comes back or goes out completely. Grant.
Grant wrote:
> On Sat, 23 Apr 2011 17:38:12 -0700, Joerg <invalid@invalid.invalid> wrote:
[...]
> So I rewired a 100mR into the prototype so I could at least loot at the > current in operation -- but this particular whatsit is only a couple amps > and polyswitch or fuse protected. >> The UVLO is a smart thing you added there. Switchers should never run >> without, else it'll kill the FET some day. All it takes is a slow brown-out. > > Yeah, not supposed to happen, I had a visitor from interstate yesterday who > told of a brown-out lasting two hours! I was surprised, more than a few > minutes here and the power comes back or goes out completely. >
Maybe he is on one of those long SWER lines. Australian line power is the ultimate test for any power supply. On the last one I re-designed for your neck of the woods I made sure that nothing would ever saturate up to 275V/50Hz. In the testing I gave it bursts of 300V for 15min. Then I tested for the "eternal brown-out" where the voltage would hover around where things draw max current and where the UVLO just hasn't come on yet. The other test would be islands with generators, where they sometimes reach in and goose a recalcitrant engine. Vroom ... vrooooom ... *POOF* -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
On Sat, 23 Apr 2011 17:24:52 -0700, Joerg <invalid@invalid.invalid> wrote:

>Grant wrote: >> On Sat, 23 Apr 2011 10:18:57 -0700, Joerg <invalid@invalid.invalid> wrote: >> >>> Grant wrote: > >[...] > > >>>> I have lots of toroids recovered from power supplies, no idea of what >>>> inductance they have until I power up some circuit and try to match >>>> LTSpice inductance with observed waveforms ;) I'm guessing 33uH at >>>> the moment for 40 or 50kHz operation. >>>> >>> Pretty easy to measure: Short a secondary and read the inductance again. >>> It isn't terribly accurate for a multi-winding transformer but give you >>> a ballpark number. >> >> I don't have an inductance meter, seems it's time to make or buy one >> since I want to play with inductors and transformers? Another PIC >> project -- I think Jan worked on one? I already bought some 1% >> polystyrene reference capacitors to make one. Yet another distraction. > > >Nah, come on, you Australians are supposed to be the masters in >improvising :-) > >(Saw Crocodile Dundee in L.A. yesterday)
I haven't seen it, apart from the 'that's not a knife' clip that was shown all over the place.
> >Take a function generator and a scope. If no gen available the sound >card of your PC will do if it spits out a decent sine wave. Place a >resistor is series with the winding and feed at the top. Now measure the >amplitude at the top (where the gen connects) and then again across the >coil. This is like a voltage divider. The ratio will tell you the >impedance Z of the coil at, say, 15kHz. Now > >L = Z / (2 * Pi * 15kHz) > >In a pinch you can also use the sound card to measure the levels. > >>> >>>> I do notice that over-voltages start at close to ideal coupling, for >>>> example 0.97 can give a nasty over-voltage spike on the leading edge >>>> in LTSpice. I don't know how much of that to expect in a real circuit, >>>> any guidance here? >>>> >>> 0.97 is quite realistic although I had 0.995 recently, with an EI-core >>> no less. You've got to deal with those spikes, they will happen in the >>> real world. There will also be ringout. I always try to tackle this >>> without snubbers because those kill efficiency. Better to dump that >>> energy back into a rail and get the covered Energy Star sticker :-) >> >> Right. What about the fuzz LTSpice adds to the primary waveform? It >> doesn't look real to me? I certainly believe the spikes, I've seen >> that on hardware, but aggressively dumping it back to the rail killed >> power transfer to the secondaries in my simulation. But that's where >> I need to play with hardware as well, to see what's real and imagined :) >> > >Not sure what fuzz you mean, maybe post the sim? You can copy it into a >post. As long as you don't use any fancy part models others can then run it. > >Some fuzz is actually ok, like the minor ring-out that leakage >inductance causes during off times.
No it's crap during the on time. . . I found it, it's actually the ringing on the secondary while a diode there is reverse biased during the MOSFET on time (flyback). I was simplifying the circuit to have something to post, killed it, started over and found the ringing. I guess with perfect coupling the ringing was absorbed by the primary's snubber, and that's why it only showed when I set coupling less than unity. Good way to learn.
> > >> Balance how much energy to capture on the primary side, without snuffing >> the life out of the system. > > >Well, essentially it's the flyback kind of energy in a non-flyback >converters that is often not healthy, needs to be dumped somewhere so >parts don't suffer. For example, if the primary FET can take 100V but >the spikes want to go to 150V that needs to be taken care of.
I changed snubber to diode feeding an RC to +ve rail to recover some of that energy, much better, and I have just as much control over the peak MOSFET drain voltage as a straight snubber gave. This is where the sim 'what if' is helpful for me.
>
[PWM suggestions]
>What architecture were you looking at? Why not pick one of the LTC parts >and then later after the simulation runs try out something else? For >step-up and SEPIC the LT3757 is pretty good.
Flyback converter. I was trying to ignore checking out all those LT parts, I'll look at the LT3757, see what it's like. I bought a heap of the 3063s for running LEDs, I don't have to use them everywhere. I bought some PWM chips too, but on price, not for ease of use with LTSpice -- this was a fair while back, before I started using LTSpice. Grant.
On a sunny day (Mon, 25 Apr 2011 11:56:50 +1000) it happened Grant
<omg@grrr.id.au> wrote in <bjd9r6dulldja6gh3keb62hbjbk1cdfth2@4ax.com>:

>No it's crap during the on time. . . I found it, it's actually the ringing >on the secondary while a diode there is reverse biased during the MOSFET >on time (flyback). I was simplifying the circuit to have something to post, >killed it, started over and found the ringing.
You will find once you solder things together that there are all sorts of ringing from cable inductance too. In some I did, even moving a wire one way or the other way can cause huge oscillations to appear or disappear. That is why I only believe in testing the real circuit. But sure, spice will show you the basic circuit with perfect wiring.
On Mon, 25 Apr 2011 09:00:51 GMT, Jan Panteltje <pNaonStpealmtje@yahoo.com> wrote:

>On a sunny day (Mon, 25 Apr 2011 11:56:50 +1000) it happened Grant ><omg@grrr.id.au> wrote in <bjd9r6dulldja6gh3keb62hbjbk1cdfth2@4ax.com>: > >>No it's crap during the on time. . . I found it, it's actually the ringing >>on the secondary while a diode there is reverse biased during the MOSFET >>on time (flyback). I was simplifying the circuit to have something to post, >>killed it, started over and found the ringing. > > >You will find once you solder things together that there are all sorts of ringing >from cable inductance too. >In some I did, even moving a wire one way or the other way can cause huge oscillations to appear or disappear. >That is why I only believe in testing the real circuit. >But sure, spice will show you the basic circuit with perfect wiring.
Today it showed me enough to learn that the particular approach I was looking at is not worth building :) I've already built part of a more complex thing that I'll continue with, that's a half bridge into the load, more parts, but more likely to work as expected, plus there's a PIC chip in there to help do some power accounting for the up-market version. But I had to see how good the cheapie idea was for the job. Rather be able to point out its shortcomings if someone asks why didn't I use that particular topology in the future. Grant.
On Apr 24, 2:24=A0am, Joerg <inva...@invalid.invalid> wrote:
> Grant wrote: > > On Sat, 23 Apr 2011 10:18:57 -0700, Joerg <inva...@invalid.invalid> wro=
te:
> > >> Grant wrote: > > [...] > > >>> I have lots of toroids recovered from power supplies, no idea of what > >>> inductance they have until I power up some circuit and try to match > >>> LTSpice inductance with observed waveforms ;) =A0I'm guessing 33uH at > >>> the moment for 40 or 50kHz operation. > > >> Pretty easy to measure: Short a secondary and read the inductance agai=
n.
> >> It isn't terribly accurate for a multi-winding transformer but give yo=
u
> >> a ballpark number. > > > I don't have an inductance meter, seems it's time to make or buy one > > since I want to play with inductors and transformers? =A0Another PIC > > project -- I think Jan worked on one? =A0I already bought some 1% > > polystyrene reference capacitors to make one. =A0Yet another distractio=
n.
> > Nah, come on, you Australians are supposed to be the masters in > improvising :-) > > (Saw Crocodile Dundee in L.A. yesterday)
Crocodile Dundee was always comic fantasy - part of the humour in the original film was the under-clad fair-skinned New York bint trotting around in the tropical sun and not getting sun-burnt. In real life she'd have spent most of the film bright red and blistered. There were lots of other - more obvious - jokes, and I greatly enjoyed the film, though I did peeve my wife a bit by pointing out that quite a few of the jokes had been piched from some of Dal Stivens more extravagant short stories http://en.wikipedia.org/wiki/Dal_Stivens -- Bill Sloman, Nijmegen
On 4/28/2011 6:19 PM, Bill Sloman wrote:

> Crocodile Dundee was always comic fantasy - part of the humour in the > original film was the under-clad fair-skinned New York bint trotting > around in the tropical sun and not getting sun-burnt. In real life > she'd have spent most of the film bright red and blistered. >
I sat through it twice just to see the bint. John