[sci.electronics] Switched power supplies, how do they actually work ?

otto@tukki.jyu.fi (Otto J. Makela) (10/15/90)

I recently got into a conversation with an electronics old-timer (he was on
the Apollo project etc).  I had just helped his wife to select a PC/AT clone,
and we got to talking about power supplies and stuff.  Suddenly I find out
that I don't know how a switching power supply works.  Could someone with the
necessary knowledge give me the baby-talk -type explanation so that I won't
get stuck in such an embarassing way the next time ;-) ?  Be gentle, I'm only
a computer hacker with limited (and long-past) electronics experience.  Post
only if you have iron-clad knowledge of this.  No "I thinks", please.
--
   /* * * Otto J. Makela <otto@jyu.fi> * * * * * * * * * * * * * * * * * * */
  /* Phone: +358 41 613 847, BBS: +358 41 211 562 (CCITT, Bell 24/12/300) */
 /* Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE         */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * * * * * */

tony@mcrsys.UUCP (Tony Becker) (10/15/90)

From article <OTTO.90Oct15004800@tukki.jyu.fi>, by otto@tukki.jyu.fi (Otto J. Makela):
> that I don't know how a switching power supply works.  Could someone with the
> necessary knowledge give me the baby-talk -type explanation so that I won't
> get stuck in such an embarassing way the next time ;-) ?  Be gentle, I'm only
> a computer hacker with limited (and long-past) electronics experience.  Post
> only if you have iron-clad knowledge of this.  No "I thinks", please.

Switching power supllies work on the principle of storing energy on a magnetic
field. Let me digress (sp?) for a moment. Old linear regulation stepped down
120V to 6.3Vrms via transformer, rectified it to about 8.5 volts, and then
used a linear regulater (7805, etc) to produce 5V at 1 Amp. Unfortunately
this method dissapated (8.5V - 5V) * 1 Amp of heat and wasted it.
This produced, at best 60% effeciency. Ok for 5Watts out, not good for 220W.


1) Step down switching (most common) [sorry about the poor graphics]

                         /MOSFET
120V-[]-6.3Vrms-X-8.5Vdc-#-|--()()()()--5V
                           ^
                           \Schottky Diode to ground.

 - 120Vrms is stepped down via transformer to 6.3V (usually higher), where it
is rectified to 8.5V dc. A high power, low loss, semiconductor switch is used
to pulse this power through a coil (usually toriod-based) to the 5V output.
When the 5V supply gets to 5.1 V the semiconductor switch is turned off.
In order to keep current flowing in the coil, the magnetic field collapses,
and the input end is clamped to ground by the diode, as the output maintains
the required current. When the output voltage gets to 4.9 volts, the switch
is turned back on, and the cycle repeats. Losses are: Switch (.2V*1Amp),
and Diode (.3V*1 Amp). However, because the power is 'Switched' the switch
loss is only during the ON phase, and the diode loss during the OFF phase.
Additionally: power in is pulsed, as required, to produce over 95% effeciency.
As a rule of thumb, the duty cycle will tend to be [On:Off] 'Vout:(Vin-Vout)'.

Lost yet?
-At turn on time the coil will saturate, requiring that a differencial probe
measure input current, and turn off the switch when the current is too high.
This will also prevent damage if the output is shorted. Without this the
switch will pop sooner or later, and with it the power supply 'soft starts'.

-Most switchers are fixed frequency (50-200KHz), variable duty. These type
require a minimum load to operate. A better method, in my humble opinion,
is to run 'free running switchers'. These are, as the name suggests, variable
frequency and duty cycle, and adjust the best to changing loads.
They work by letting the over/under voltage, and over current circuits
adjust the output for themselves.

-If the output is constant, the coil can be 'tuned', for added effeciency.

2) Step up Switching

 8.5V------
          ()
          ()     Diode
          ------->|---12V output
          |
          # MOSFET

In this method the semiconductor switch pulses the input voltage, through
the coil to ground. When the switch is released, the coil will pass current
out to the 12V, with its other end tied to the input.
This method is usually the cleanest design, because everything is positive,
and referenced to ground (no diff probes).
This was the first common use of switchers, to step up the +5 to +12 for
NMOS chips.

2) Inverter

 8.5V ----# MOSFET
          |
          ----|<---  (-12V) output
          |
          ()
          ()
          ()
          ---Ground.

