Man-wai Chang said:
Where is the ground pin in the diagram??? I can't find it.
The supply has a floating secondary. The transformer provides
isolation from the line side, making it safe.
*******
When you connect that supply to a computer, ground would go
to the rail at the bottom of the picture. The computer would
establish the ground reference, if you were powering a peripheral.
If all you're doing, is operating your LED circuit, no ground is needed.
Just stick your resistor and LED combination across the output on the right.
The three terminal regulators, are available for many different voltages.
These are some examples of ones in my parts bin.
7805 +5V Good for USB devices, a USB 2.5" hard drive enclosure
7810 +10V Good for running remote burgler alarm circuits needing 9V.
7812 +12V Good for powering portable computer fans, for cooling.
I have one of these in the computer room right now.
7905 -5V Useful for putting back a signal on pin 18 of an ATX supply,
for computers that insist on a -5V rail.
7912 -12V In combination with a +12V regulator, used for powering
operational amplifier circuits. Or for powering RS232
level shifter chips (GD75232 type).
The transformer, bridge rectifier, and filter cap connection details change
a bit, for the negative regulators. And if you need further connection
diagrams, the three terminal regulator manufacturers provide data sheets.
(Start at the back of this document and work back to the beginning.)
http://www.fairchildsemi.com/ds/LM/LM7805.pdf
(Example of a three terminal regulator, used for making negative voltages
with respect to ground. The incoming voltage to the regulator, must also
be negative, so care must be taken in connecting the transformer, bridge
rectifier, and filter cap, to this thing.)
http://www.national.com/ds/LM/LM7905.pdf
Your LED circuit doesn't really need a regulator. You could do just
a transformer, bridge rectifier (or even a single diode), and your
resistor and LED circuit. A transformer and bridge rectifier produce
a 120Hz pulsating DC voltage, which would still be suitable for making
a light source from a LED.
1) Simplest circuit. A $0.10 LED has a PIV (Peak inverse voltage) rating
of 5V. The transformer would have to be specially selected
in this case, to meet that. I don't think I've seen any
3V AC transformers.
x---------------\||\------------------- resistor --+
/||/ | +
220VAC \||\ LED
/||/ | -
x---------------\||\-------------------------------+
2) If you have any concerns about PIV rating on the LED, you add a 1N4001
thru 1N4004 type diode in series. For example, you could purchase a
6.3V filament transformer, rated to run from your supply voltage there.
This gives a pulsating 60Hz DC signal, across the LED. The "band" on the
1N4001 in the diagram, would be on the right hand side.
|\|
x---------------\||\---------| |------ resistor ---+
/||/ |/| | +
220VAC \||\ 1N4001 LED
/||/ | -
x---------------\||\-------------------------------+
3) If you use a bridge rectifier (four lead device, two leads labeled
with "~" symbol for transformer input, other two are "+" and +-"),
then the DC fed to the LED pulsates at 120Hz.
+---------+
| |
x---------------\||\---------| ~ + |------ resistor ---+
/||/ | | | +
220VAC \||\ | | LED
/||/ | | | -
x---------------\||\---------| ~ - |-------------------+
| |
+---------+
There is an example of a bridge rectifier here. This is the one
I used in a recent project. It's huge, so you can't lose it
This is part of my new audio amp, power supply section. This is
much bigger than needed, but was purchased off the rack at my
electronics store, because it was actually cheaper than some
smaller rated ones.
http://www.nteinc.com/specs/53000to53099/pdf/nte53006_10.pdf
4) Adding an electrolytic capacitor, removed most of the pulsations
and smooths the voltage. But if the flicker is at 120Hz, I don't
really think this is necessary. Maybe 100uF 50V would be a safe choice.
Being careful, to connect (+) on the cap, to (+) on the bridge rectifier.
All the pluses, go together. The high working rating on the voltage
of the capacitor, is so you can use the capacitor for other projects
later.
+---------+
| |
x---------------\||\---------| ~ + |----+--- resistor ---+
/||/ | | | + | +
220VAC \||\ | | Cap LED
/||/ | | | - | -
x---------------\||\---------| ~ - |----+----------------+
| |
+---------+
As an example of purchasing a transformer, there are some examples here.
Since I'm in Canada, I shop for 115 or 120V transformers.
http://www.circuittest.com/Data/CTCAT-15.pdf
For example, take 640-1203. It is a 120VAC input, 12 volt center tapped output.
In your case, all you want is half the output. That would be plenty to play
with. The nice thing about a center tapped transformer, is it is easier to
tell which side is the primary, and which is the secondary.
black red +--------+
x---------------/||/---------| ~ + |---- ...
\||\ | |
/||/ white | |
120VAC \||\---------| ~ - |---- ...
/||/ +--------+
black \||\ red
x---------------/||/---------/ NC
The output of the thing in the previous diagram, looks like this (120Hz).
http://www.play-hookey.com/ac_theory/images/ps_sine_fw_rect.gif
(
http://www.play-hookey.com/ac_theory/ps_filters.html )
*******
You're probably wondering "what voltage will I get" ?
That is partially answered here. See the diagram in the
"Root mean square amplitude" section here.
http://en.wikipedia.org/wiki/Amplitude
When you buy the transformer, it is rated by (3) or RMS. We have
a 12V transformer, and we take half the output (red and white leads)
or 6V. When rectified by the bridge rectifier, 6V * SQRT(2) = 6 * 1.414
gives 8.48V peak. The diodes have a small drop across them as well,
which becomes more apparent when a little bit of loading is present.
You'd adjust your LED/resistor combination, for the new, higher voltage.
If you add a filter capacitor, plus a 7805, then the pulsations would be
completely eliminated, and your original arithmetic for selecting the
resistor for the LED, would still be valid.
*******
A word on safety. When you build an AC powered home project, add a fuse to
it. Such as a cartridge fuse. If you make a mistake, there may be fewer
consequences if a fuse is present. The fuse is placed close to the line side.
For example, if you're clumsy with insulating things, you definitely want
a fuse here. Where the fuse is connected on the left hand side, you
definitely want that well covered, so no accidents can happen.
You can still be electrocuted by this thing, is you're really
really stupid (like dropping the whole circuit into your bathtub
while the tub is full of water, and you're in it). But that is
true of so many other electronic items that run from AC.
black red +--------+
x----- fuse -----------------/||/---------| ~ + |---- ...
\||\ | |
/||/ white | |
120VAC \||\---------| ~ - |---- ...
/||/ +--------+
black \||\ red
x----------------------------/||/---------/ NC
I have a fuse in my new audio amplifier project, for protection.
I haven't managed to blow it, yet
For the small circuit
you're building, perhaps a 1 amp fuse would be sufficient.
If you make the fuse value too small, it might blow on inrush
current.
(Cartridge fuse holder)
http://www.radioshack.com/product/index.jsp?productId=2102784
This is the dangerous kind of fuse holder I used in my audio amplifier.
To make this safe, I cover the wiring area with a plastic plate. The
plastic cover is intended to prevent me from dropping my screwdriver onto
the contacts. My implementation is *not* waterproof. There is
still danger, if I spill a beverage in the box.
(Chassis type fuse holder - dangerous!)
http://www.radioshack.com/product/index.jsp?productId=2062257
Have fun,
Paul