I have a device that measures the current in the mains through a 0.01 Ohm 20W shunt resistor. The voltage across the shunt is amplified by a op amp and feed into a uC's ADC for farther calculations.
But to measure the voltage drop across the shunt the the mains needs to be ground coupled with the op amp and the rest of the components, which means that the D_GND and the A_GND will be 220 V above earth, and I feel very uncomfortable about that,
So what can be that to avoid raising the GND to such a high voltage? I know one solution would be opto-coupling the signal, but it doesn't really fit in my project. Also a capacitor between the GND and the mains might work. Any thoughts?
Here is the schematics: