# Basic 120vac to 5vdc power supply

Discussion in 'The Projects Forum' started by slvrstang, Sep 27, 2008.

1. ### slvrstang Thread Starter Member

Sep 27, 2008
10
0
Hello, I'm a Computer Engineering student currently and am building a 120vac to 5vdc power supply.

This is my circuit thus far. It works, but as you can see I'm getting only 4.85v from the regulator.

The real question I have is I wanted to put in a lighted rocker switch. I bought one and placed it in between the 12vac and the diode bridge. I connected terminals 1 and 3 on the rocker switch only. The problem with this is that the switch is bright when first turned on then dims and shuts off after about 2 seconds. I tried placing a 100ohm resistor as a load as depicted in the picture but the voltage dropped from 4.85 to about 2.5. Why?

Last edited: Sep 27, 2008
2. ### m.majid Active Member

May 28, 2008
39
0
i am confused, your problem tiltle is about converting 120 v AC to 5v DC, but your schematic shows diagram of converting 12 v AC to 5 v DC

how ever i realized 3 problems in your schematic:

1. it seems you meant 12 v ac, so u must set the "rms" value to 12,
you set the "pick" value to 12 so the "rms" became 8.49, (12 = sqrt(2)*8.49)
pick value is the maximum value of sine wave,
rms is the efficient value that is apeared when AC is converted to DC, and always pick = sqrt(2)*rms

2. the 7805 ic needs at least 8 vlot in input to operate correctly,
in your schematic because ac voltage is 8.49 , after passing through 2 diodes,
it drops 1.4 volt (0.7 volt in each diode) so the input voltage to 7805 becomes 7 volt,
so the 7805 dont operate correctly

3. capacitor before 7805, 470uF/25 is enough u dont need 4700 uF
and capacitor after 7805 must be 1uF (according to 7805 datasheets)
also put a bypass capacitor 0.1 uF (100nF) bitween in and gnd (according to 7805 datasheets)

Last edited: Sep 27, 2008
3. ### slvrstang Thread Starter Member

Sep 27, 2008
10
0
I'm sorry, I am converting from 120vac to 5vdc. I just used a 12vac power supply in the simulation because I couldn't figure out how to use their transformer component

The real diagram has 120vac into a 120vac-->12vac transformer into the diode bridge.

I really just don't understand how the 3 terminal lighted rocker switches work.

http://www.arcolectric.com/pdfs/USA_cat199_pages/Cat199pages_22+23_2006.pdf

That's the data sheet for the switch I am using, it is the 5503 version.

4. ### Audioguru New Member

Dec 20, 2007
9,411
896
Hello M. Majid,
8.49V AC has a peak voltage of 12.0V. The full-wave rectifier drops it to about 10.5VDC which is plenty as the input yo the 7805 regulator.

The regulator has a voltage tolerance of 4% which is from 4.8V to 5.2V. So 4.86V is fine.

The light in the switch might be an LED that uses DC, not AC. Do not connect the light in series with the input to the regulator or it will limut the current like you see when the voltage drops to 2.5V when ther is a 50mA load.

5. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
What is the full part number for the switch?

Terminal 2 is where the "hot" lead gets connected. Pin 1 goes towards the load. Pin 3 is the switched neutral side that turns on the lamp.

How you'd want to connect it up depends upon if the switch is rated for 12 or 120 volts.
The 12v switches have an incandescent bulb.
The 120v and 240v switches have neon bulbs.

Last edited: Sep 27, 2008
6. ### slvrstang Thread Starter Member

Sep 27, 2008
10
0
The switch is 12v incandescent. I finally figured it out to connect it.

The first terminal is connected to the load.

The second is connected to +5v of DC. (although ac works to light it)

The third is then connected to GND.

Thank you for the help. The circuit works fine now. The light stays lit when no load is applied and the voltage does not drop when a load is applied.