A series resistor ( 2 x 100k in series ?) shunt diode ( 1N4148?) and optocoupler would allow you to sense the presence of 240vac safely....
Allan
A series resistor ( 2 x 100k in series ?) shunt diode ( 1N4148?) and optocoupler would allow you to sense the presence of 240vac safely....
Allan