Hello, I am currently working on a subsystem of a project and have ran into a roadblock of sorts. I need to make a rechargeable battery circuit (12V using a battery pack of 8 AAs is what is being used currently) that will activate in the event of the 12V main power going down. Ideally, when not in use, the battery circuit will be able to charge via the main power source. The current design I have allows for the batteries to charge, but there is nothing in place preventing it from overcharging, causing damage. Is there some sort of solution for this? The ideal solution I am looking for, if it exists, would be that the batteries would be charged to 12V, then stop charging. To put it simply.