Go Down

### Topic: Chosing the right resistor on an optocoupler (Read 6639 times)previous topic - next topic

#### xberg

##### Aug 10, 2011, 10:29 am
Hi,

I am planning on using the Sharp PC817 optocoupler:

What resistance should I use in my input (if any). I see in the datasheet of the PC817 a forward current of 50 mA and the Aruidno gives 5V, so should I simply use:
5V/0.05mA = 100 ohm?

thanks!

XBerg

#### mmcp42

#1
##### Aug 10, 2011, 10:57 amLast Edit: Aug 10, 2011, 11:01 am by mmcp42 Reason: 1
there is a drop across the diode of about 0.6 - 0.7 volts
so you could use 4.3v/0.05A = 86 ohm
then choose a resistor close to that
but 100 ohms would deliver 43mA which is close
after all you just want to ensure the diode is "glowing brightly"

looking at the data sheet
50mA is absolute maximum
typical seems to be 20 mA with a forward voltage of 1.2volts
so (5-1.2)/0.02 gives 190 ohms
180 or 220 would do nicely!
there are only 10 types of people
them that understands binary
and them that doesn't

#### xberg

#2
##### Aug 10, 2011, 12:05 pm
Thanks! Another few datasheets and I should be able to fly on my own

#### AWOL

#3
##### Aug 10, 2011, 12:11 pmLast Edit: Aug 10, 2011, 12:13 pm by AWOL Reason: 1
Quote
a forward current of 50 mA and the Aruidno gives 5V, so should I simply use:
5V/0.05mA = 100 ohm?

Yes, but expect to shorten the life of your Arduino - don't forget the per-pin absolute maximum 40mA limit.

Edit: And having read the datasheet of the optoisolator, expect that running that at 50mA would shorten its life too - that is the absolute maximum rating too.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### tkbyd

#4
##### Aug 12, 2011, 11:01 am
For people getting started, an introduction to choosing resistors for LEDs....

http://www.arunet.co.uk/tkboyd/ele1led.htm

Go Up

Please enter a valid email to subscribe