I'm working on a project that I'd like to run off either batteries or mains.
It'll be a small clock (2"x3"x3"). The electronics run at 5V and will pull a max of 30mA.
My past projects I've powered through an LM7805 and either a 9V or a bank of 8 AA's. This one will be too small for 8 AAs, and I need longer battery life than I'll get off a 9V.
I'd thinking about using an ST619LB DC-DC regulated charge pump. This takes an input voltage of between 1.8 and 3.6V and outputs a regulated 5V. First, charge pumps are more efficient than voltage regulators, and second, a pair of AAs hold a lot more mA-hours than an 9V.
That much, I'm pretty sure I know how to do.
Alternatively, I could power it from a wall-wart. With adequate caps, I could use my familiar 7805.
What I would like to do - and what I don't know where to start - is to do both. Run it off the wall-wart when it's plugged in, and off the AAs when it's not. AND - have the wall-wart charge the AAs.
Electronic devices that run off mains when plugged in and off of rechargeable batteries when not aren't at all unusual. But I've not had any luck chasing down circuit designs on the web.
Any ideas?