The LTC4412 ideal diode from Linear Technology monitors the voltage from the
solar cell and the battery. When the voltage from the solar cells is 20mv higher than
the battery, the output turns on the p-channel device Q1. In darkness, when the solar
cells are no longer producing current, the voltage from the solar panel will be less than
the battery. The ideal diode IC A1 will then turn off the transistor Q1, blocking the
current path from the battery to the solar panel. In a similar fashion, in darkness,
the 2.5 volt reference will drop to a lower voltage, being starved of current from the solar
panel, turning off the voltage regulator circuit. The result is that Q2 is turned off hard.
With both devices turned off, no current flows into or out from the solar panel. As in
the last circuit, the op Amp A2 limits the charging voltage across the lithium ion battery
to 4.2v when the solar panel supplies current.