Help using 4N26 Optocoupler

Im new, feel free to ask for any information that might be missing or anything I should chage

I am trying to pulse a 12v Led array using a 4N26 Optocoupler and an Arduino UNO, there is power going into the optocoupler but nothing form the output. The Arduino is wired directly to the 1&2 pins from digital pin 13 and ground. On the 12v side, negative side of the array is going through the optocoupler and to the battery, while the positive side is going straight to the LED array.

Any help or advice is appreciated

Thanks, supercat810

Optocoupler Datasheet

Welcome to the forum.

A resistor is needed when a led is connected to a output pin of the Arduino board.

The "input" side of the optocoupler is a led. It is meant to be driven with 10mA, so a value between 5mA and 10mA is normal.
With a resistor of 470Ω between pin 13 and pin 1 of the optocoupler, the resulting current is (5V - 1.1V) / 470Ω = 8mA into the optocoupler.

The "output" side of the optocoupler can drive up to 50mA.
With 8mA at the input and the output transistor driven into saturation, then the Current Transfer Ratio is about 0.7. That means the output can drive 5.6mA.

If your led array would need 20A then the optocoupler needs to be four thousand times stronger.

Can you give a link to the led array ? (a link to where you bought it).
Do you have a solder iron and a multimeter (also called DMM) and can you easily buy things from Sparkfun and Adafruit ?

1 Like

Array

I have a multi-meter and a soldering iron, I also bought a small prototype board.

I am okay at soldering, ive done some wiring for cars and stuff but nothing using 2 different voltages or a optocoupler

It needs 500mA, so instead of being four thousands times wrong, the optocoupler is only hundred times wrong :slightly_frowning_face:
Or is there a control signal for the leds ? If it has a standby mode, then there must be a way to turn it on and off with a control signal.
Can you find more information ? That website is so vague, you should not have bought it.

There are websites that sell things that actually work, for example: Adafruit, Sparkfun, Pololu.

You can't use a 4N26 to turn that array on and off
A MOSFET would be more appropriate
led

1 Like

Thanks for the tip! and thanks for the diagram! I can probably buy a MOSFET and try it out today or tomorrow, are there any parameters I should look for specifically? (Apart from being logic level)

Edit: Would something like a [NTE2395] or a [NTE2975] work aswell? (https://www.nteinc.com/specs/2900to2999/pdf/nte2975.pdf)(https://www.nteinc.com/specs/2300to2399/pdf/nte2395.pdf)

Yeah, it is vague but it seemed fine and shipped pretty quickly. I can try and message the seller and see if they have a datasheet. I will try jim-p's solution in the meanwhile
The most I can find for control is a photoresistor with its own power plug on the back of the board, the array will only turn on if I cover the photoresistor. I don't know how much power it takes.

Thanks for your help

Those MOSFETS won't work.

The data sheet should specify a max Rds(on) of less than 500mΩ at a Vgs of 5V or less.

Thank you so much for your help

supercat810

The IRLZ44N is very common, you should have no problem buying it

An NPN transistor will also work.
Do you have any transistors?

I dont but I get anything from this store relatively quickly
https://shop.sayal.com/

Couldn't find anything that would work with 5V and handle 500mA
Unless you want to build a little more complicated circuit using a transistor and MOSFET

I don't mind trying that, could you please post a diagram or something to point me in the right direction?

Both parts are available from your favorite store.
The only thing is that it works backwards.
Set the UNO output to HIGH to turn off the LED array.

1 Like

Wow thats perfect, thank you so much. Il try it this evening

Thanks again and have a good day, supercat810

You too

Sorry to bother after such a long time, but I have a quesiton about the part of the circuit thats circled in red, what is its purpose?
Furthermore, I dont understand why you cant wire the arduino directly to the MOSFET, without using the BC337

jim-p,

This is a question from an older thread. You had posted two schematics, one with just a mosfet and one with a transistor and mosfet. What was the particular advantage of the circuit with the transistor vs just the mosfet. If there is an advantage. I have a similar project as the one you assisted on back in August where i want to illuminate many LEDs via a control signal from an Arduino. The project is a moving, light up dinosaur for my grandson.

Best,

Tony

The advantage was availability.
IRFZ34N was available to you and the IRLZ44N was not.
If you can buy the IRLZ44N, than that circuit would be prefered because it is simpler.
The IRFZ34N gate will not work with 5V directly from the arduino so a transistor was needed to control 12V through the 3.3K resistor.