In this method, the semiconductor switch builds up a field in the coil,
and releases it. The coil swings in voltage, and is then used to supply the
inverted voltage. This circuit requires both differencial current probes
for input limiting and an inverter-type circuit to measure the (-12V)
output relative the the positive control circuit and is the most difficult
of the three to design.

X) how your PC power supply realy works......

The input 120V is rectified to 240Vdc on the hot (line) side. The control
circuit pulses a transformer* (not a coil). The low (isolated) side of the
transformer is rectified and filtered as +5V. An opto-isolator is used
to tell the control circuit the exact value of the +5V supply.
The +/- 12 Volt supplies are generally just rectified and filtered.

* Don't stick your fingers in here, please. It will hurt.

As with (1) above, the losses are in the switch, and the rectifier(s).
However the switch losses are a percentage of the input circuit and
the duty cycle. Since the input voltage is 240V, a lot less current flows
through the switch resulting in a lower voltage drop (5V). As a percentage
of 240V, this is only 2%. With a 50% duty this is only 1%.

Now that you're totally confused.....

Texas Instr., National, Motorola, Siliconix, etc all produce app notes
on switchers as a use for their high power mosfets.

*******************************************************************************
| \      / |     /=|     /=|      Tony Becker           MCRSYS Florida
 \ \    / /       ||      ||      uunet!mcrsys!tony     (813) 799-1836 (voice)
  \ \  / /        ||      ||
   \ \/ /         ||      ||      Opinions expressed are my own, and don't
    \  /          ||      ||      necessarily reflect those of any other
    /  \          ||      ||      members of my species.
   / /\ \         ||      ||        -It's nice to live in a society where this
  / /  \ \        ||      ||         is possible, and not a capital crime!
 / /    \ \       ||      ||
| /      \ |    |====|  |====|
*******************************************************************************

henry@zoo.toronto.edu (Henry Spencer) (10/15/90)

In article <OTTO.90Oct15004800@tukki.jyu.fi> otto@tukki.jyu.fi (Otto J. Makela) writes:
>... talking about power supplies and stuff.  Suddenly I find out
>that I don't know how a switching power supply works.  Could someone with the
>necessary knowledge give me the baby-talk -type explanation...

Here's one I posted some time ago:

> ... can anyone take the time to explain the theory
> behind how these supplies actually work, and why they are used rather than
> the traditional transformer/diode bridge type?

A switching supply replaces not just the transformer and diode bridge, but
also the regulators that supply precise output voltages.  That's important.
The standard sort of regulator for the old linear (transformer/diode) supply
holds its output at a given voltage by imposing enough resistance internally
to drop the input voltage to the desired output voltage.  The trouble is that
passing high currents through a resistance generates a lot of heat and wastes
a lot of power.

A switching supply, on the other hand, turns the flow on and off at a high
frequency such that the *average* output voltage is the desired one, and
then filters the result to get a (more or less) smooth DC voltage again.
The key point here is that the control transistors are either fully off (no
current flowing, so no power loss) or fully on (minimum voltage drop through
the transistor, so minimal power loss), not halfway between as they usually
are in a linear supply.  This is much more efficient.  As a side issue, if
one does want to use a transformer -- usually desirable, partly for
isolation from the AC line and partly to make design easier -- the switching
can be done at high frequencies where physically-small transformers are
efficient.  This eliminates the great lump of metal in the corner. :-)

