Voltage Divider or Step-down transformer for voltage sensing 240V AC
Don't use this circuit:



Why not?


It connects Neutral to ground, never do that! Although called "Neutral" there can still be a (dangerous) voltage on Neutral. Best case: the ground-fault-protector will trip and that will shut your mains off.
If you "solve" what I mention above by not connecting ground then your complete circuit could become mains live meaning you get an electric shock when you touch it and everything that is connected to it.
You cannot rely on the Live and Neutral to always be connected like that, in many countries Live and Neutral connections depend on how you plug in the mains socket. The UK style socket is the exception though. Then still, the socket could be wired in the wrong way.


So forget about this circuit.

Do use this circuit:



The transformer takes care of the mains isolation so the outputs of the circuit are safe to touch.

The ground connection isn't strictly needed, it is your choice to connect that ground to mains ground, a local ground (like a metal case) or just leave it unconnected.

Use a good quality transformer and reliability (chance that the circuit fails) should not be an issue.