We have a device that runs off of a AC adapter, or a pack of 8 AA batteries. Since in normal use we use both, it would seem to make sense to have the battery pack recharge while using the AC adapter – instead of throwing the rechargeable batteries into a separate charge each time they're depleted.
What are the basics of designing/modifying the existing battery pack and AC adapter to implement that kind of charging?
A quick observation shows that the battery pack looks to be just the cells in series, with a capacitor (perhaps for protection from voltage spikes, it's powering a motor).
My thoughts are that I'll need to make sure the AC adapter can provide enough current to power the device and charge the batteries. The pack will have to somehow be modified to charge the cells in parallel (right?) while powering the device in series.
Other than those vague ideas, I don't know where to start/how possible this is. So what are the basics I need to know when it comes to building this kind of charger?
Slight Update: I know I need a circuit to control the recharge, I'm not just looking for a circuit to build, but the basic purposes of that kind of circuit. How does it monitor the charge (and determine when charging is needed)? What are the basic components involved and their purposes?