From: Joerg on 30 Sep 2009 11:45 Jan Panteltje wrote: > On a sunny day (Tue, 29 Sep 2009 16:09:58 -0700) it happened Joerg > <invalid(a)invalid.invalid> wrote in <7ifie9F2vl82lU1(a)mid.individual.net>: > >>> Yea, but for some application this is really nice. >>> http://panteltje.com/panteltje/pic/pwr_pic/ > >>> Well, I very rarely experience bangs, if so it is because of new years fireworks. >>> >> That's because your switchers are probably fairly small or you can >> afford to oversize your inductors. If your SMPS is >100W, the inductor >> must be small and the whole thing has to be very fault tolerant you >> either have current mode control or you cannot do it, usually. > > If you looked at the diagram, and also the picture of the test setup here: > http://panteltje.com/panteltje/pic/pwr_pic/ > then you would have noticed a current transformer. > In the picture you can also clearly see the small ring core current transformer I used. > That is why it never goes 'bang' here. > I had noticed that. However, your switcher is running at a low PWM frequency, else the long wires would have fuzzed it up and caused a kablouie. Hard to see in the photo but your CT seems to go into the PIC via 1.8K. That alone would be too slow for most of my switchers, considering the usual 5-10pF input capacitance plus internal circuit delays. > There are 2 possibilities with this circuit, > when controlled externally via RS232, you can set the reference voltage of the comparator > that compares the output peak current to an internal reference, so cycle by cycle current limit. > Or you can use a potentiometer, and set that reference voltage by hand, > This is why I mentioned lab supply. as this provides the current limit in that application. > Because of the cycle by cycle current limit things work safely. > Well, yeah, as I said at 100kHz or so that is easier than at a MHz. > In a true 'current mode' supply the reference voltage of the cycle by cycle current comparator > is set by comparing the output voltage against a reference voltage, so you in fact set the output > voltage by regulating the output current. > The advantage is that you only have a single pole in your feedback loop. > > The PIC example does not do that however, because it is using an on / off stabilisation loop > for the voltage regulation, one that does not require a complicated feedback filter either, > and is lightning fast (much faster then you can do with a PID in software). > So in fact has the advantages of a true current mode, while possibly being faster. > Are you using a hysteretic scheme? That of course makes things easy but results in a lot of ripple. > I think, but have not tried, if you wanted, you could clamp down the reference of the current comparator > with the output of the voltage comparator, making a real current mode, but I see no advantage here at all. > Just a difference in wiring. > > As to how much power, that is an incredible misconception. > That only depends on the external circuit, not on the controller. > Sure you will need other switching components, with different drivers, > but for the control loop it makes no difference if you regulate 1 mW or 1 kW. The control loop isn't what makes things expensive there. It's the size of the magnetics that does. Plus in my cases there often just ain't enough space to run things at 100kHz. When doing a one-off bench supply it's ok. > If you were really fast, like Lucky Luke, who shoots faster then light (his shadow), > then you could do it by hand.. > Done it by hand a few times, meaning sans PWM chip and sans uC :-) -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
From: Joerg on 30 Sep 2009 12:11 John Larkin wrote: > On Tue, 29 Sep 2009 15:56:14 -0700, Joerg <invalid(a)invalid.invalid> > wrote: > >> John Larkin wrote: [...] >>> _ >>> / / Buy kid a cheap Toyota. >>> >> Option three, in Europe in the 70's: >> >> Tell kid to work and use proceeds to buy a bicycle, which can then >> almost indefinitely fulfill all the tasks from option one :-) > > Except that this town was built on a mountain range. > Similar when I was in school and elected to use my bicycle instead of the bus, because that only ran once an hour (no school busses there). Getting home I had two options. Switch to low gear and risk breaking the chain or a crank connector, or hop off the bicycle and walk it up a hill. >> Why didn't she just keep the Echo? It's a nice car for college and >> university, very economical. Probably sips half the fuel of a Wrangler. >> Of course the coolness factor is only 10% or so. > > Yup. Right after she landed her first real job, she got the Rubicon. I > gave her a raise, and she moved into a fancy apartment a couple blocks > from PacBell Park. "Sacrifice" ain't what it used to be. > >> BTW, my first car _after_ receiving my masters degree was a used >> Chrysler Horizon. Before that the predominant mode of transportation was >> a 10-speed. > > I got a yellow Austin-Healey Sprite, new, for about $1900. Freshman at > Tulane, two jobs on the side. I had a lot of energy in those days. > Me too, used my bicycle every day about 4 miles to the university which was across a border. Sometimes I cycled around 20 miles to Maastricht in southern NL. Energy-wise it made no difference and the fuel for that trip was usually beer :-) -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
From: Jan Panteltje on 30 Sep 2009 12:43 On a sunny day (Wed, 30 Sep 2009 08:45:21 -0700) it happened Joerg <invalid(a)invalid.invalid> wrote in <7ihcooF3104aeU1(a)mid.individual.net>: >Are you using a hysteretic scheme? That of course makes things easy but >results in a lot of ripple. Yes hysteretic (for voltage control). How much ripple really depends on how fast it reacts. As it reacts very fast, it can change the drive PWM to any value within a PWM period. There is sort of a small analog area created. If you look at the PWM on the scope, once it is stabilised at the set point, you see all sort of values. The ripple on the output then depends on the output cap and other system parameters. The PWM looks irregular, but the output is really OK. All depends on what you want to use it for, if it is to supply an audio amp, then you may have to pay more attention to ripple then when it has to supply a bulb filament, or charge a battery. When charging a battery it will be in current limit mode anyways (low ripple cycle by cycle correction), only once the battery is is full will it go into hysteretic mode, and then there is almost no current. In industrial applications often ripple in the order of magnitude of some percent is allowed, this one does better then that.
From: Joerg on 30 Sep 2009 13:31 Jan Panteltje wrote: > On a sunny day (Wed, 30 Sep 2009 08:45:21 -0700) it happened Joerg > <invalid(a)invalid.invalid> wrote in <7ihcooF3104aeU1(a)mid.individual.net>: > >> Are you using a hysteretic scheme? That of course makes things easy but >> results in a lot of ripple. > > Yes hysteretic (for voltage control). That's a fairly easy concept, and possibly the only one you can really use on a regular uC. > How much ripple really depends on how fast it reacts. > As it reacts very fast, it can change the drive PWM to any value within a PWM period. > There is sort of a small analog area created. > If you look at the PWM on the scope, once it is stabilised at the set point, you see all sort of values. > The ripple on the output then depends on the output cap and other system parameters. > The PWM looks irregular, but the output is really OK. Irregular is ok, we even do that on purpose sometimes, for example to dodge an EMI bullet. But hysteretic means long time-constant filters and that can screw up the load change response. Which is often unacceptable on my designs. > All depends on what you want to use it for, if it is to supply an audio amp, then you > may have to pay more attention to ripple then when it has to supply a bulb filament, or charge a battery. > When charging a battery it will be in current limit mode anyways (low ripple cycle by cycle correction), > only once the battery is is full will it go into hysteretic mode, and then there is almost no current. > In industrial applications often ripple in the order of magnitude of some percent is allowed, > this one does better then that. > Not in mine. Usually analog signals must be carried in the same bundle and things have to be super quiet. Once I had to run a switcher locked at half the video clock rate. Now that was outright painful. -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
From: John Larkin on 30 Sep 2009 13:39
On Wed, 30 Sep 2009 05:30:20 +0100, John Devereux <john(a)devereux.me.uk> wrote: >John Larkin <jjlarkin(a)highNOTlandTHIStechnologyPART.com> writes: > >> On Tue, 29 Sep 2009 17:58:04 +0100, John Devereux >> <john(a)devereux.me.uk> wrote: >> >>>John Larkin <jjlarkin(a)highNOTlandTHIStechnologyPART.com> writes: >>> >>>> On Tue, 29 Sep 2009 16:35:25 +0100, John Devereux >>>> <john(a)devereux.me.uk> wrote: >>> >>>[...] >>> >>> >>>>>Don't lead acid batteries charge at "constant voltage"? >>>> >>>> You could, but it's more common to connect them to a power supply that >>>> has current and voltage limiting. The old dumb chargers were just a >>>> high leakage inductance transformer and a rectifier, very sloppy >>>> voltage and current limiting, and they worked fine. It was prudent to >>>> remove them once the battery was charged, so's not to boil out all the >>>> water in the battery. >>>> >>>>> >>>>>That is, it is traditionally safe to apply a constant e.g. 14V to a good >>>>>"12V" battery, and the charging will be self-limiting. When it's full, >>>>>the current drops to a safe minimal value. >>>>> >>>>>But if you had a battery where 5 out of 6 cells are shorted out, then >>>>>you are relying on that one good cell to terminate the charge >>>>>safely. >>>> >>>> The cells weren't "shorted out", they were discharged. The fix is to >>>> charge them. I have no idea of how you define "terminate the charge >>>> safely." Personally, I'd terminate the charge when the battery is >>>> charged. >>> >>>*Your* battery was (let us assume), but - playing devils advocate - it >>> might be that this is in general a sign of a failed battery, not simply >>> a discharged one. >> >> There's an easy way to find out: recharge it and see what happens. >> >>> >>>> But it never will, your constant-current charger will keep on >>>>>pushing maximum current through it, electrolysing the fluid. >>>> >>>> Please explain the chemistry of that. It sounds like no batteries can >>>> be charged, ever. >>> >>>No idea really... I seem to recall something about overcharging >>>liberating hydrogen and oxygen? The excess energy has to go somewhere, >>>right? >>> >>>Wikipedia agrees with me, so there! >>> >>>"overcharging with high charging voltages will generate oxygen and >>>hydrogen gas by electrolysis of water, forming an explosive mix." >>> >>><http://en.wikipedia.org/wiki/Lead-acid_battery> >> >> >> 1.2 amps from a Lascar bench supply, overnight, is hardly >> overcharging. Contrary to stated theory, the car works fine now. > >I thought we were discussing why the *battery chargers you bought* might >refuse to charge? And I thought we still were. > How many amps were those supposed to be? The first ones were switchable 2/6 amps. The second pair was rated 3 amps. All put out zero amps, which I thought was not very helpful. Do you think maybe I'm being too demanding? We just loaned the Echo to a friend who ripped the bottom out of her BMW on a berm full of rocks. She was skeptical about driving such a down-scale car, but now she really likes it. She may buy it for her college-age kid. John |