4n35 Opto-coupler question

Hi all

I have some 4n35 opto-isolators on my PCB and I want to drive them with either 5v, 12v or 24v.

https://uk.rs-online.com/web/p/optocouplers/0597302

I basically planned to put a 4 terminal plug on the PCB and have a common ground pin, and then 3x sets of resistors to feed the internal LED.

BUT.. my brain is boggled by the datasheet. I kinda went for 10mA at 1.3v. Does that seem correct?

Therefore, I was going to use a series resistor of 2k2 for 24v DC, 1k for 12v DC and 390r for 5v DC.

It is highly likely my math is wrong.....

Any other suggestions to drive the Opto-isolator over a wide DC input voltage?

Thanks

I googled

 drive the Opto-isolator over a wide DC input voltage

and so might you.

See

for the general idea. Above my pay grade but my first thought was using a Zener diode somehow.

a7

If the input LED has a forward voltage drop of 1.3V and you want 10mA (0.01A) to flow, the resistor needed will be:
Supply voltage - 1.3 / 0.01.
Example for 12 volts:

12 - 1.3 = 10.7V / 0.01A = 1070Ω, closest standard value is 1000Ω (1k).

10.7V / 1000Ω = 0.0107A, 10.7mA

What are you switching with the 4N35's output?

1 Like

The output of the opto-isolator goes directly to an ESP32 as an input
It's held high and goes low upon triggering (seems to work fine on the breadboard)

That link is useful but probably overkill for what I need. Not sure I need reverse polarity protection. Once the inputs are wired, they will not change often (plus PCB space is tight)

I have used these before:

https://www.microchip.com/en-us/product/CL2

Nice devices that I have used to drive power indicator leds on circuits that might have a wide input voltage.
Shame... I think 20mA might be a bit high

In that case you probably only need 2 ~ 4mA through the input LED.

For 12V in: 10.7 / .003 = 3567Ω or a 3.3k resistor. 10.7V / 3300Ω = 3.2mA.

Why an opto coupler.
Opto couplers are used when you don't want a shared ground.
Please post a circuit diagram.
Leo..

My thinking is if I send in too much juice, I only blow the opto-isolator and not the processor

Fair point.
You don't need 10mA optoLED current to drive a digital pin of the Arduino.
1-2mA opto LED current is more than enough.
Set the input pin to INPUT_PULLUP, and connect the opto transistor between pin and ground.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.