[PIC] Optocoupler as an input to mcu to test line current ?

Status
Not open for further replies.

burrow

Full Member level 2
Joined
Dec 15, 2014
Messages
147
Helped
3
Reputation
6
Reaction score
3
Trophy points
18
Visit site
Activity points
1,148
Hai,
iam doing a project using pic18f4520.
And mcu requires an input to test if an AC 240V line is alive. Iam planning to use optocoupler for that purpose. I have MCT2E optocoupler. Please help me with the connection. how am i supposed to connect ac lines to opto and how opto should be connected to mcu ?
 

Emitter to ground, collector to pull-up resistor and directly to pin. If week pull up (wpu) option available, you may use it without external resistor.
To light the optocouple use ~200v zenner diode and resistor.
 

Emitter to ground, collector to pull-up resistor and directly to pin. If week pull up (wpu) option available, you may use it without external resistor.
To light the optocouple use ~200v zenner diode and resistor.



Okay.. thanks for the reply buddy. i have attatched an image. is the circuit right ?. But it doesnt seem to

 

Absolutly not. AC line should be isolated. 200V will drop on diode, last 20V should provide 5mA current to light the optocouple. So, the resistor should be 20/0.005 = ~4k or 3k7 from standart table.
 

Absolutly not. AC line should be isolated. 200V will drop on diode, last 20V should provide 5mA current to light the optocouple. So, the resistor should be 20/0.005 = ~4k or 3k7 from standart table.

it would be glad if you can show me a demo circuit.
 

You can take this schematic:
**broken link removed**
But use only left part till R3. Capacitor will limit the current.
 
Reactions: burrow

    burrow

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…