Circuit to charge battery from solar panel
This disadvantage of this method is the loss of energy if the PV ope circuit is more than 18V due to impedance mismatch or lack of Maximum Power Transfer or PMT which runs approx  80% of Voc.

But this is basically how a car alternator works with lots of power and inefficiency behind it.

YOu can choose a high side Logic switch for automotive high switched currents and logic level input from a comparator with a precision reference voltage to scale 14.2 down to the reference voltage, assuming lead acid battery.

If that is of interest, I or someone can show you this inefficient method.

Ideally you want the battery voltage to be 80% of the open circuit voltage or Voc.

This will explain why a 42% improvement is possible with PMMT.


ref www.roguepowertech.com/documents/MPT3048Rev2-Manual.pdf