|
Forum Index : Microcontroller and PC projects : Power Failure Chips
| Page 1 of 2 |
|||||
| Author | Message | ||||
| lew247 Guru Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
Does anyone know any chips/circuits that could do the following please: I want to run a MM from a 5V supply for various reasons BUT I would like to have a battery backup so that if the power fails the MM will automatically switch to the battery without stopping then once power is reconnected switch back to mains power again Is this possible? has anyone does it? Does anyone have any circuits or ideas for chips to be used? The External battery will be a 5V battery because of other devices that also need 5V |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
Depending on how much power you will need to use, and if your other devices will run on 4.5 volts, it could be as simple as a 3-AA battery box with a (perhaps Schottky) diode feeding into the 5V input. The 5V supply from mains should also have a diode to prevent any possible harm to the 5V supply when it is off and the battery is supplying power. If more power may be required, 2 18650s or a 6V or 12V SLA with ebay adjustable DC-DC switching power supply set at, say, 4.9 volts with diodes could also be used. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| lew247 Guru Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
Very little power actually - probably less than 100mA I need some way of detecting the power loss from the main 5V psu I intend to include a charge circuit so it can charge the battery if the voltage drops on it |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9754 |
I do that all the time with my stuff that needs to remain working if there is a power cut. I do it the same way as lizby suggests in his post above - a diode gate. I use rechargeable batteries, so that when powered, the battery is trickle-charged, but when the power fails, the battery can take over. All fully automatic. I DON'T run a 5v battery though, I use a 9v rechargeable currently, and have LDO regulators in front of the MM a-la the MCP1703 series of regulators which only have a 200uA quiescent current. ![]() EDIT: Just saw your mention of power failure detection. I have added that to the diagram above. This is how I do it. Just monitor the MM pin. When the pin is zero, the power has failed. When it is high, the main power is OK. Please note that this trickle-charge method is NOT suitable for LiION batteries without additional battery protection etc, but for rough and ready NiCd or NiMH, it works beautifully. It is easy enough to also add DC power failure and battery monitoring via a couple more MM pins if required. Smoke makes things work. When the smoke gets out, it stops! |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
Note that with the diodes, you don't need to do anything to switch to the new power supply, so unless you want to do something else when mains power drops out, you don't need to detect that it is gone. 100mA is not necessarily a small amount, depending on how long you expect to have to run. (The picaxe has a nice feature whereby you can determine the voltage which is powering the device. You can tell when you drop from 5V to 3-AAs at ~4V5, so no external circuitry is needed to tell you that you've lost mains power. I don't know if anything similar is available on the micromite (and which one)). PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
Nice setup. What does D3 do for you in the circuit shown? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9754 |
In all honesty, it could probably be removed. My reason for including it, was that I did not want any parasitic power going down the line and into the output of the PSU when it was off if there was a mains fail. When I think about it some, the potential-divider would prevent anything serious happening there, so you could probably remove D3 entirely. Smoke makes things work. When the smoke gets out, it stops! |
||||
Bill.b![]() Senior Member Joined: 25/06/2011 Location: AustraliaPosts: 242 |
Hi I have one of these power packs to run a pi3 when power is removed. Connected to a 5v usb for normal aperation, when power is removed the battery takes over. This unit is rated at 10,000ma/h and runs a pi3 for several hours, once pwer is restored the batterie will swith to charge. https://www.banggood.com/Original-Xiaomi-New-10000mAh-Power-Bank-2-Dual-USB-18W-Quick-Charge-3_0-Charger-for-Mobile-Phon e-p-1245220.html?rmmds=search&ID=3269&cur_warehouse=CN Bill In the interests of the environment, this post has been constructed entirely from recycled electrons. |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1044 |
Hi Bill, Will the one you refer to supply output while it is charging? I have about 4 of these usb battery things and only one, the first I got will supply an output while it is charging. Regards Gerry F4 H7FotSF4xGT |
||||
| Boppa Guru Joined: 08/11/2016 Location: AustraliaPosts: 816 |
I had that issue with my replacement one, by charging the pack, it also recharged the phone it was connected to- worked well until I dropped it and smashed the case I have 3 replacement ones now and none of them do it, which is a pain, as I only have a single outlet charger in the car Was really handy as I could just daisy chain and recharge both at the same time while driving oh and plus one for Grosters diode steering system, Ive used that for decades, first saw it in an old burglar alarm system and 'pinched' the idea- it even trickle charged the battery while the mains was available, just a diode and resister to put (from memory) a few mA into the battery (old SLA style mind you) |
||||
| Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1646 |
Hi All The specs on the site say: I have two by Comsol and they do also. Strangely though, one output on one of them is not recognised by the iPhone while charging but is OK for the Kindle. Note that they usually turn off when the current is too low. Good for a portable supply as well. Another Bill Keep safe. Live long and prosper. |
||||
| jwaldha Newbie Joined: 14/01/2016 Location: HungaryPosts: 10 |
The MicroMite has similar feature with the readref CFunction. Example: library list CFunction readref End CFunction list Dim tmp As integer Dim corr As float tmp = readref(corr) Print "Vcc: "; 3.3 * corr run Vcc: 3.25618 --- JWaldha |
||||
| lew247 Guru Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
Thanks everyone I've decided to get one of THESE It will supply up to 2A and auto switches over on power loss |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
Good find. From reviews, it seems that some of these auto-switch upon power loss without an issue, and some glitch in ways that cause the device (an r-pi in these cases) to reboot. Is it likely that these glitches could be resolved with a big capacitor, and if so, how big? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| circuit Senior Member Joined: 10/01/2016 Location: United KingdomPosts: 290 |
In principle, yes, a capacitor may well suffice. How big depends entirely upon how long is the glitch. The length of the glitch would have to measured (not easy to do with unpredictable glitches...) in order to determine the size of capacitor required. |
||||
| Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
I believe that Mikroe has a few Click-board solutions for this. Here is just one. |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
For $23.75 (for 5), I would just suck it and see with, say, 470uF or 1000uF (if I happened to have one that glitched). Could be useful for some applications, though. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
More of the range, here. They also have buck converters. |
||||
| lew247 Guru Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
THIS Works beautifully It keeps the Pi running with no issues when I disconnect the mains power |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
Very nice. Which pi, and for how long will it run on the battery? Last year I tested an R-Pi-ZW with camera on a so-called 350VA UPS; lasted 6 hours 18 minutes. I know the UPS (12v-120V-5v) is very inefficient. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| Page 1 of 2 |
|||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |