Many people seem to run their projects off the mains (e.g. with a wall wart) or from a battery, but there doesn't seem to be too much discussion about how to run a device off the mains, charging a battery, but then switching over to the battery in the event of a power outage.
I imagine that with NiCD/NiMH batteries you could just hook them up in parallel with the power supply (more or less), however since LiPo batteries hold more power for their size I would like to use them instead in a project like this - but they don't seem quite so simple to use in this way!
Can anyone offer some pointers as to how LiPo batteries might be used for backup power? I imagine you would need some logic to power a charger and switch over to the batteries when the mains disappears, but I'm not sure how this might work. I imagine you'd also need a large capacitor to avoid a momentary dropout during the switch over as well. Or perhaps there's some cheap IC that can do all this for me?
Thanks for any suggestions!