Dick Cappels' project pages http://www.projects.cappels.org
Return to HOME (more projects)
A White LED Night Light Design
The safest Nigh Light I Know How to Build

The night light with eight white LEDs. Its been operating continuously

for over six years. The plastics housing is from a florescent night light.

Find updates at www.projects.cappels.org

This project uses lethal voltages.  If you are not experienced in working with lethal voltages, read this project, but don't build it. You only have one life, and AC power can take it from you very quickly, or leave you with terrible injuries.

When working on high voltages, remember:
Keep one hand in you back pocket. Don't provide a path through your heart.
Use and insulated mat or proper insulated footwear (bare feet on a tile or concrete floor doesn't make it.)
Make sure your equipment is in good repair and is properly grounded.
Never assume a conductor is safe to touch.
Don't work when alone.
When working with AC line voltages, use a ground fault interrupter.
Never work on high voltages while under the influence of alcohol or drugs.

Do not build this project if you are not experienced in working with lethal voltages.

One more warning: Failure to use the fuse and AC line rated capacitors used in this project can result in personal injury, death, and the destruction of property. Be sure you know the parts you are using and the role they play in the safety of the circuit's operation. Any use of this information is at the user's discretion and risk; in no case will Richard Cappels be responsible for any injury, death, or loss resulting from the reliance of any information provided on this website. If you aren't competent to work on a particular project, don't.


I made a pair of LED night lights while living in an apartment in Bangkok several years ago. I am not blaming the electrical service in my building, but of the two years that I lived there, I went though several florescent night lights. Finally, I got tired of replacing the lights every few months and decided that since I had a lot of white LED, they could be put to good use. The result was a pair of LED night lights that have served me well for over six years as of this writing.

Each light used LEDs from a different source. The LEDs from Nichea stayed the brightest and whitest while the bargain-basement LEDs from a source in Hong Kong tended to drift toward pink and yellowis tints over time. That's 50,000 hours, and the lights are still perfectly serviceable, but you can tell from the photo at the top of this page that the plastics have changed color and look their age. Fifty thousand hours and still going strong is testamony to how long conservatively driven LEDs can last, especially given that the Nichea LEDs were manufactured last century -way back in 1999, the early days of modern white LEDs.

The Circuit

There are two strings of LEDs, one conducts on each of the half cycles of the AC power line. It is important to place LEDs operating from opposite half cycles next to each other so as to not have noticeable flicker.

The first thing you should notice about the AC Line Input and Trickle Charging Circuit is the fuse. Not only one fuse, but two, because R1 is a  fusible resistor.  I'm pretty concerned about personal electrical and fire safety, especially when it comes to AC line operated devices in my home. I'll come back to the fuse later, but first, a little bit about how the circuit works.

Under normal, operation, a little while after power is first applied to the circuit,  the AC voltage from the power line sees R1, the 120 Ohm resistor in series with the 0,47 uf capacitor and the parallel-series circuit of the 24 volt MOV (Metal Oxide Varistor) and the LEDs in series with the 120 ohm resistor.  R1, a fusible resistor, limits the maximum current at switch-on, while the 24 volt MOV limits the voltage applied to the LEDs in series with the 120 ohm resistor.  The MOV does not conduct in normal operation, but sometimes at the application of power, it saves the LEDs. I tested the circuit by shorting R1 and applying power -the result was one or more damaged LEDs. I repeated the experiment, shorting the 120 ohm resistor in series with the LEDs with the same result. I then removed the MOV and applied power several times and managed to induce failures in the LEDs again. All three of these parts are need to assure that the peak current from the power line will not damage the LEDs.

I also applied power with the 0.47 uf capacitor shorted. R1, the fusible resistor opened as it should have, to prevent fire. I added the separate 800 ma fuse because I didn't know the current rating of R1 and wanted to have at least one fuse in the circuit for which I knew the current rating.

The RMS current through the input circuit is approximately equal to the input voltage divided by the series impedance. Impedance is equal to the square root of resistance squared plus the reactance of C1 squared.  The reactance of C1 is
1/(6.28 x 50 x .000,000,47) = 6,778 ohms. This is very large compared to the resistance, which is dominated by the 120 Ohm R1, so as a practical matter, we can say that current is equal to the input voltage divided by the reactance (6.8k) of C1. In the calculation above, I neglected the voltage drop of the LEDs to simplify the calculation; the more fastidious among us will want to take that additional drop into account.

The RMS current, in amps, is equal to 240 VRMS / 6.8 k =  35 milliamps RMS. The average current is 89% of the RMS value, or 31 ma.

Given that any given LED is only on during one half of the AC power cycle, the average current through the LEDs will be approximately 15.5 ma. When designing an LED device to operate for many years, its a good idea to go easy on the current so that the light output doesn't drop off ot an unusable level too soon.

A few critical words on the election of components for this part of the circuit. The key safety components are C1, R1, and F1. C1 is an X type capacitor. X type capacitors meet certain safety specifications and are designed to be safely used across the AC power line. Other types of capacitors may fail from the constant AC power line voltage across it, and when they fail, the results could be deadly. Don't use other types of capacitors. The reason that C1 is a 0.47 uf capacitor is that this is the largest value  X capacitor that I could get my hands on.

A review of safety capacitors can be found at the URL below (you should be able to click on URL -just remember to use your browser's back buttom to come back here!):

F1 is there just in case C1 does short out. I feel that, although the likelihood of C1 failing as a short are extremely remote, that to me, its worth the small cost of the fuse to provide a little additional peace of mind.

Relevant to the 0.47 uf capacitors, two 470k resistors are across the capacitor to bleed off the charge on C1 so that I won't get shocked if I touch the power failure light's AC line contacts. The time constant is only 940k Ohms x 0.47 uf = 0.4 second, so the voltage would bleed down to less than 5 volts in about two a seconds.  The reason I used two resistors in series instead of just using a single 1 Meg Ohm resistor, was to assure that there was sufficient margin in the resistor's voltage rating. The resistors I used were nonflammable 1/4 carbon film type.

R1 is there to limit the maximum current when the power failure light is first plugged into the AC line. Since the RMS voltage is 240 volts, the maximum peak voltage across the input is 240 volts x 1.414 = 340 volts peak. If the power plug makes contact with the AC line at the instant the power line is at 340 volts.  Since C1 is discharged when the power night light is first plugged into the AC line, and the MOV clamps voltage at about 24 volts, the maximum current through R1 and the MOV is approximately
(340V - 24V) / 20 Ohms = 16 amps. Without R1 the current would be very high, and a small fraction of that current could damage one of the semiconductors in the circuit if, by chance of a ground loop, some of that current were to get into other parts of the circuit. It also keeps the sparks down when you plug the power failure light into the wall.

The 120 ohm resistor in series with the LEDs serves the important purpose of limiting the current through the LEDs. Since the maximum voltage across V1 is around 24 volts peak,  the maximum current  into the LEDs is (24 volts- 20 volt LED forward voltage/120 Ohms = 33 milliamps (not a coincidence that that this is close to the normal peak current calculated above.  V1 does not conduct often during normal operation.

Construction And Testing

A piece of pre punched fiberglass board was cut to fit inside a florescent night light enclosure and the components placed on the board. Care was taken to keep the creepage path between opposite phase conductors to the left of the MOV in the schematic at least 10 millimeters.

I used the plastics for a florescent night light that I bought at a department store, so I felt confident that the enclosure design was safe to use for this application. The circuit draws considerably less power than the florescent lamp did, so heat was not a concern.

After putting the night light together, double-check each connection against the schematic and check the DC resistance at the AC plug. If you don't read close to 1 meg ohm, something is wrong; recheck the wiring and the components. Don't skip the inspection and electrical test.

Before applying power, carefully inspect the exterior to assure yourself that no electrical conductors other than the AC plug are exposed.

When applying power for the first time, its a good idea to put the night light at the end of a 1 or 2 meter extension cord (even longer is better!), then plug the extension cord into the wall. If there are any flying parts, an that happens sometimes, the distance should help protect you.

I made two of these. One has eight LEDs and the other has ten LEDs, and both have been operating almost continuously for over six years as of this writing. The provide plenty of light to a hallway and a bathroom. Each fixture costs me about US$1.60 a year to operate. While making small corrections in November. 2015, I note that now, after about 9 1/2 years of continuous operation they lights are still operating.

HOME (More Projects)
Contents 2012 Richard Cappels All Rights Reserved. Find updates at www.projects.cappels.org

First posted in January, 2012
Corrections in November 2015

You can send  email to me at projects(at)cappels.org. Replace "(at)" with "@" before mailing.

Use of information presented on this page is for personal, nonprofit educational and noncommercial use only. This material (including object files) is copyrighted by Richard Cappels and may not be republished or used directly for commercial purposes. For commercial license, click here.

  Liability Disclaimer and intellectual property notice
(Summary: No warranties, use these pages at your own risk. You may use the information provided here for personal and educational purposes but you may not republish or use this information for any commercial purpose without explicit permission.) I neither express nor imply any warranty for the quality, fitness for any particular purpose or  user, or freedom from patents or other restrictions on the rights of use of any software, firmware, hardware, design, service,information, or advice provided, mentioned,or made reference to in these pages. By utilizing or relying on software, firmware, hardware, design, service,information, or advice provided, mentioned, or made reference to in these pages, the user takes responsibility to assume all risk and associated with said activity and hold Richard Cappels harmless in the event of any loss or expense associated with said activity. The contents of this web site, unless otherwise noted, is copyrighted by Richard Cappels. Use of information presented on this site for personal, nonprofit educational and noncommercial use is encouraged, but unless explicitly stated with respect to particular material, the material itself may not be republished or used directly for commercial purposes. For the purposes of this notice, copying binary data resulting from program files, including assembly source code and object (hex) files into semiconductor memories for personal, nonprofit educational or other noncommercial use is not considered republishing. Entities desiring to use any material published in this pages for commercial purposes should contact the respective copyright holder(s).