Any ideas on how to approach a battery monitor and relay situation? I'm trying to monitor a boat battery that's on a charger and which runs several separate 12v loads. I want to power the Arduino with the boat battery12v, monitor that voltage and disconnect one of the 12v loads from the boat's main circuit panel that could cause a damaging deep discharge to the boat battery if left on without the charger maintaining the voltage. Others are low demands (like automatic bilge pump) but more critical than battery health (sometimes shore power is turned off without me knowing it)
Use the internal reference and connect a voltage divider to an analog input .
If the voltage is below your threshold trigger a digital output .
Have that out control a relay via a transistor connected to the 12v such that’s is powered if the voltage is above your threshold .
I’d power via the Vin using 4 diodes in series to drop voltage a little . As the load is light the internal regulator will be fine .
Problem to overcome here of course, is when any low level is detected and any particular load is disconnected, the voltage will again rise and switch the previously isolated load back on line.
This could carry on at short intervals and be just as damaging.
Monitoring shore power would be a simple process as simple as a basic relay.
You could have a look at this to give you some idea