Hello there Robocop and PhotonWrangler,
If you look at the simplest form of a switcher it has a transistor
collector-emitter junction connected to one end of the inductor,
while the other end of the inductor is connected to the battery.
With the transistor switched 'on' the inductor is effectively in
parallel with the battery, and it gets its charge that way.
Once the transistor is turned off, the CE junction opens but
there is still one end of the inductor connected to the battery +
terminal, which means the voltage on the (now) open end of
the inductor is free to rise up as high as it needs too in order
to force conduction in the output circuit. This open end
voltage rises up high enough to force a diode in the output circuit
to conduct (in circuits with a diode) and charge the output
capacitor. In circuits without a diode, the voltage rises up
high enough to force the Led to finally conduct.
It's kinda simple because there are only two states to
worry about -- the transistor 'on', or the transistor 'off'.
Some of the details get a little tricky such as how the
inductors voltage reverses. Here the funny thing is that
the inductor gets its property to be able to reverse the
voltage across it because of the collapsing magnetic field.
When the inductor charges, its field goes higher and higher,
and the voltage has the same polarity as the battery (it is
in parallel with the battery). When the transistor opens,
the battery is not used to charge the inductor anymore
so the inductors field begins to fall. This change in
the field (from rising to falling) causes the entire
voltage across the inductor to switch from positive to
negative (pretty amazing if you ask me!). This means
that the positive side of the inductor changes to
the other terminal.
Let me see if i can draw a picture because this makes it
much easier to understand:
B is the battery and L is the inductor and + and -
show the polarity of the inductor and battery at the time
and 'gnd' is circuit ground...
<font class="small">Code:</font><hr /><pre>
CHARGING:
|------|
|+ |+
B L
|- |-
|------|
gnd
</pre><hr />
<font class="small">Code:</font><hr /><pre>
DISCHARGING:
- +
|---L---
|+
B
|-
|
gnd
</pre><hr />
Note that in both circuits above the same terminal of the
inductor is always connected to the battery (+) terminal.
The only thing changed is the 'bottom' of the inductor
in the top circuit has been disconnected from ground to
form the lower circuit. This simple change (usually done
with a transistor) causes the inductors voltage to
reverse and the voltage at the + end of the
inductor (lower circuit) to rise to a high value.
If in the lower circuit we had an Led connected between the
inductor and ground, it would conduct and therefore light
up.
Compare the lower circuit (above) with the equivalent
circuit (for a small time period) below:
<font class="small">Code:</font><hr /><pre>
- +
|---B---
|+
B
|-
|
gnd
</pre><hr />
Here we replaced the inductor with a battery that has
the same polarity as the inductor did. This shows how
we get the extra voltage to drive the Led, as the
inductor acts as a second battery in series with the
supply battery for a short time period.
Because this period only lasts for perhaps microseconds,
we have to recharge the inductor again on the next cycle
in order to be able to have it ready to drive the output
again. This makes it look like a tiny rechargable
battery that gets recharged every cycle. It doesnt
take long to discharge this tiny battery, so the cycle
has to repeat very fast (usually around 100,000 times
a second).
In effect, every 1/100,000 of a second, we charge a tiny
battery-like circuit element (using the main battery)
so that we can switch it in series with the main
battery to develop a higher voltage. The voltages
add when in series so we get a higher voltage
then we could using the main battery alone without
a switching circuit.
PhotonWrangler:
As you found out, that voltage can go VERY high and can be
considered life threatening with some inductors. Some
caution has to be used when dealing with these things,
usually when they are out of circuit.
Of course an auto ignition circuit works on this
very principle too and we wouldnt want to go touching
the terminals of the ignition coil when the car is running :-)
Robo,
I like to help people understand whenever i can. I think
people get a reward out of understanding and building their
own Led lights and circuits. That's a good point you made
about how far lights have come recently. Now that i think
about it, im starting to see things i had hoped for some
two years ago. I've seen more and more products turn up
with Leds in them in stores all over now, while two years ago
only a few stores and not many products.
Also, ten years ago you probably couldnt find many lights
with a switching power supply built in them i bet.
Just batteries and a stupid bulb :-)
Take care, and good luck with your LED circuits & flashlights,
Al