# Design a circuit for rechargeable batteries supplied by a solar panel and generator?

I want to design a circuit for a rechargeable battery (or batteries) that can be charged by both a solar panel and a generator. I am working on the same project as described here, but my focus is on the actual switching between the two sources of power generation (rather than how much power the generator will produce).

Here's a rough description of the system:

2 sources of power:

• solar panel that supplies continuous power while system is idle
• generator that supplies a burst of power when system is active momentarily (< 5 seconds)

2 or more batteries:

• a "primary" battery that acts as the voltage supply for the rest of the system
• a "backup" battery that is continuously being charged by the solar panel
• a "secondary backup" battery that will be charged in bursts by the generator

The idea is to have the primary battery dedicated to supplying power for the system, and switch this with the backup battery when the voltage of the backup exceeds the primary (using an analog comparator perhaps), or when the voltage of the primary depletes below a certain amount.

The context of this project is essentially a fingerprint authenticated door lock system that is powered by the two sources mentioned. The handle

Here are some of my thoughts and questions:

• Do I need three batteries to be charged separately? Or should I only have a primary battery and one backup battery? What's the best type of battery for this?
• The latter option would require switching between the solar panel and generator whenever the generator is activated, i.e. stop the charging from the solar panel and allow a burst of charge from the generator, then resume charging from the solar panel.
• Thus, I would have to figure out if the power generated by the generator in the amount of time it takes to turn the handle is greater than the power "lost" by not charging through the solar panels for that period of time.

The circuit I've come up with so far looks like this:

simulate this circuit – Schematic created using CircuitLab

It is more of a general idea than a real circuit schematic.

The solar panel and generator are switched using a PNP transistor. When the generator is outputting a voltage at the base of the PNP, the current from the solar panel stops flowing. When the generator is not outputting a voltage, the current from the solar panel is let through the PNP from emitter to collector.

Now the next part does not make sense schematically. The comparator is meant to compare the voltage of the two batteries. The one that has less voltage should be charged by either the generator or solar panel. This is called the back up battery.

The next comparator again (redundantly?) compares the voltage of the same two batteries. The one that has greater voltage will become the primary battery, which supplies power to the rest of the system.

Does this idea seem reasonable? How can I efficiently switch between the batteries based on their relative voltage? (Low power consumption is a huge consideration here.)

Thank you for taking the time to read over my ideas. I would really appreciate any help with this!

• You are still in the system definition stage and it is hard to give definitive answers since they would depend on the system requirements and details of the components. But in general, my approach would probably be using a uC as the controller. It would have a number of ADC channels for monitoring the voltage levels. The actual switching would be simple MOSFET circuits. Jan 30, 2015 at 22:11
• The system needs 10.86 Wh, but 10 Wh are due to having a fingerprint reader that is continuously on. If we can switch that component off and on then we need less than 1Wh of power. We are using a PIC24 microcontroller with 10-bit ADC so your suggestion for battery monitoring is a good idea. However, my question then is do I need to switch between batteries in this manner or can I just switch charging on and off for one battery? Jan 31, 2015 at 3:23
• If you are using 9V batteries, then connecting them both to the system with schottky diodes of say 0.5V drop does not result in a lot of loss. So that could be one way and is simple. And if one battery is rechargeable and the other is not, that is a possible configuration. But ultimately, it really depends on your requirements. Jan 31, 2015 at 22:26
• A 9V battery would unfortunately not be an option because it is a small system and thus has a size constraint. I was looking at AAA batteries, but they just need to be smaller than about 100 mm x 80 mm (they must fit inside a small enclosure behind a 1 W solar panel). Feb 1, 2015 at 6:17
• I took the 9V batteries from your diagram. It shows why it is hard to give good relevant answers when the scope is still wide open. Feb 1, 2015 at 7:42