It’s NEVER considered “safe” to have a direct connection to line voltage, even through a resistor. You PROBABLY won’t die, but it won’t feel too good…
I just did a quick resistance measurement between my hands, and I got about 6 megohms.* Another megohm or two wouldn’t make much difference. Here in the US, our line voltage is “only” 120V… I’ve been shocked a few times and even though I didn’t die (or even get injured) it’s no fun.
If i touch the Board the current should be limited by the 1M Ohm Resistor to 0,11 mA ?!
If you are touching ground, there is only one resistor between the AC voltage and ground (plus your body resistance), and the peak of an AC sine wave is about 1.4 times the RMS (about 308V).
A small transformer should be less than $10 USD.
Or, you can put the whole thing in an isolated/insulated box with an isolated power supply (also safely inside the box) or power it with a battery (and never connect to USB when the AC is connected).
- There are lots of variables when measuring body resistance but I knew that it was in the megohms and I know even with high body resistance you can still get dangerous currents