Uninterruptible power supply using 5V power bank

russ_

New Member
Joined
Oct 3, 2017
Messages
7
Reaction score
4
Country
Canada
I've been driving with my DIY uninterruptible power supply for my Xiaomi YI for quite some time now. Even though the solution seemed so obvious and easy for me, I found it's a rather big problem for dashcam owners (people go crazy with 12V batteries, ridiculously expensive BlackVue power packs, etc.)
I've put a nice write-up in here http://blog.nagimov.com/uninterruptible-5v-usb-power-supply/

It's based on 5V power bank (the same people use for charging their phones on the go) and couple of 5V relays. Cost of all the components (excluding the power bank) is around $20

Here's a picture with my layout:
assembly_5-lo.jpg
 
Last edited:
A DPDT relay and a 5V source which can charge the powerbank and run the cam at the same time is all that's needed. I too am surprised that more people don't do this, but given the number of posts where people are afraid to even do their own fuse taps I guess its par for the course :whistle: Although it's generally very safe if you use good cells and charging circuitry, I don't advocate in-car charging of LiIon batteries because most people don't fully appreciate how critical those two points are ;) I'm totally with you om the ridiculous prices being charged for the store-bought versions :mad: The manufacturers of those can't have more than $25 in them even using the very best components. It's just insane :rolleyes:

Phil
 
i really like this idea (im toying with the idea of a power bank for parking mode)

but why are you using a 2 channel relay and not a single?
power out on com1
main power on no1
pb discharge on nc1
 
Last edited:
i really like this idea (im toying with the idea of a power bank for parking mode)

but why are you using a 2 channel relay and not a single?
power out on com1
main power on no1
pb discharge on nc1

I'm speaking of a in-place system. The second set of contacts is used to switch charging to the powerbank on when it's not in use powering the cams ;) If you're going to charge the powerbank remotely then a SPDT like you describe is all you need :)

Phil
 
I'm speaking of a in-place system. The second set of contacts is used to switch charging to the powerbank on when it's not in use powering the cams ;) If you're going to charge the powerbank remotely then a SPDT like you describe is all you need :)

Phil

Youve lost me there Phil. I was referring to the OP's post and wondered why a 2 channel relay was used. I looked at the diagram for ages and thought a single relay could be used instead of the double. But i may well be missing something as im not into electronics.
 
i really like this idea (im toying with the idea of a power bank for parking mode)

but why are you using a 2 channel relay and not a single?
power out on com1
main power on no1
pb discharge on nc1

Let me bounce this off your post. As you state, common to cam and the other terminals are 2 different power sources with one being the car. The car battery self-charges when driving but there's nothing here to recharge the powerbank ;)

So the second set of contacts just handle that alone, connecting the powerbamk to 5V when the car is powering the cam and disconnecting when the car is turned off.

Hope that clears things up :D All I've got is MSpaint for graphics or I'd draw you a schematic but with this I think you can see why I advocate the DPDT instead of an SPST. Not certain what the OP does regards this, I'm commenting on your post alone.

Phil
 
Can you not just connect the pb charge to the main power pos and neg directly and not wire it into the relay? That's what the op is doing in the diagram above?
Is there any reason you can't do that? (The way the relay works possibly?) Edit: autocorrect
 
Last edited:
Can you not just connect the pb charge to the main power possible and beg directly and not wire it into the relay? That's what the op is doing in the diagram above?
Is there any reason you can't do that? (The way the relay works possibly?)
Main power is actually shortened with powerbank charge (look at the diagram)
The reason you need tho relays (or one DPDT relay), is that you need to isolate powerbank and power out to the dashcam. When main power (USB cigarette adapter) goes down, power out not only has to be switched to powerbank discharge, but also isolated from powerbank charge, so you're not charging PB from itself.
The reason of using double channel relay board instead of one DPDT relay is simply the cost and simplicity of assembly :)
 
I've only just got round to drawing this out to try to understand it.

I may be completely wrong but could you not do this with the single relay?

o3YU60Tn3wvYTWhvIh87uMi-k4q756vDeiVuIdVQWgnx6GrOA5E-oIjAUSuMQ8A01Wse1DpVro0VP0rZSkJvtCDfcPaqXco30iWi1kGgPL2TPbDPQtvmOOzh30uAfzRw7vWQ74qc76KmM1dyIKk4MecmhXI54REwPc4PaTsUxOUC48XnF-2EOD0ViI6SJn81tWF0H8Fvvgzub98L5KzCbmV6zW2IiD0nBUisw3KJz4K8xrho0WqlS_SSkEzeBTTQg3ChPo0aoW5bC6-B8z7wf1UqTH6ytkWb1rKA8qrOKHAWfiIJouUHtG8tWav97K0vlyNXZdS4lglc4F4vUwKyrdhj3BfGd3E21DM8reBcZ1VPacewz8f7J_Hg7IzxQ8sLJrDAVmwMfnJHiI5bYWvCG414wkWEbBIiiOsYd52J8QG3_dhBsVFYYrij3fabKSLEhXMTVz9kpWl_EPaSc_OXqnelqdi7HN8ojIsru2MsG2HU_9IufpmpNeve6keEl2IjoN9W4n6KiHakjx8-rWctVQ_65TqdolRjTFUPj-sK_cwQ3JVPGVuGmi4H7MmqaBys-bxWfM2Yw7rWBEJRDcJDRyAU5Yz5DOyO1R8BZqgpUxU=w754-h467-no
 
Last edited:
PB is continually charging like that, which is exactly why I recommended the second set of contacts (DPDT). PB's should never be charged and discharged simultaneously as the charge level cannot be properly monitored and controlled under those conditions.

