I need some advice on protecting the micro controller when measuring an AC power line (300VAC max). I do not have much experience in this matter.
My circuit is supplied with a fly-back switcher because of high power requirements. The supply to the micro controller is isolated.
I now want to measure the voltage, phase and freq at the input of the fly-back switcher (directly on the AC power line). I'm using a resistor and 2 clamping diodes to protect the I/O pin.
Is this enough protection? But the circuit is not isolated anymore, except on the switcher side.
How do I go about isolating the measuring part without using a transformer. Can I use an opto-coupler?
Or is it unnecessary to isolate the measuring part while the supply is isolated?
The circuit must conform to standards for commercial use (SABS - South African Bureau of Standards).
Please any good information will help.
Regards
But how do I measure the voltage on the AC line?
I did a simulation with the opto coupler, but it seems like I can't measure the voltage across a resistor because the transistor inside the opto coupler is either switched ON or OFF.
So the transistor is either switched on, or switched off.
Did you notice the little word linear in Eriks post? Any guess what he might have meant with that? Maybe a linear opto coupler isn't digitally on/off, but have a linear response curve?