Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

Arduino AC input sensing by PC817 Opto-Coupler

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
817
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,492
Please let me know that I want to measure AC mains 220VAC by using PC817. I googled but only I found zero-crossing detector circuit but I want to measure AC Voltage.
I built circuit for measuring AC but I am slightly confuse that is it right approach I used in attached circuit. Please comment your suggestions for more improvement.
 

Attachments

  • AC_Input_Circuitry_Snap.png
    AC_Input_Circuitry_Snap.png
    25.3 KB · Views: 1,367

what's the value of the voltage at R8 = 20k if input = 308vdc, 2nd the 27k resistor at the pc817
is much greater to turn it on, reduce it to 1k, adjust the divider so that 5vdc appear at R8 it will turn pc817
turn on but still there will be slight variation with 5vdc put a 47uf/50vdc electrolyte capacitor.
 

    imranahmed

    Points: 2
    Helpful Answer Positive Rating
You can do it that way but it requires calibration and the results will likely be different from one PC817 to another.
What you are doing is creating a DC current from the AC supply then converting it into a voltage with the optocoupler. The result will depend on the individual device and temperature, not really useful and not repeatable.

A better strategy is to convert the AC voltage to a digital format then pass the result through the optocoupler.

Brian.
 
Last edited:

Hi,

I´d make it more simple while more precise/linear.

I´d omit C1 and R8.
Then make R7+R4 = 330k
make C2 = 100F

Then I´d expect about 3V output @ 220V sine RMS input. (= average rectified)
(CTR = 50%)

Fur sure it depends on type, batch, temperature, age....


Klaus
--- Updated ---

Btw:

RV1 = 1k is not useful for real life.

Klaus
 
A simple low cost approach would be to use an ATTINY85 on sense side, measure V with its
A/D and a divider, convert that to pulse width or freq, and send that thru a standard coupler
to receive side. Receive side use a processor to measure freq or pulse width. Again depends
on accuracy you are seeking. There are processors that have +/- .1% Vref on them which is
>> accuracy that the Atmel parts. At greater cost of course.

The bridge could be eliminated, just a single diode , a zener and R for ATTINY85 Vdd.. a cap for
ATTIONY85 Vdd......

Regards, Dana.
 
Last edited:

Hi,

I´d make it more simple while more precise/linear.

I´d omit C1 and R8.
Then make R7+R4 = 330k
make C2 = 100F

Then I´d expect about 3V output @ 220V sine RMS input. (= average rectified)
(CTR = 50%)

Fur sure it depends on type, batch, temperature, age....


Klaus
--- Updated ---

Btw:

RV1 = 1k is not useful for real life.

Klaus

Please will make as per your suggestions because of easy solution please confirm me for your design will it work?
 

Hi,

It's just an example. Do the simulation on your own.
It's your design, your job...

Klaus
 
Please let me know why 100k resistors got heat up but touchable current through both resistor is 1.5mA and voltage across each resistor is 140 V in real circuit not simulation.
V = sqrt(PR) = sqrt(1 x 100000) = 316.22V maximum safe operating voltage for 100k1 watt resistor.
I = sqrt(P/R) = sqrt(1 / 100000) = 3.162mA maximum safe operating current for 100k 1 watt resistor.
 

Attachments

  • AC_Input_Circuitry_Snap.png
    AC_Input_Circuitry_Snap.png
    29.9 KB · Views: 321
  • WhatsApp Image 2020-09-22 at 10.00.17 PM.jpeg
    WhatsApp Image 2020-09-22 at 10.00.17 PM.jpeg
    97.1 KB · Views: 275

P = I^2xR = .225W
P = R^2 / R = 19600 / 100000 = .196W

In both cases I assumed your I and V were RMS values.....

So they are << 1W, should not be hot.


Regards, Dana.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top