Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AC measurement using Opto circuit

Not open for further replies.


Newbie level 4
Aug 19, 2007
Reaction score
Trophy points
Activity points
Is it possible to measure 0-24VAC accurately using Microcontroller (using a Optocoupler circuit). i need electrical isolation on my board..i cannot use a rectifier circuit for this 24VAC due to safety issues of diode getting shorted..moreover i cannot use a transformer here for isolation due to restricted space on the board.
The circuit shall be used in very noisy environment and also there is a relay in the 24VAC line that opens and closes causing spikes in the circuit..Is optocoupler better option here..or any other suggestion

Optocoupler match and linearity would be the ptoblems
I expect. You might want a voltage to frequency conversion
so that your opto data is digital and those issues "go away".
But that conversion needs more components and may not
be high accuracy when done simply. How good is "good
enough", is (as usual) the first question.

One thing is to repeat "I cannot" several times, another to consider the real properties of electronic components and state of the art. Some statements seems at least hasty. You cannot solve your problem this way.

The actual accuracy specifications has been already asked, as another question, can you provide a power suppply for the primary side of the measurement circuit. If not, you're more or less stuck to a transformer (but it can be very small).

Thanks all for your valuable suggestions.. There are lots of restrictions in my design due to safety constraints, board size, cost, Noise immunity etc.
Safety standards calls for not using diode in the detection path since it always fails short..board size is hardly 90 X 60mm where there are high voltage lines going through the board for which most of the space shall be consumed by giving proper creepage distance. The board will be near to very nosiy environment. And cost is another constarint..keeping all this in mind i have to go for a circuit..Analog opto seems to be a good solution..i never heard of something like that before..thanks Sinisa..Thanks all again

Safety standards calls for not using diode in the detection path since it always fails short
They most likely don't. If safety means short circuit protection, this is not a serious restriction for a measurement circuit. Why do you think, there can be no current limiting elements in series with the diodes? If safety in contrast means reliable measurement, most components in question must be suspected.

If you can draw a tiny amount of power from the 24V, the most accurate way of measuring would be to keep the whole measurement system on the AC side of the circuit and opto-couple the result as digital data to the isolated side. It removes the linearity problem and increases accuracy but at the expense of a little extra power being used and slightly more board space being used.

You can get 8-pin PICs with internal ADC, clock generator and with sufficient drive capability to operate the opto LED. All you need is power for it and rectification/scaling of the parameters you are measuring.


Not open for further replies.

Part and Inventory Search

Welcome to