Arduino 4n25

Hi all,

Looking to use a 5V output on Arduino to operate a 4n25 optocoupler to turn a 12V led on the output side on the optocoupler. i have been trying to do this for some time now with circuits found on google with no sucess. Output needs to be NPN.

Any help would be greatful

Please provide examples of what you have tried and tell us what happened with each and how it is different from what you wanted.

Output needs to be NPN.

The 4n25 has an NPN transistor for its output so the output cannot be anything else, so why have you specified this?

What's the current rating on the LED (amps or milliamps)? If you don't have the current rating, how about the wattage? Do you have a link to the specs?

The 4N25 is only rated for 50mA and most "12V LEDs" require more than that.

Plus, LEDs require a constant-current (or controlled current) source. With "regular little" LEDs you can use a current limiting resistor but high power LEDs normally use a more advanced current source.

And the 4N25 is obsolete! :roll_eyes:

I was using an led for test purposes only. What I really need to control is a beckoff EL1809 16 channel input module:

The Arduino is running a sensor which when triggered sends a output to the input module. Arduino outputs are 5V and the el1809 needs a voltage of 11-30V to get a '1' signal voltage. The plan is to trigger the optocoupler with the 5v on Arduino and the output side will be the 11-30 side to control input module.

the attached image shows the wiring example i was using put cant get anything from Vout

pasted-from-clipboard.png

pasted-from-clipboard.png

the attached image shows the wiring example i was using put cant get anything from Vout

Well you should get something. Maybe you have blown the opto by using such a low resistor value, maybe you have not wired it right.

If I were doing it then I would put the 4K7 between the collector and supply, maybe change it to 10K, and then the emitter to ground. In this way the input will "see" a good ground connection not a 4K7 pull down to ground.

But you should at least see something on a DVM with what you have with the input to the EL1809 not connected.

check the led with a dmm on diode scale

Grumpy_Mike:
Maybe you have blown the opto by using such a low resistor value,

You meant "too low value resistor"? The worst case for the optocoupler is if it's resistance is equal to the load resistor. Assuming 20V instead of 18V (to get some headroom) there is 10V over the opto and so it dissipates 10^2/R W. Using 4k7 resistor it is 100/4.7 ~ 20 mW. That should not blow an optocoupler.

Ruddock984:
cant get anything from Vout

What that means? There is always 0 V? Check everything! Is there expected voltage on the Arduino side? ~ 1.5 V over the LED in the optocoupler and the rest of power supply over the 120 Ohm resistor? Is 18V on the collector and 0V on the emitter on the other side? Measure directly on leads of the IC.

You meant "too low value resistor"?

No you have got hold of the wrong end of the stick, or in this case the opto.

I am talking about the 150R resistor on the LED on the input end of the opto. It would give about 24mA LED current assuming a 1.4V drop across the LED. I haven't looked up the data sheet for that opto so it might be OK which is why I said "Maybe you have blown the opto ". A dead LED in the opto would explain his results, or lack of them.

Grumpy_Mike:
No you have got hold of the wrong end of the stick, or in this case the opto.

I am talking about the 150R resistor on the LED on the input end of the opto.

You suggested to replace the 4k7 with 10k which led me to the wrong side. I agree I would use some higher value instead of 150R for various reasons (protection of the LED, Arduino output pin, power supply load, ...).

You are assuming the input is HIGH true (sinking), have you tried the other way?