Thank you for the answer.
That is hair raising stuff.
For sure it is.As general rule, I do things first and think about later. NOT IN THIS PARTICULAR CASE. :)
The "ground" marked on the mains supply is AC neutral not AC Earth. If you use a 2 pin mains plug for your voltage divider side, the "Ground" on the Arduino side could be at mains potential, depending on the orientation of the plug !
That is one of my points, and FEAR. Assuming that the gnd of arduino is the battery negative, and that the entire board is isolated from any path to real ground (earth) ( special trough the human body lol), connect the live wire to arduino gnd, will do harm to the board in this particular circuit ?
If you do choose to isolate your Arduino, for example in a plastic box, you can't use the USB cable to connect to the serial monitor or expose any metal parts.
Yup, I don't intend to use it on computer, at least while Im measuring high voltage, because of gnd in arduino is connect to a real gnd of the computer. In that case, if i connect the arduino gnd to live wire, some thing for sure will blow.
What are you measuring ? peak voltage or RMS voltage and/or frequency and how are you going to display it ?
I wish to make a kind of do it all, and use a display to show the information, frequency, wave form, peak voltage, rms voltage... Because of that some solutions are not accepted. Like a FULL BRIDGE RECTIFIER. (Any one got the reference, huh ?)
But really, consider using this instead which claims to be fully isolated: https://www.ebay.com/itm/Active-single-phase-voltage-transformer-module-AC-output-voltage-sensor-ZMPT101B/223492691495
The problem is I want to build it myself, (Even if I only do it in simulations) and learn some things in the path. For instance, I had no idea that this second voltage divider (the one on the right) could pull up the negative part of sine wave to a positive range. When I saw it working on Multisim I believed I was doing some sort of witch craft...
There is another simple solution, that is a 3 resistors voltage divider, where I get the voltage potential on the middle resistor, and pass that trough 2 diodes. This way I think does not matter where the probe with the live wire goes. The problem with that is for small signals. What you think about use it, and for low voltages I use a different circuit ?
Also, there is any kind of circuit, maybe port logic with transistor, where I can make the live wire always go to to the same part of circuit ? Or at least don't go to gnd ?