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.

Optocoupler interface with pic microcontroller

Status
Not open for further replies.

M.Imran Ali

Member level 5
Joined
Sep 28, 2012
Messages
86
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
1,814
Hi
I want to interface an optocoupler with pic18f452 I have orient 817C in my hand . Can any body help me?
 

It's very easy, connect any port pin you desire to pin number 1 of 817c through a resistor, and pin number 2 to ground. Limit the current in input LED of optocoupler to 10mA by the resistance and output of it is an npn transistor, connect it as you require.
 

Do you want the PIC to drive the opto-coupler? Or does the PIC receive input from the opto-coupler?

To drive the opto-coupler, connect a current limiting resistor from PIC pin to PC817 LED anode (pin 1) and connect PC817 LED cathode (pin 2) to ground. Use the transistor side collector and emitter as you would use a standard NPN transistor. Limit the current to a value within limits of both the PIC and the PC817. 10mA is good. So, resistance should be (5-1.4)/0.01 = 360R. So, you can use a value between 330R and 560R.

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top