Phil
 
PB is continually charging like that
Not if "Main" is supplied via ACCessory circuit and a 12V to 5V adapter.
I believe that Richard's circuit is essentially workable, and I've been meaning to set something up like that for some time to test.

I have two reservations though.
1) Is it OK to connect the powerbank's negative output to its negative input? Should be, but it's foolish to assume so without testing.
2) If main power is on, energising the relay, but is then turned off, would power come OUT of the camera's + connection, keeping the relay energised until the camera battery runs down?

I think in likelihood neither of these would be a problem, but they need to be tested, and the result may depend on the models of powerbank and camera, so you'd need to test on every one you plan to use.

P.S. I think both of these potential issues affect the OP's circuit too.
 
can you explain why pb is continually charging please?

when main is off the relay is powered off and NO is open and pb has no power? (is my understanding). PB discharge is then connected to power out by NC.
 
Not if "Main" is supplied via ACCessory circuit and a 12V to 5V adapter.
I believe that Richard's circuit is essentially workable, and I've been meaning to set something up like that for some time to test.

I have two reservations though.
1) Is it OK to connect the powerbank's negative output to its negative input? Should be, but it's foolish to assume so without testing.
2) If main power is on, energising the relay, but is then turned off, would power come OUT of the camera's + connection, keeping the relay energised until the camera battery runs down?

I think in likelihood neither of these would be a problem, but they need to be tested, and the result may depend on the models of powerbank and camera, so you'd need to test on every one you plan to use.

P.S. I think both of these potential issues affect the OP's circuit too.

Yes sorry i didnt make that clear but that is what i presumed from the OP. Main power is when the engine is running.
 
Russ's circuit is effectively using two SPDT relays to emulate a single SPDT relay, and does the same as Richard's circuit.

Both do the same thing...

Power out positive is connected to either:
  • PB discharge, if POS busbar is off;
  • POS busbar, if POS busbar is on.

It might be possible to do something more creative/fault tolerant with the two SPDT relays, or a DPDT relay.
 
i'd never thought of using a relay until seeing the op's post after searching for power options for parking mode.
when i next get chance im going to wire up the following:

vico power plus > mp1584 (12v to 5v) > relay > cam + pb > relay > cam.

That way i can either use the cars battery with protection or a power bank for longer recording if needed. I wont be wiring in a pb charge though.
 
I'm considering the same. My van battery is getting old despite using the Vico Power Plus set to turn off at 12.4V. I run 2 cameras off it. Sometimes opening the door causes the voltage to drop enough to turn off the cameras, then the Vico PP comes back on a minute or so after the doors are closed!

My current workaround is to turn off one of the cameras if I'm expecting to park for a long time. Shoehorning a power bank in there would give me extra options.
 
That way i can either use the cars battery with protection or a power bank for longer recording if needed. I wont be wiring in a pb charge though.

That will work with one relay or switch ;) It's when you want to also charge the PB automatically in the car where the other relay or switch comes into play. As long as you remember to keep the PB charged you'll do fine :cool:

The main problem with automatic in-car PB charging is the batteries involved. You can 'float' or 'pass-thru' charge almost every other type of rechargeable battery but not lithium. It requires monitoring the state of charge then when appropriate, it alters the way the battery is being charged and monitored. This starts as "CC" (controlled current) then switches to "CV" (controlled voltage) to complete the charge cycle. Thus these are referred to as CC/CV chargers. If you are drawing any load on the charger other than the cell or battery it cannot determine where to switch from CC to CV which can cause the battery to overcharge which will ruin the battery or cell at best, or cause a venting or venting with flames episode (think 'hoverboards' here :eek:) That is certainly not what ypu want to have happening, especially in your car.

Your cam, portable computer, and cellphone can do this with their lithium batteries because their charger design is different and has allowed for this. Powerbanks cannot do similarly because the load is variable with them unlike these other devices. PB's can be made to do this but it's not easily or cheaply done and only a few PB's make the claim of allowing 'pass-thru charging' of which I'm not certain that I believe those claims being congruent with best lithium charging practices.

IMHO the best and safest way to achieve long car-off recording is with the use of another battery technology, such as an AGM or a wet-cell deep cycle battery along with a battery isolation circuit. Not as easy or cheap to do, but can also offer huge recording times far longer than any lithium PB can supply with the proper battery choice.

Phil
 
That's a good explanation. But they could design a power bank with charging circuitry to get around the problem. I.e. when a device is connected to the power bank output while it is being charged, have that device powered by the feed into the power bank rather than the PB battery. If there is sufficient power to charge the battery on top, then do so. Since there is nothing connected to the battery output, it's OK, the intelligent charging algorithm will work.
It's not hugely difficult, but the market is competitive, and cost is more important than this feature. So I doubt we'll get it. Unless we do it ourselves external to the power bank ... which we are getting close to with the above circuits.
 
Yes, it's possible and it could actually be done. But because of the extreme risks in the event of something going wrong, few are bold enough to try it knowing that it's not going to sell well at the price such a thing would cost to make :( For us, a simple DPDT relay or switch used correctly with a couple fuses can give us the same thing with a very high margin of safety whereas the average PB user needs far more fail-safe protections involved ;) When there's no room for error you'd better design accordingly.

When you're tempted to take chances with a lithium battery, think "hoverboard" for that can very easily become the end results you get within seconds of a problem becoming obvious :eek: That is why I'd rather see folks needing really long-term recording to use AGM or wet-cell batteries instead as the safety margin is much higher :D

Phil
 
Back
Top