# Calculate Resistor Value for Optocoupler - 24VDC Anode

I'm looking for help and unfortunately stuck for time on a project, so hoping someone wouldn't mind helping me out.

I am trying to calculate the resistor value required for an opto-isolator circuit. I am powering a 24DC magnetic reed switch passing ground through a Siemens SFH615A:

http://docs-europe.electrocomponents.com/webdocs/009c/0900766b8009c194.pdf

Can someone recommend a resistor value, thank you very much.

I have used the calculator available here: http://led.linear1.org/1led.wiz with a 24V supply, 1.5 forward voltage and 60mA forward current.

I would be grateful if someone could double check

• What voltage is used to drive the LED - that is what will determine the resistor value. Also, what current is required to operate the reed relay? - that also affects the required LED current. The 60 mA LED current suggested in Alexan_e's answer is the Absolute Maximum rating for the LED, and you should normally use a somewhat lower current where possible. Commented Dec 19, 2013 at 0:27

The resistor value is calculated like any common LED

$$R= \frac {V_{in}-ledV_F}{I_{LED}}$$

The actual value depends on the current you want through the LED

For 60mA and typical VF= 1.25v

$$R= \frac {24v-1.25v}{{0.060A}}$$ which results to about 380 Ohm

If you want to calculate for VF= 1.5v $$R= \frac {24v-1.5v}{{0.060A}}$$ which results to about 375 Ohm

Peter Bennett made a good point in the comments below about the resistor power rating, make sure it is appropriately sized.

The resistor power is calculated as

$$P= {I}^2 * R = {0.06}^2 * 380 ohm = 1.368W$$ so a 2W resistor should be good enough

• Thanks alexan_e, the standard resistor sizes available to me are 374 Ohm and 390 Ohm, would I be ok with either, thanks. Commented Dec 19, 2013 at 0:03
• Beware that 22.5V @ 60 mA through a 390 ohm resistor is 1.35 watts! Your standard resistors are probably rated at 1/4 watt or so, so won't survive for long! Commented Dec 19, 2013 at 0:23
• Thanks Peter, yes the calculator recommended 1.4W, thank you for confirming Commented Dec 19, 2013 at 0:27