• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

OptoCoupler pc817

Status
Not open for further replies.

watzmann

New Member
Hi All ,

i'm totally new with optocoupler , so i need to use it nowadays with a microcontroller project to get a signal from the microcontroller and then close a 12 volts circuit on the second hand .

i was doing a little experiment to ensure that i can use this device but something strange happened.

my experiment is :

i connected pin 1 to 5v and pin 2 to GND of a compter power supply , on pin 3 i wired 12 volts and on pin 4 i wired Anode of LED and then the cathode of the LED to the battery 12 volt Ground .


but it doesn't work !!!

what's wrong , could you tell plz ,



M.Ali
 

ericgibbs

Well-Known Member
Most Helpful Member
watzmann said:
Hi All ,

i'm totally new with optocoupler , so i need to use it nowadays with a microcontroller project to get a signal from the microcontroller and then close a 12 volts circuit on the second hand .

i was doing a little experiment to ensure that i can use this device but something strange happened.

my experiment is :

i connected pin 1 to 5v and pin 2 to GND of a compter power supply , on pin 3 i wired 12 volts and on pin 4 i wired Anode of LED and then the cathode of the LED to the battery 12 volt Ground .


but it doesn't work !!!

what's wrong , could you tell plz ,



M.Ali
hi,
Whats the type/model number of the opto-isolator?
 

watzmann

New Member
here's a simple schematic for what i have done ,

sure i used a resitor to prevent the LED breakdown , but even when i check by AVO there are no results ,

Ali
 

Attachments

ericgibbs

Well-Known Member
Most Helpful Member
watzmann said:
i wrote the name of the optocoupler in the title of my message ,

anyway it's PC817 Sharp
Hi,
Sorry!, didnt see the header number.

You MUST have resistors connected, say for +12V at 20mA = 680R diode resistor.

And about 4K7 or 10K0 for the transistor.

Does this help?
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
hi,
Modified your drawing.
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
watzmann said:
o.k , i'll try this and tell you

Ali :)
Dont forget, IF you have connected the LED in the opto to +5Volt, without a series resistor it could have 'died'.

Try a new opto if the first one dosnt work!
 

audioguru

Well-Known Member
Most Helpful Member
You have burned out the LED emitter in your opto-coupler because your circuit didn't have a current-limiting resistor for it.
 

philba

New Member
You should definitely follow the datasheets. If you didn't blow the internal LED, connected as an emitter follower, the external LED would have seen the base voltage. Probably in the 100s of mV range at most since it's generated by light.

Eric's modification should work fine.

Since the phototransistor in the opto is an NPN device, it follows all the NPN rules.
 
Last edited:

Gayan Soyza

Active Member
I burned many optocouplers by myself because of unreading the data sheet & exceeding reverse voltage of input than rated.

Watzmann's input reverse voltage seems to be 6V.You have a series resister so it will limit that.
 
Last edited:

Hero999

Banned
A series resistor will not protect it against reverse voltage, the only way to do that is to add a diode in reverse parallel. Some LEDs appear to be more resistant to reverse voltage than others, I've connected red LEDs to the mains via capacitors with no reverse diodes and they've been fine but I've killed blue LEDs by doing the same thing.
 

Styx

Active Member
blue LED's are alot (and I mean ALOT!!!) less tollerant to reverse-voltages

Also if you are after some speed in the switching concider putting a bypass cap across the Opto-LED input's burn resistor (1nF or less should do).
There are a few other tricks you can do to improve the performance of opto's when PWM/data transmission is involved (you don't mention)

eg:
loading the base of the photo-transistor (if avail)
ways to drive the Opto-LED
 

firewater

New Member
Hero99, could you show how to hook up the optocoupler with the diode in reverse parallel like you were talking about please.I'am using a 4N25-6 http://www.isocom.electronents.com/datasheets/4n25.pdf
The sheet shows the forward voltage max to be 1.5V at 10mA and I'm getting 1.7V peek so I need to increase the resistor value correct?
This graphic I made in Illustrator CS2 should be helpful.;)
 

Attachments

Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
hi,

Whats the value of resistor and whats the voltage connected to the resistor?

For reference a 'reverse parallel' diode is just a diode connected in parallel with LED, but with the diodes anode going to the LEDs cathode and the diodes cathode going to the LED's anode.

Its normally used to protect the LED from damage due to high reverse voltages.

Do you follow that?

EDITED:
 
Last edited:

audioguru

Well-Known Member
Most Helpful Member
ericgibbs said:
A voltage of 1.7V across the LED is within specification and its nothing to get concerned about.
The LED in an opto-coupler is a 1.2V IR type. Its typical forward voltage is about 1.2V or 1.5V max at 10mA. Its typical forward voltage is less than 1.4V at 60mA so at 1.7V I think it is frying.
I think he failed to limit the current again.
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
hi agu,

EDITED: erased cross reference
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
hi agu,

Just noticed that 'firewater' has hi-jacked 'watzmans' thread!:mad:


hi firewater,
Please open your own thread, as you can see, it can cause a little confusion if you add your query to a mature thread.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top