I want to make an LED plug-in nightlamp. I understand how to drop the voltage with a resistor and how to calculate the resistor needed. But since the LED is a diode and the source is AC, do I calculate the drop from 120 volts "peak-to-peak", or is it from 60 volts "peak to zero", since the diode should filter out one half of the sine wave?
Or should I use a rectifier and just forget using the LED as a diode?
Of course you will have to use a rectifier, because the reverse voltage of a LED is not high enough to block (you would just blow the LED in a very spectacular way).
Calculate the resistor by using the RMS (which is the common voltage, the peak voltage is fctor 1.44 higher):
When using a bridge rectifier (4 diodes, f.e. 1N4007): R=60V/0.02A=3kOhms
Remember to use a big Resistor, because the power is P=60Vx0.02A=1.2W !!
And also think of appropriate cooling of this resistor (enough air surrounding it, mounting with a little space from the PC board).
If you want to use multiple LEDs, just connect them in serial, so you dont have to use higher current.
If the nightlight is too bright, try a resistor of, say, 30kOhms, to reduce the current to 2mA. I think it would be bright enough. This would also make it able to use a smaller resistor (0.12W dissipated).
The land of Rednecks & Rebels. North-Western TN, USA
Posts
1,099
Re: LED nightlamp
I believe a transformer would be best also. If you put all that electricity through one big resistor, you are going to have to dissipate a lot of heat and might even create a fire hazard if not done correctly. Also there is the matter of how efficient this is gonna be(As you probably already realize, heat created is electricity wasted). I would think that efficiency would be a big concern in making a night-light, because otherwise why not just leave a regular light on somewhere all night? I would recommend getting one of those cheap Wal-Mart variable power supplies(Still less than $10.00, I believe). That way you could just dial the exact amount of voltage you need for a circuit and can even reverse the polarity when needed. These sort of power supplies are very fun to play around with and even if you get bored with the night-light idea someday, you will always have the transformer to use on future projects. [img]images/icons/smile.gif[/img]
Hi Joe, I`ll add my 1 cent. I agree it would be safer to use a transformer and if you look around your house you might allready have one you can use...I have a bunch of them in a drawer from long dead things...maybe you do too...