Introduction: AC Power Failure, Battery Backed LED Path Light

About: Always curious...always learning.

During a recent power outage, in the darkest depths of my basement...a light would have been very handy indeed. Unfortunately my flashlight was a few dark rooms away. I fumbled around a bit, found the light and made my way to the family room. My wife had 3 candles burning, and we sat wondering when the power would come back on. It was then that I started planning a solution to this dark dilemma.

Step 1: Materials Required - Mostly Salvaged for This Project

For this project I will use an abandoned solar light fixture for the main circuit, and a right angle USB power supply.

The battery is a standard solar light battery that will provide the DC current when the AC power goes out.

1- right angle USB charger 5 VDC at 1 amp output.

1 - USB-A male cable or connector (

1- solar light fixture - I had several with failed solar panels on hand.

1- 2 AA cell battery holder with switch - I had a few from some dollar store lights.

1- 800 to 1,400 mAh NiMH battery ( this may vary between different solar lights )

1 - 2 K ohm 1/4 watt resistor.

1 - 3.9 K ohm 1/4 watt resistor.

22 gauge hook up wire, heat shrink.

Step 2: Tools Required

Solder and soldering station.

Glue gun and glue stick.

Drill and drill bits.

Small round file.

3rd hand - helpful as the name suggests.

Surgical clamp or needle nose pliers.

Cutting board - I have a discarded plastic one that I use on my bench when drilling and cutting.

Digital volt, amp, ohm meter - I used a meter for current draw and a 2nd for voltage readings.

Breadboard and jumper wires for testing.

Step 3: Solar Light Dissasembly

I had repaired about six of eleven solar fixtures for a friend, and while testing them on a sunny day noticed that several stopped working. After some testing I discovered that the solar panels had lost their output voltage after heating up in the sun. I tried to find the point of failure, but could not perform a reliable fix. I had 5 fixtures with working LEDs and QX5252f controllers. This would provide the main circuit for this lighting project.

I clipped the leads to the solar panel, and added yellow heat shrink so I could identify the wires to the controller board. I also cut the + and - lead from the battery holder. The LED remained connected to the controller board. I had to scrape away the plastic that held the LED in place, it was fairly easy to do without damaging anything.

Now the controller was ready to test with the USB power supply as the battery charger, instead of the solar panel.

TIP: Be sure to search the QX5252f online, it is a very unique integrated circuit.

Step 4: Circuit Diagram, Voltage Divider Circuit and Testing

I studied several sites to find out more about solar lights, and how to charge NiMH batteries. In the end, I decided I would keep the charge voltage at about 1.4 vdc to 1.6 vdc, and the charge current under 1 mA.

Since the light would be used very infrequently, a rapid recharge was not desired.

The resistor values required in this case were 3,900 ohms ( 3K9 ) and 2,000 ohms ( 2K ).

I assembled the resistors on a breadboard, connected the leads from the salvaged circuit board to the breadboard as in the attached schematic.

I then connected the 5 vdc from the plug in USB power supply to the voltage divider and added the battery.

The LED light was off as it should be as the voltage divider connected to the SOL input terminal on the circuit board mimicked the voltage that a solar cell in sun light would provide.

I then disconnected the 5 vdc USB power supply, and the LED switched on as it should.

I then added the volt and amp meters and confirmed the readings were similar to calculated values.

It was now time to put the project together!

Note: To save space attaching the resistors to the circuit board, I twisted them together like in the picture.

Step 5: Preparing the Battery Box for the LED and USB Feed Cable

Maybe it was luck, maybe efficient thinking; the LED fit in place with just minor snipping and filing in the void under the slide switch. I drilled the hole to allow the LED to shine through the Battery Box, and still use the slide switch.

Since only 1 AA NiMH battery was required, I was able to use the other half of the holder for installing the solar light PCB and voltage divider. I needed to angle the hole for the USB cable into the PCB side of the battery holder. I left the round file in place to show the angle I held the drill at. There was some minor filing required, but the USB cables was right where I needed it for connection to the PCB and voltage divider.

Step 6: Dry Fitting the Resistor Divider, USB and Battery Connections.

This part is a little tricky, but with patience was straight forward.

I folded the leads in the direction where they would need to be connected.

The pictures can be misleading, as I turned the box to assist with the angle for soldering each connection.

It was clear that I could use the PCB connections to install the voltage divider and save space.

I unsoldered the leads that would have connected to the solar cell (they had the yellow heat shrink on them).

The single lead from the 2K I soldered to the hole that the solar cell negative black lead was.

Note: This is where the black USB - lead will be soldered later.

The 2K with 3K9 divider lead went to the hole that the solar cell positive white lead was.

Note: The other 3K9 lead is left open for now...this will connect to the red USB + lead.

Careful here: The USB A connector needs to be dry fit to connect to the USB power plug to allow a snug fit, yet allow the battery box to be centered on the power supply. We will use hot glue later to secure this in the Final Assembly.

Here is where a surgical clamp, or needle nose pliers help with the USB A connections.

-position the battery box so that you can hold the black USB - lead and solder it to the single 2K resistor lead.

-then solder the red USB + lead to the open 3K9 resistor lead.

Add heat shrink over the connections to prevent the chance of wires shorting out.

The black battery - lead can be soldered to bus bar that connects to the - spring terminal, as in the picture.

The white battery + lead can be soldered to the open contact on the slide switch.

Install the battery, and with the slide switch in the on position, the LED should light up.

We are then ready for the final assembly.

Step 7: Final Assembly and Testing

The first two pictures show how the battery box and USB A connector needs to be positioned and hot melt glued in place.

You can see the glue in the 2nd picture especially.

Note: the USB A is glued to the battery box only. I did not glue the battery box to the USB charger, so the battery box could be removed for service or for battery replacement.


Move the power switch on the battery box to the On position, and the LED should light up.

Connect the battery box light assembly to the USB charger, and plug it into the AC power outlet.

The LED should extinguish, and is now ready to deploy.

Step 8: Installation and Final Thoughts


I installed the AC Power Failure, Battery Backed LED Path Light in the basement hallway plug socket, and feel better knowing the path will be clearly defined the next time the power fails.

Final thoughts:

I am well aware that I could have bought a similar product for about $20, but I enjoyed the learning experience AND using some salvaged parts and pieces from my "parts box".

Battery Powered Contest

Participated in the
Battery Powered Contest