Output resistor for 4n35 optocoupler

How can we choose the value for resistor on the collector side of the 4n35 optocoupler for driving uln2003 or any other devices.
i made a simple circuit and it is working for both 300 ohms and 10k and what the best value for it and how can i choose it ?

Hi.

That schematic doesn't show a resistor on the collector side, as you called it.
The location of components in a schematic does matter, sometimes more that other times.
Because resistors have a wide range of uses, you need to know what function that specific resistor has to fulfill.
The value to choose may depend on the load you want to control.
You'd have to find out what's in those uln2003s and what the recommended use is.
This usually can be found in the products' datasheet.
The highest value you can choose to give a stable working solution, will save some energy and should be considered the right choice.

MAS3:
You'd have to find out what's in those uln2003s and what the recommended use is.

uln2003 is consist of darlington transistor arrays, it is used as relay driver as shown in schematic.

How can we calculate the current through that 4n35? does it calculated using CTR(current transfer ratio ?
what is max value of output current that it can handle?

MAS3:
Because resistors have a wide range of uses, you need to know what function that specific resistor has to fulfill

well i still learning those uses.. so please be kind with me..
I think that resistor r2 is used to provide sufficient voltage drop to trigger the 1B pin of uln2003 IC.

the resistor on the collector side (i think...) is used as current limiter (?) if there is a resistor what is the right value for it?

4n35 datasheet here

uln2003 datasheet here

The LED in the opto has a max current of 50mA but that is much higher than should be used. It will work fine at 5 - 20mA.

The uln2003 is designed for 5v input. Your circuit will apply 12v. The collector R to Gnd will not change this voltage.

The input (internal) R is 2.7k. As this was designed to set the input current to a safe value for 5v, it is reasonable to add another series R of the same value to suit 10v input. As you have 12v, simply use R a bit bigger, say 3.9k in series with the input and drop the existing R2.

Weedpharma

anilkunchalaece:
uln2003 is consist of darlington transistor arrays, it is used as relay driver as shown in schematic.

How can we calculate the current through that 4n35? does it calculated using CTR(current transfer ratio ?
what is max value of output current that it can handle?

well i still learning those uses.. so please be kind with me..
I think that resistor r2 is used to provide sufficient voltage drop to trigger the 1B pin of uln2003 IC.

the resistor on the collector side (i think...) is used as current limiter (?) if there is a resistor what is the right value for it?

I know what the uln2003 is, and a bit about how it was built.
I wasn't asking for the datasheet, just trying to handle a tool for you to find out more about the part.
If i'm going to use that component, i will look up the specifics in its datasheet myself.

The resistor R2 that is in your schematic, will reduce current through the collector - emitter of your opto coupler.
It will do so no matter if it is connected to the collector or the emitter as it is now.
At the place R2 is now, it will also be a pull down resistor.
It will try to pull down the level on pin 1B if it is not powered through the opto coupler.
It isn't there to create a voltage drop as you expected.

If the function is a current limiter, then you need to know what current you want to flow at that stage.
A current limiter is always in series with the part you want to protect.
R2 is in series with the opto, but not with the uln2003.
If your uln2003 happens to make a full short (no matter if that is possible or not), your opto and the uln2003 are not protected anymore.
Should you put R2 to the collector (not telling you that that is the way to go here), the opto would be protected.
Weedpharma already told you where the best place for a resistor would be, and suggested a value.
Dropping the present R2 also means dropping the connection to GND there.

The shown resistor values are a bit odd.
Try to use standard values which are widely available, makes life easier.

MAS3:
It isn't there to create a voltage drop as you expected.

call me stupid but can anyone tell how the switching operation takes place in that circuit.
i thought that voltage drop will trigger the uln2003 ic.

If i'm going to use that component, i will look up the specifics in its datasheet myself.

that datasheet is a big beast for me to fight..
and i didn't understand a bit in it.

The input to the driver has a R into the base of a transistor. It is there to limit the base current into the first Tr. The drive current is amplified by the first Tr and fed into the base of the second Tr. This turns on and allows current to flow through the relay to gnd.
This arrangement of Trs gives high gain.

A basic Tr is a current driven device. It needs voltage to provide the current. Too low current and it will not turn on fully. Too high and it will burn out.

Weedpharma

Edit. Using positive current flow for ease of explanation.

The 4n35 data sheet says collector current max is 50 mA, I would stay below 25 mA if possible for long life.
At 5 Volts that would be: 5 Volts / .025 Amps = ~220 Ohms, for 12 Volts: ~470 Ohms.