What resistor to use with Optocoupler ?

I am wanting to run a 5vDC circuit with a resistor in series, through the diode side of an optocoupler http://za.rs-online.com/web/search/searchBrowseAction.html?method=searchProducts&searchTerm=7085480&x=0&y=0 and then to a switch connected to Ground.

Closing the switch causes current flow which then activates the optocoupler.

What I can’t seem to determine is the value of the resistor.

My supply is 5V and I see a “forward voltage” on the spec sheet of 1.25v ( typical ). But not knowing the correct terms, I can’t find the mA value that I need to calc the resistor size.

Help please.

Led current is not to critical, the data sheet shows examples running at 5ma to 20ma. 20 ma is a very common value to run a led at so 5v - 1.25 = 3.75v / .020 = so 188 ohms or higher (up to 750 ohms) should work fine. I think 220 ohms is a common value.

datasheet: http://docs-europe.electrocomponents.com/webdocs/0e52/0900766b80e525f1.pdf


Many Thanks Lefty

I've been using 330ohm resistors with my 4N25s from the Arduino output pins, just because I had a load of 330ohm resistors sitting in a bag doing nothing. They work great.

I'm all in favor of "works/ use it" answers, but if you are interested in the details...

The LEDs in opto-isolators are quite like "ordinary" LEDs.

Aside: One thing to watch out for: LEDs don't always have the "reverse voltage blocking" "strength" of "ordinary" diodes... This matters if you think an LED can do double duty, and chop an AC signal into a series of half cycles.

Going back to "right resistor"... the details are explained at...


Yes, details, my first post here and how I came to the 330ohm conclusion.



I'm all in favor of "works/ use it" answers

I am not, not without understanding if you are putting any strain on things and just about to blow something up. That is the trouble with a lot of stuff on the internet, it comes from bodgers who have no idea what they are doing and that leads beginners into big mistakes.