I have a project that is working well on the breadboard. I am getting ready to make a permanent version, but I need help with the power supply. I want the project to run off of wall power, to have a battery backup for power outages, and it requires both +5V and +3.3V power.
Requirements:
Input: 115VAC
Supply 1: +5VDC @ ~1A
Supply 2: +3.3VDC @ 100mA or less
Battery backup: Really only needed on the +3.3VDC supply, though if it could do both that would be cool too. Probably like 0.5 amp-hour would be plenty.
Nice to have: Some way for the power supply to let the micro controller know that it is running on battery.
In all of my other mains powered projects I have not used a battery backup and everything was pretty straight forward, power in, fuse holder, power switch, and cheap little power supply module (or two). Throwing the battery backup in the mix has me confused though. I'm guessing that some sort of module/circuit that charges the battery and just allows the project to run off of the battery all the time may be the way to go, but I really don't know.
If your 3.3volt circuit uses only 100mA, why not anyway derive its power source from the 5v circuit instead of using 2 separate power sources. Use a low quiescent current regulator like the HT7333.
For battery operation, explore the sleep modes.
I've never seen a device that has all of that in one package. Of course you could use a mains-powered 5V USB power brick like the ones you've used before. But then you would need another device that includes the battery, battery charging, load sharing, a 5V boost regulator, and a 3.3V linear regulator. A powerbank might work, but without the 3.3V part, and only if it lets you power the load and charge the battery at the same time (most don't), and only if you're always drawing enough current to keep it turned on (to overcome the "auto-off" feature most of them have).
The only device I know of that behaves properly (no auto-off) is the one Andreas Spiess describes in his video #250. But it will only work safely for a total load current of 60mA or less, nothing like your 1A. That's because it doesn't have load sharing. Would you be interested in building your own? See attached. I am working on adding load sharing to the Spiess device, which would then let it provide your 1A safely. But waiting on parts for that.
Actually, I take it back. There's a powerbank made by Voltaic Systems that has an always-on option. But it's about $30 on Amazon.
Thanks guys for the well written responses. I will check out the suggested products to see what is going on with them. Also, I am not against building my own, though I will have to think about that a little before I jump into that rabbit hole. Thanks for posting the schematic.
As an update, it may have just gotten simpler because I am stupid. It turns out that I don't think I really need the 3.3V supply after all. I am so used to supplying a regulated proper voltage rather than letting the internal regulator on the controller board do that for me that I never considered going that route. The only thing that I wanted the 3.3 for was to power an ESP32. I just realized, again because I am stupid, that there is a 5V input on the ESP32. So, I think I can skip the whole 3.3 thing.
I am going to build a prototype using a single 5V power supply module to make sure I can make everything work. Then if that goes well I will try to add the battery backup piece into place.
I got one of the below USB power packs for testing and it used it to power a WeMOS esp8266 development board. An arduino did not draw enough current by itself to keep the battery pack supplying power (may require ~25ma), but the WeMOS board used enough current and the pack kept the board connected to my router as a station for ~220 hours. It also seems to keep itself charged when plugged into a USB wall charger and still powering the WeMOS board. It has two USB output jacks.