Will you be keeping the Green and Red LEDs already in the circuit?
If so then your optos may not work.
I think you fail to see that your optos rely on the volt drop across the Red and Green LEDs to work.
It will not be 12V but about 1.2 to 1.6V, this may not be enough to operate your optos.
Like I asked what is the voltage across your Red and Green LEDs when they are ON.
The LEDs will not be in the final circuit,
I measured the voltage across where the green LED was, (lead on each pin with my multimeter set to DC, 20 volt range.)
when the unit is powered off, but still connect to the battery, it showed 0.2 volts
when it was powered on, it showed the same voltage to the unit ( 14.2v )
Remove the 4k7 resistors on the collectors of the optos (purple line).
Enable the buildin pull up resistors with code, as explained in post#2.
Swap the values of the voltage divider.
The zener is ok there, but useless in case the Arduino is off.
Tits on a bull. Can be removed.
A 15volt supply is too high for the Nano.
The extra 75mA from the relay will overheat/fry the onboard voltage regulator.
A 5volt micro-power buck converter could fix that.
I have the voltage divider set to give me a 15v range ( max output from my solar controller to the batteries )
Depending where I look on the internet, depends what the answer is,
here ( https://www.arduino.cc/en/Main/arduinoBoardNano ) says this,
The Arduino Nano can be powered via the Mini-B USB connection, 6-20V unregulated external power supply (pin 30), or 5V regulated external power supply (pin 27). The power source is automatically selected to the highest voltage source.
Here ( http://www.es.co.th/Schemetic/PDF/ARMB-0022.PDF ) says
Input Voltage (recommended)
Input Voltage (limits)
The Relay is the 5v type, it will operate for about 2 seconds to 'toggle' the unit on / off
Can some one check my schematic to see if I have the optocoupler wired correctly please,
just a thought what voltage can they run at ?