Opto Couplers pc817

Hi all,

I would like to use a couple of opto couplers in a new project. I've never used them before. I bought these ones : PS817C 1338 4 pins. Two for the LED on one side, a collector and emitter on the other side...

Now I was wondering, they have an LED inside, do I need to add a resistor to my circuit? If so what value when using 5v arduinos? How do I know this? I can't find it on the datasheet...

Thanks!

Kevin77: they have an LED inside, do I need to add a resistor to my circuit? If so what value when using 5v Arduinos? How do I know this? I can't find it on the datasheet.

Well, looking at the datasheet, the LED has a voltage drop of about 1.5V at about 10mA, so that would leave about 3.5V across the resistor, so you would want say, a 330 ohm resistor.

At this specification, it is expected to pass at least 5 mA in the photo-transistor, so that would want no less than a 1k pull-up - 10k would be fine, as would be the Arduino internal pull-up.

You are lucky to get a good answer as you gave an incorrect part number :)

Isn't that amazing on this forum... The things you can pull of here! ;)