Introduction: Emergency Lighting System

Picture of Emergency Lighting System

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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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.


Oishi2017 (author)2017-06-01

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?

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

oliveira.igorm (author)2016-10-17

any idea how a rechargeable battery version would be?

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 (author)2015-11-12

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.

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.

Try replacing the 10k resistor with a 1k resistor.

tridecagon (author)2015-10-05

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

Sure. I always love to hear new ways to make things.

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.

rafununu (author)tridecagon2015-11-09

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

Thanks. That is a really good idea.

Theticus (author)2015-11-01

Hi I stumble upon this circuit and really like it. One question please. Can I use 12v DC power supply. I have quite a few and be shame to buy 6v DC that you mentioned in your Materials list. If I can use it, do I have to change any parts and values? Thanks in advance.

Yes, you can use a 12 volt power supply. In the circuit that I show above, the power supply only serves to indicate when the power is on. Just don't try to charge the batteries with a 12 volt power supply (at least not without a voltage regulator).

Karl 007 (author)2015-08-04

I just finished building it !!!!!
It works perfectly. I really enjoyed making it. Very useful !!! Thank you.

kelms1 (author)2015-07-13

you should see about getting aCompany to manufacture that I bet you could make a lot of money !!

SviatA (author)2015-07-09

That is a great tutorial. Surely, emergency lighting is an important thing at home.

And that would be interesting to build such thing. The only problem is that you need a neighbour who can give you a screwdriver and a drill:-)

Otherwise, people will just go to some e-store and purchase something like this because it is easier.

It seems that the whole concept is not really intricate, so it will not break unexpectedly.

anandrocks (author)2015-06-16

So the 1k and 10k resistor is in series right forgive me if im wrong im new to electronics

I may have misunderstood your question. If you were asking if the MOSFET could be replaced with a 2n2222, then you would need to add the resistor to this new transistor. So there would be a 1k resistor between the base pin of the right transistor and the collector of the left transistor.

I asked you if i can replace the pn2222a with 2n2222 thanks

I am sorry. I misunderstood. Yes a 2n2222 will work fine.

Thanks i like make magazine projects very much Good instructable

Saiyam (author)2015-06-16

Good project. You can modify the circuit in such a way that when there is a power supply available, the circuit uses the current from the power supply instead of the battery for its inner workings. This would make the battery last forever until there is no power cut.

anandrocks (author)2015-06-15

Can i use 2n2222 instead

Yes you can. But with a 2n2222 you will need to add a 1 kohm resistor to the base pin. You also want to make sure that the current of the LEDs that you are using does not exceed the max current rating of the transistor.

gauravb (author)2015-04-03

Can i use a IRF540 power mosfet instead of IRF510

That should work

Thanks but can i also use IRF630 and IRFS830 because i wants to make three of these Emergency Lighting System and i am having all these three mosfets.

Any N-Channel MOSFET can work with this design.

I made it and used it with a 5v power supply. But i found that when the power supply was turned on then the circuit was providing 2.4V to the leds. So can you suggest me a way to use this circuit with 5V power source. I am using a 3.7V mobile battery for the leds.

gauravb (author)gauravb2015-04-12

Now it worked with 5V but i found that leds were getting only 2.6V from the 3.7V battery. Any reason???

please help

I am not really sure what is going on there. Measure the voltage at all the junctions in the circuit and send them to me and I might be able to work it out.

Here is a short video of virtual test (i made it because i had used the 3.7 v battery in other project and now i am not having any 3.7 v battery so i made this virtual test video.) . In this the voltage across D1 is wrong It is actually 2.6 v.

Okay. It looks like the transistor that you are using doesn't really work with a Gate voltage less than 4 volts. The gate pin isn't getting enough voltage. So it is not letting the LED get enough power. You either need to use a different battery or a different transistor. If you need to you can use an NPN transistor instead. But use 100 kohm for both resistors.

Can u please help me with a circuit diagram..... It will be very helpful...