Both types of supplies have their advantages.  Switchers are smaller,
lighter, and more efficient.  On the other hand, their output tends to be
noisier, they have to be carefully designed to minimize radiated interference,
they are more complex, and they often regulate poorly when asked to run at
much less than full output.  Generally, switchers come out better for
powering big pieces of digital equipment (which have semi-predictable power
demands and don't mind a bit of noise) and linears come out better for lab
work (highly variable demands), analog work (noise sensitivity), and small
equipment (lower complexity).
-- 
"...the i860 is a wonderful source     | Henry Spencer at U of Toronto Zoology
of thesis topics."    --Preston Briggs |  henry@zoo.toronto.edu   utzoo!henry

jbm@eos.arc.nasa.gov (Jeffrey Mulligan) (10/16/90)

henry@zoo.toronto.edu (Henry Spencer) writes:

>In article <OTTO.90Oct15004800@tukki.jyu.fi> otto@tukki.jyu.fi (Otto J. Makela) writes:
>>... talking about power supplies and stuff.  Suddenly I find out
>>that I don't know how a switching power supply works.  Could someone with the
>>necessary knowledge give me the baby-talk -type explanation...

>Here's one I posted some time ago:

>A switching supply replaces not just the transformer and diode bridge, but
>also the regulators that supply precise output voltages.

[Lot's of stuff deleted]

I thought that Henry's description was pretty good (but what do I know),
but I thought that he left out a description of an important component
which is key to understanding *how* these things work:  a big
inductor in series with the load.  My understanding of a switching
regulator (which would take as input unregulated DC such as from a
xformer/bridge), is that it consists of a series pass transistor
(as described) followed by a big inductor which dumps onto a big
filter capacitor.  The inductor wants to have constant current, so
a reverse bias diode to ground is provided to supply the current when
the transistor is switched off.  And that's basically it, except for
the feedback circuit to do the switching, typically pulse-width-modulation
at some high rate.

I don't understand how a switcher "replaces" the bridge,
since the AC mains still have to be converted to DC.
I suppose that the transformer can be eliminated since no
voltage step-down is required (but then the pass transistor has
to have a higher voltage rating), and the inductor resistance
would provide current limiting (like the transformer) for
limited safety.


-- 

	Jeff Mulligan (jbm@eos.arc.nasa.gov)
	NASA/Ames Research Ctr., Mail Stop 262-2, Moffett Field CA, 94035
	(415) 604-3745

dana@lando.la.locus.com (Dana H. Myers) (10/16/90)

In article <OTTO.90Oct15004800@tukki.jyu.fi> otto@tukki.jyu.fi (Otto J. Makela) writes:
>and we got to talking about power supplies and stuff.  Suddenly I find out
>that I don't know how a switching power supply works.  Could someone with the
>necessary knowledge give me the baby-talk -type explanation so that I won't
>get stuck in such an embarassing way the next time ;-) ?

   Switching power supplies are designed to use 'saturated switches', i.e.,
the active regulator element is either fully on or fully off. If one is
using a MOSFET, then the term saturated isn't directly applicable, but means
the same nonetheless.

   A simple form of switching power supply consists of a switching
element and a low-pass filter. The low pass filter is usually an inductor
and fairly small capacitor. Also in this power supply is the controller,
which switches the switching element on and off (ideally never in a linear
mode) at the correct duty cycle to produce the desired voltage at the
output of the low pass filter.

  More complicated switchers, such as the one in the AT, rectify and
filter the incoming mains power to generate a high voltage rail,
something like 170V in the USA, which is switched through a small,
efficient transformer at a much higher frequency than the mains
frequency.  The switches used in the power supply must switch a much
higher voltage than the previous example, but at a much lower current.
There may be multiple secondaries on the power transformer; the voltages
will be related to each other and usually the duty cycle of the switcher
is adjusted based on one of the output voltages (often the +5V output).
All the secondaries may have only a rectifier(s) and small filter cap(s),
with no other active elements.

  In each of these cases, the switches are operated in such a mode to
minimize the I^2*R power loss in the active device. In a linear
regulator, the output voltage is regulated by altering the voltage
drop across the actice element. If you have a +5V supply with +9V in and
a 2A load, the approximate power dissipated in the pass element will be
something like (Vin-Vout)*Iout or 8 Watts. With bipolar devices it can
be worse; the base current contributes to power dissipation in the
active element. With a MOSFET device, the gate current is essentially
nil, and the active device dissipates exactly (Vin-Vout)*Iout.
In terms of efficiency, this linear supply is running 18W in and 10W
out; this is about 56% power efficiency.

  The efficiency of switchers is a more complicated subject, depending
on the configuration. Suffice it to say a well-designed switcher can
achieve 90% power efficiency, although I don't think the switchers
in PCs are designed for maximum efficiency so much as lightest weight
and lowest cost.

   Of course, *I think* this is all correct :-)

/*
 * Dana H. Myers KK6JQ 		| Views expressed here are	*
 * (213) 337-5136 		| mine and do not necessarily	*
 * dana@locus.com		| reflect those of my employer	*
 */

myers@hpfcdj.HP.COM (Bob Myers) (10/18/90)

