Aye, that's all well and good (and thank's for the sinewave formula, might come in handy one day) ....
but... go to the middle of a quarry in the desert with no signs of life anywhere near for 300 miles! - run a 240vac generator, run a 100 feet cable to the middle of nowhere, create that circuit on a breadboard, walk back 100 feet to the van/car start the generator and then quickly stand behind a 6ft high shield.......
Seriously now.... Would you're Arduino Board work using 2 voltage divders a Cap and a Rectifier diode?
Yes or no? (Standing 100feet away behind a blast shield) ...