Yes, another DC UPS question :-)

Thread Starter

DocHopper

Joined Apr 13, 2012
9
Hi. I'm pretty new to electronics and this is only my 3rd post here. I have looked all over the site and the Google for help with what I'm trying to do and I'm stuck. What I want to do is essentially make an emergency light. But, I want to use some old, unused 5v wall warts as the start.

I want to use 2 NiMH battery to drive a LED (I know this works as I've tested it). I want to have the device plugged into a specific location in the house (top of the stairs, etc) and do a constant trickle (float charge?) on the batteries, and then when the power goes out, have the light come on using the batteries as the source. I figure a couple of triple A NiMH batteries would hold the LED on for plenty of time to find a real flashlight.

I know this is possible, but my lack of electronics background is getting in the way. I'm just a hack hobbiest :)
So far, I have the wall wart hacked apart, with the +5v leads ready to start working on it. Does anyone have a circuit they could share that would point me in the right direction? I've tried a couple I found on the internet but they didn't seem to work as expected (meaning at all). I'm not sure if it's the circuit or my limited knowledge.

Thanks in advance.
 

Dodgydave

Joined Jun 22, 2012
11,304
The simplest circuit is a relay powered from the mains , that keeps the cells charging until the mains fails.

Here is one way, note put a series resistor for the led current.


relay-for-led-emergency-light.jpg
 
Last edited:

Thread Starter

DocHopper

Joined Apr 13, 2012
9
The simplest circuit is a relay powered from the mains , that kerps the cells charging until the mains fails.

Here is one way, note put a series resistor for the led current.


View attachment 147630
Awesome. I didn't think about a relay. I was trying to think of how to use diodes and transistors and stuff and just couldn't wrap my head around it. I have some relays I could play with so I'll give that a try. How much more complicated would it be to not use a relay?
 

Thread Starter

DocHopper

Joined Apr 13, 2012
9
I just cobbled together what you suggested DodgyDave (maybe change your name to SolidDave or something) and it worked a treat. Can't believe how easy it was with the relay. I am gonna get some smaller solidstate ones to fit in the little project box, but it works great! Can't tell you how tickled I am. Very much appreciated.

Oh, BTW, someone suggested a MAX712 for making a NiMH Charging circuit and I have one of those on order. I'll get a proper charging circuit made for it and keep it all working properly.
 
Last edited:

Thread Starter

DocHopper

Joined Apr 13, 2012
9
So, here's an update 2 weeks later. I got my prototype working. I decided to make some adjustments. I'm now using a LiPo battery instead of NiMH. I have some of these coming (had one already): http://ebay.to/2G7ogNK
Using that, I get more current to drive the LED brighter. I had a really old LiPo for the prototype, that probably isn't even close to it's rated 200mah, and it still is very bright for over 4 hours. That's plenty. I only made it so you have enough light until you can find a proper flashlight.

I also added a switch between the battery and the LED so you could turn it off to save battery just in case. I'll get the circuit posted soon. I want to add a photoresistor (and the other bits) to make it a light sensitive night light running off the charging side, so as not to run off the battery when mains is on. I would like to eventually add a wemos d1 mini or (if I can figure it out) an esp8266-01 to it to make them smart home enabled. The wemos would be a tight fit, but the 8266 would fit. I just am having fits getting mine to take code - but that's another story.

Thanks again for the help.
 

LesJones

Joined Jan 8, 2017
4,190
You need a much more complicated charging circuit for a LiPo battery. You also need an over discharge protection circuit with LiPo batteries. They can explode or go on fire if not treated correctly.

Les.
 

Thread Starter

DocHopper

Joined Apr 13, 2012
9
You need a much more complicated charging circuit for a LiPo battery. You also need an over discharge protection circuit with LiPo batteries. They can explode or go on fire if not treated correctly.

Les.
Look at the ebay link I provided. I have one of those little boards and they provide over/under discharge protection.
 

Joel Hopper

Joined Jun 24, 2016
5
I know this is old, but wanted to update you guys on this. I ended up getting this working very well thanks to your help. I used some LiPo batteries I had laying around and put a lipo charger board from Ebay between the 5v in (from any usb charger) and the battery. I have a couple I made that still work really well. they are pretty cheap to make too since i've been getting folks old broke network routers and stealing the relays from them when I can :) This is a screenshot of the most recent iteration of the circuit I have a copy of. I have changed it a bit by moving the lipo board in series with the battery so it protect from over discharge too.

http://prntscr.com/mngrwm

Basically what it entails is this:
When plugged in power is supplied from a USB wall wort goes in, which trips the relay and sends power through the lipo charger/battery to charge the battery up. This also allows the LED between + and - in to light showing it's charging. Even after it's charged fully this light stays on so you can see it's plugged in and power is working.
When power goes off, or you unplug it, the relay flips to the other side, sending the power through the LED (via a switch - in case you don't need it on and saving battery) with the lipo board protecting from over discharge.

Thanks again for the help. This was my first project coming back to electronics as a hobby. You guys really helped.
 
Top