>I don't understand how a switcher "replaces" the bridge,
>since the AC mains still have to be converted to DC.
>I suppose that the transformer can be eliminated since no
>voltage step-down is required (but then the pass transistor has

In fact, there IS a rectifier after the AC mains in switchers - I think
Henry got a bit carried away with that one.  Also, one will very often
find a transformer included in a switching supply - but located just
"after" the switch, and operating at the switching frequency (so it's
considerably different than the typical 60Hz power transformer of linear
designs).  For that matter, there's really no *need* for a power transformer
in a linear design - but it'd take a helluva pass transistor to get from the
300 VDC rail down to, say, a +5 VDC output! :-)  A true "transformerless"
design in either case usually only comes about when the desired output
voltage is within a reasonable fraction (up or down) of the DC rails existing
immediately after the rectifier.

One other *disadvantage of switchers that I believe Henry forgot to mention
is a typically atrocious power factor, as the switching action plays merry
hell with the input current waveform.  This has become quite a concern at
sites which have a large number of independent switchers (such as a bunch
of PCs or workstations) on their AC lines.


Bob Myers  KC0EW   HP Graphics Tech. Div.|  Opinions expressed here are not
                   Ft. Collins, Colorado |  those of my employer or any other
myers@fc.hp.com                          |  sentient life-form on this planet.

henry@zoo.toronto.edu (Henry Spencer) (10/21/90)

In article <17660122@hpfcdj.HP.COM> myers@hpfcdj.HP.COM (Bob Myers) writes:
>One other *disadvantage of switchers that I believe Henry forgot to mention
>is a typically atrocious power factor, as the switching action plays merry
>hell with the input current waveform.  This has become quite a concern at
>sites which have a large number of independent switchers (such as a bunch
>of PCs or workstations) on their AC lines.

Actually, I believe the problem here is common to both linears and switchers.
It's not the switching action per se, given that there is a diode bridge and
a bit of a filter capacitor in a typical switcher.  (I didn't overlook this,
by the way, just considered it an irrelevant detail.)  The problem occurs
in any supply which gets its initial DC by rectification followed by a
filter capacitor:  the rectifier diodes conduct *only* when the input
voltage exceeds the voltage on the capacitor (ignoring details like diode
drop).  This typically means that the current waveform resembles a sort
of interrupted sawtooth, with no drain until the AC wave is close to peak,
then a big surge as the diodes fire, then a gradual taper as the capacitor
charges, and then cutoff and nothing again as the AC voltage heads for zero.

This is actually much worse than what one would get from the switching
action, because large numbers of independent switchers would not generally
maintain a consistent phase relationship in their switching circuits, and
so things would average out.  But *everybody* is sucking current madly at
the AC peaks, linears and switchers alike.

There is a move afoot towards supplies with better power factors, if only
because desktop computers are getting bigger and want more power, and
people want to go on plugging them into ordinary 15-amp circuits.  The
lousy power factor of conventional supplies makes it impossible to use
the full capacity of a 15A circuit.
-- 
The type syntax for C is essentially   | Henry Spencer at U of Toronto Zoology
unparsable.             --Rob Pike     |  henry@zoo.toronto.edu   utzoo!henry

ftpam1@acad3.fai.alaska.edu (MUNTS PHILLIP A) (10/21/90)

In article <17660122@hpfcdj.HP.COM>, myers@hpfcdj.HP.COM (Bob Myers) writes... 
>One other *disadvantage of switchers that I believe Henry forgot to mention
>is a typically atrocious power factor, as the switching action plays merry
>hell with the input current waveform.  This has become quite a concern at
>sites which have a large number of independent switchers (such as a bunch
>of PCs or workstations) on their AC lines.

     They also have a negative resistance characteristic.  If the AC mains sag
(brown out) the switching supply will simply adjust its duty cycle and draw
more current.  Imagine a whole city of switchers during a brown out...as the
voltage drops each power supply draws more current which makes the voltage drop
some more...

     A couple of years ago I went to Britain on business with a microprocessor
emulator with a Panasonic 5V switching power supply.  The company provided me
with one of the rinky dink shaver adapters to plug it into the 220V over there.
Just before the fuse popped, that switcher was providing 5V out with less than
20VAC in!  (An intermittent 5V, which is why I happened to be measuring the
input.)

Philip Munts N7AHL
NRA Extremist, etc.
University of Alaska, Fairbanks

wolfgang@wsrcc.uucp (Wolfgang S. Rupprecht) (10/22/90)