I am really happy. You are a great person also can you tell me your occupassion .............. :)

What is your circuit diagram problem?

In general you can say that I am an Engineer. But my actual job is making how-to projects for Make Magazine.

Can you tell me which transistor should i use instead of that mosfet.....

Use any NPN transistor that that is rated for at least 0.2 Amps. For example, this will work:

Thanks alot now i will be able to make one....

Thank you for such a neat, clean and great instructable.....

nqtronix (author)2015-03-31

This may seem like a smart idea, but the electronic design is beyond poor. I know, you want to go as simple as possible, but I don't think that an excuse.

WARNING: Criticism incoming. If you can't handle it or just don't care simply don't respond. This is intended for those who'd like to improve this idea:

1. In depended of the output power (even if it's zero) the power supply will consume a significant amount of power. Even a little 0.08W supply can consume 1W by itself!(source) Just touch a cheap power supply a while after it's been pluged in and you'll notice it's getting warm. Some phone charges perform quite good in that respect, in this comparison in the range from 18mW to 375mW, which is acceptable IMHO. If you want to get lower it's getting more complicated and dangerous for hobbiests.

2. The circuit itself always drains power from the batteries. It's just 0.45mA but still enough to drain a typical 3000mAh battery in 9 month and thus not suitable for anything "emergency". The solution is quite simple, replace the nmos with a pmos as shown in my diagram. You don't both transistors, but they'll keep the gate voltage to a minimum, no matter what voltage you connect (or reverse). And yes, they are drawn in correctly, I'm using the BE diodes as crude 8V zener diodes (cheap, but it works well). If you want you can connect a simple push button between the gate of the pmos and the plus pole of the battery to switch the light temporally off.

This reduces the battery discharge current to a ridiculous low <1uA/ 0.2% (leakage of the PMOS). Plus, the current draw from the power supply is only ~31uA/ 5.

3. You may have noticed that I've not drawn the LED symbol, but a generic "load". I did this because you should never connect LEDs in parallel with just one resistor, the current won't be shared equally (This can even be seen on the very last picture). While it might work "ok" for some decoration type of use it's not acceptable for something like this.

4. The battery life should now be the shelf-life of the batteries, which might be a few years. If you want to go further you might want to choose lithium batteries such as CR2032, they have a shelf life of about 20 years, or go for a solution with a super cap, which results in almost infinite backup time. If there's interest in the circuit I'll upload it, just ask.

To match at least my definition of "emergency gear" point 2, 3 and 4 must be fulfilled. How much is safety worth, if you can't trust it? Yeah, this is not a super-critical application, you can survive a blackout easily without, but what's then the point in having it the first place?

ollye (author)2015-03-30

Same question as RedFishRyan, because if used as a permanent backup solution in my house, the batteries will drain at a certain point ofcourse

Yes. You can. Just connect a charger to the battery pack with a diode. But it isn't really necessary. This system will not quickly drain the battery. An alkaline battery in this circuit could last about 6 months. You could make this even longer by replacing the 10K resistor on the NPN with a 100k resistor. Buy the idea is that it is a temporary lighting that will allow you see during brief power outage or to get something long term set up for a prolonged power outage.

RedFishRyan (author)2015-03-30

Great project again! Could you have put in a rechargeable battery and also have it be charging when the power is on?

Yes. You can. Just connect a charger to the battery pack with a diode. But it isn't really necessary. This system will not quickly drain the battery. An alkaline battery in this circuit could last about 6 months. You could make this even longer by replacing the 10K resistor on the NPN with a 100k resistor. Buy the idea is that it is a temporary lighting that will allow you see during brief power outage or to get something long term set up for a prolonged power outage.

ground up (author)2015-03-30

Awesome discreet logic circuit it's nice to see something not using an arduino

ollye (author)2015-03-30

Great instructable/project though!

About This Instructable




Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:36 Things to Cook in a Coffee MakerHow to Make a Festivus PoleAdd Wings to an Infant's Halloween Costume
Add instructable to: