Does there exist a relay with 2 inputs that triggers to the input with the lowest Voltage?

I need a switch (relay) that enables the following, but does this exsist? If not is it a easy build? I have 2 separated wired 12v battery systems in my boat. 1 battery charged by the alternator (powers starter motor, lights and main bilge pump) , 1 battery charged by a solar panel charging controller (mainly... show more I need a switch (relay) that enables the following, but does this exsist? If not is it a easy build?
I have 2 separated wired 12v battery systems in my boat. 1 battery charged by the alternator (powers starter motor, lights and main bilge pump) , 1 battery charged by a solar panel charging controller (mainly powers backup bilge pump).
I would like to have a relay switch between the solar-charger and the 2 separate battery systems that connected the battery system with the lowest voltage to the solar-charger.
That way the solar charger will charge both battery systems, but only one at a time, and always the one with the least charge, and still stop charging when both batteries are full (the charger should still stop charging when it senses that whatever battery is connected has good voltage).
1 answer 1