I'm in the final phase of my BeerBot* project, and I'm looking for the best way to power it.
BeerBot will spend most of his life sitting in a docking station, keeping his battery charged and running off of wall power. When called upon, he needs to be able to disconnect from the docking station and switch to battery power without interrupting power to his brain. Upon returning to his docking station, he needs to switch back to wall power again.
I have a NiMH charge circuit, and I have a circuit for powering the robot from a wall outlet, I'm just not sure how to switch from one to the other without interrupting power. For my testing thus far, I've just been shutting the robot down and manually switching between wall power and battery power, and connecting the battery to an external charger as needed. This is obviously not a permanent solution, since BeerBot needs to be always at the ready - shutting him down to switch over to battery power every time I need a beer would defeat the whole purpose of BeerBot*.
So my question is, what is the best way to keep a robot powered from the wall, simultaneously charging the battery, and switching between wall power and battery power automatically when disconnected? I guess this is analogous to the way a laptop works - switching to battery when unplugged and and keeping the battery charged while plugged in.
I don't care if it's a ready-made solution or a circuit I can build, I'm just looking for a good way to do this without frying my robot or setting my house on fire. I'm mostly a software guy, so I know just enough about circuit design to be dangerous (and I've fried enough electronics to know that power supplies can be dangerous...). I've been looking at power management ICs, but I'm thinking that might be overkill since I already have a charging circuit and a wall-power circuit, I just need a way to switch between them. Can I just connect both and use a couple of diodes to keep current from flowing in directions it shouldn't, like this?
or do I need something more complex?
.
*If you're curious, BeerBot is a semi-autonomous beer-seeking robot. He sits quietly in the corner listening for commands. Currently his only command comes from a modified Easy Button on my desk, which sends a wireless signal to BeerBot. When he hears the signal, he wakes up, drives autonomously to the refrigerator, opens the door with his robotic arm, uses computer vision to detect a beer bottle (placed strategically on the bottom shelf where he can reach), grabs a cold one, closes the refrigerator door, brings the beer to my desk, and returns to his corner to await my next request. Phase 2 will incorporate a bottle opener.