Emergency Lighting System




About: My name is Jason Poel Smith. In my free time, I am an Inventor, Maker, Hacker, Tinker, and all around Mad Genius

Many people keep a supply of candles and flashlights on hand for when the power goes out. But you still have to find your way around in the dark to get them. In situations like this, it might be helpful to have some kind of emergency lighting system that would automatically turn on when the power goes out.

So in this project, I am going to show you how to build a DIY emergency lighting system that will do just that.

Step 1: Watch the Video

Here is a video walkthrough for this project.

Step 2: Materials

Here are the materials and tools that you will need or this project.


DC Power Supply

DC Power Connector (that matches the power supply)

N-Channel Power MOSFET (such as IRF510)

Small NPN switching transistor (such as a PN2222a)

10 ohm Resistor

10 kohm Resistor

100 kohm Resistor

6 x White LEDs

3 x AAA Battery

AAA Battery Holder

Printed circuit board or perf board

Insulated Project Enclosure


Soldering Iron and Solder



Drill and Bit Set

Hot Glue Gun

Step 3: The Circuit

Here is a quick overview of the circuit that I designed for this project and how it works.

A DC power supply is hooked up on the left side of the circuit with the positive terminal connected to the resistor and the negative terminal connected to the common ground. The signal from the power supply goes through the resistor to the base of an NPN transistor. This activates the transistor and effectively shorts the gate pin of the MOSFET to ground. This keeps the gate pin in a LOW state and the MOSFET will not conduct electricity. So the LEDs are off.

When the signal from the power supply is turned off (such as in a blackout), the states reverse. With no signal at the base pin, the NPN transistor turns off and is no longer connecting the MOSFET gate pin to ground. The voltage of the gate pin is now pulled HIGH through the 100k resistor. The MOSFET will now conduct electricity and connects the LEDs to ground. The LEDs turn on.

So as long as the grid power is connected, the LEDs are off. But as soon as the power does out, the LEDs automatically turn on. The power for the LEDs is supplied by three AAA batteries. In this configuration, the lights can stay on for up to 10 hours. This will give you plenty of time to make preparations for a long term power outage.

In standby mode, this circuit uses about 0.045mA from the battery. At this rate that battery can several years. But you should check it at least once a year.

Step 4: Prototype the Circuit on a Breadboard

It is always a good idea to prototype any circuit on a breadboard before soldering it together. This will give you a chance to swap out parts and change values to get the performance just right.

Step 5: Solder the LEDs Onto a Circuit Board

Once you have tested the circuit on a breadboard, then you are ready to begin soldering it together. The first thing that you need to do is solder together the LED array. This is just six LEDs wired together in parallel. I soldered them onto a thin strip of perf board.

Step 6: Solder the Rest of the Circuit Onto a Separate Circuit Board

The transistors and resistors will get soldered to a separate circuit board. Again I soldered the components onto a small piece of perf board. This let me customize the connections and make the board as small as possible. You can copy my layout or design your own.

The DC power connector and the LED array were connected to the board with jumper wires.

Step 7: Drill Holes in the Project Enclosure

Now we need to drill some holes in the project housing. We need six holes for the LEDs and one hole for the DC power connector.

Hold the LED array up to the side of the housing and mark where each one lines up. Then drill a hole in each location that is slightly bigger than the LEDs.

Then drill a hole in the side of the housing that is slightly bigger than the threads on the DC power connector. You may want to first fit all the parts inside the housing to make sure that there isn't a space conflict. Then remove the parts and drill the hole.

Step 8: Mount the Components to the Inside of the Housing

Now you are ready to mount all the parts to the inside of the housing. Start by applying hot glue to the back of the battery pack and fitting that in place. Next glue the circuit board in place. Then insert the DC power connector into its hole and secure it in place with its nut. Lastly glue in the LED array. Before installing each piece, fit it in place to make sure that it won't hit any of the other components. Once all the parts are mounted, insert the batteries and close up the housing.

Step 9: Finished Emergency Light

As soon as the batteries are mounted into the battery holder, the LEDs should turn on. When you plug in the DC power supply the LEDs will turn off. Your emergency lighting system is now complete.

Whenever the power goes out, the LEDs will automatically turn on. This should give you enough light to find your way around the room. Because this light is small and light weight, you can carry it around with you and use it as an emergency flashlight.



    • Tape Contest

      Tape Contest
    • Arduino Contest 2019

      Arduino Contest 2019
    • Trash to Treasure

      Trash to Treasure

    55 Discussions


    Question 6 days ago

    please help!!!!!! and what are the spect for the LED's


    Question 13 days ago

    hi I am doing this project for a school assignment, and its due very soon

    if I make this circuit online and simulate it I see the there is a flow of current through the battery even when it is plugged into a live dc source, will this damage the batteries in any way?

    I would also like to know what should I do if I use the attached power brick, what resistors do I need to use ?

    and what amp less do I use

    DIY Hacks and How Tosbanyuuronoah

    Answer 12 months ago

    The 10 ohm resistor limits the current for the LED. The 10kohm resistor limits the current going to the base of the transistor. The 100kohm resistor acts as a pull-up resistor to give a HIGH status when the other transistor is not active.


    1 year ago

    Hi Jason (may i call you Jason?)

    firstly.......very awesome project. i just had an outage and it worked great!!!

    1 question though......i made 1, but i want to make a few more and only have bc547's and bd139's left in my little project toolbox. Can i change the PN2222a with one of these and which would be best......also, what changes would i have to make to the circuit to make the change.

    thanks in advance for your time :)

    2 replies

    1 year ago

    hi, this may be a bit off topic but i want to incorporate your board design with a 5m 12v strip light powered by 3 18650 batteries in series. I currently have the LEDs working off the batteries with a small IR remote but when the power goes out the remote is always misplaced. Will your design work if I swop LEDs and batteries?

    1 reply

    It should work. Just make sure that all parts are rated with a high enough voltage and current.

    You would make a simple trickle charger to charge some NiCd batteries from a DC power supply and a resistor. Then put a diode between the batteries and the power supply to avoid discharging through the power supply when it is on.

    Karl 007

    3 years ago

    Is it normal that the circuit drains my batteries even when it is connected to the wall? How can I fix it? Please help!!! Thx in advance.

    3 replies

    That shouldn't be happening. Take a couple of pictures of your circuit and post it here so that I can see what you are working with.


    I followed your circuit diagram exactly and got the same parts with the correct values. I doubled check my connections. Apparently I am not the only one with this problem. I checked the youtube comment section of the video and some people seem to have a solution. What do you suggest doing/adding to the circuit that will completely isolate the batteries from the circuit when it is connected to the power supply or wall outlet? Please post the modified circuit diagram with the values !!! Thank you.


    3 years ago

    This is a very clever design, but I have one that is much more simple. wanna hear it?

    3 replies

    Use a P-channel MOSFET. The inverter will keep the FET turned off as long as it outputs voltage. More or less like the image here. Ignore the switch on the far left; it's there for simulation purposes only.


    Reply 3 years ago

    It cannot work, the FET's gate isn't polarized !