>In article <17660122@hpfcdj.HP.COM> myers@hpfcdj.HP.COM (Bob Myers) writes:
>>One other *disadvantage of switchers that I believe Henry forgot to mention
>>is a typically atrocious power factor ...

In sci.electronics you write:
>Actually, I believe the problem here is common to both linears and switchers.
>It's not the switching action per se, given that there is a diode bridge and
>a bit of a filter capacitor in a typical switcher. 

Switchers are worse because they have only the input diodes and input
filter capacitor impedence to limit the peak current.

Normal linears have a transformer's impedence also.  This actually
tends to help alot, since the core usually just saturates and takes
out some of the worst of the current spiking.

What PS designers will most likely start doing is running with little
or no input filtering.  Just vary the swithing ratio to take into
account the varying input voltage.

-wolfgang

-- 
Wolfgang Rupprecht    uunet!{nancy,usaos,media!ka3ovk}!wsrcc!wolfgang
Snail Mail Address:   Box 6524, Alexandria, VA 22306-0524

gsteckel@vergil.East.Sun.COM (Geoff Steckel - Sun BOS Software) (10/22/90)

A couple of notes about the input current nonlinearities of switching
power supplies:

The "power factor" for a linear (but reactive) load is the ratio of resistive
power drawn to total volts * amps drawn (Watts / VA).  The UL (Underwriters
Laboratories, the de facto US safety agency) and the writers of the National
Electrical Code (other countries: CSA, VDE, etc.) require that devices connected
to a wall outlet draw no more than the rated current, even if this is reactive
(out-of-phase) current and thus not useful for driving the load.  This limits
the normal switcher to about 1000-1200 W when connected to a 15 A/110V outlet
which can deliver 1650 VA (or 1650 W to a resistive load).

Most switching power supplies generate about 350VDC from the AC input
to run a high power/high frequency switch (transistor/FET/SCR mechanism),
which drives inductors or transformers to generate the requisite voltage AC,
which is rectified and filtered at the output.

The high frequency of the switch allows the magnetic and capacitive
components to be made (relatively) much smaller than the corresponding 60 HZ
or 120 HZ parts used in linear supplies, since energy needs to be stored for
much shorter times.  Energy storage is mostly in the input capacitors, at
high voltage.

The normal input topology is a transformerless voltage doubler for 110V,
full wave for 220V.  `Wide range input (90-250V)' usually use the doubler
and derate the heck out of the input storage caps/switch transistors.

Unless fitted with a power factor/waveform corrector, the line input
can only recharge the input capacitors when Vin is greater than VCapacitor.
This means that the entire input current is drawn during the peaks of the
input voltage wave.  This highly nonlinear current draw effectively generates
harmonics (measurable up to 11th or higher) of the input wave.

A 1000W supply can draw several amperes of 120 and 180 HZ current from its
source.  One non-obvious side effect is the interaction of this with the
building wiring codes (remember the safety agencies? (:-)).  This gets a
little fancy:

Most wiring systems for large buildings use 3-phase power (usually 3 wire
into the area, and 4 wire inside), and distribute loads
across the three phases (0, 120, 240 degrees).  Properly done, the return
currents balance, so the net current in the neutral (4th) wire is 0.  The
safety agencies assume this, and allow the common neutral and safety ground
wires to be the same size as the hot wires.

This only works if the loads are linear.  The 3'rd harmonic does not cancel
in the neutral, but adds.  According to an article in Electronics Products,
(written by an employee of a power factor corrector manufacturer, caveat emptor)
there have been (small) fires started by overheated neutral runs in massive
office cubicle sets with many computers in the cubes.

In any case, the European safety agencies and the US DOD have become
concerned enough to require that soon all supplies over (100? W / Europe?
and 300?W US sold to Gov't) to reduce the input harmonic current to a very
small quantity.

There are a number of circuit topologies to do this; the Electronics Products
article discussed a number.  Some involved inductors or other resonant elements,
and some involved active input circuitry.  One side effect of some of the
topologies is the ability to work over a very wide range of input voltages.
A previous poster noted the negative input impedance of a switching power
supply!

There may be other side effects of the nonlinear current drain involving
power substation transformers or other more exotic equipment.  Any info out
there?
	geoff steckel (gwes@wjh12.harvard.EDU)
			(...!husc6!wjh12!omnivore!gws)
Disclaimer: I am not affiliated with Sun Microsystems, despite the From: line.
This posting is entirely the author's responsibility.