Go Down

### Topic: TLP521-4 Opto Coupler / Photocoupler (Read 258 times)previous topic - next topic

#### timmorn

##### Nov 17, 2018, 08:11 amLast Edit: Nov 18, 2018, 06:01 pm by timmorn
Hello,

I want to use a TLP521-4 (Datasheet) in my setup. I tried to read about opto-coupler and the datasheet, but I am not completely sure how to calculate.

I think the resistor for the LED is correct. I use Arduino Pro Mini with 3.3V. So:

U = 3.3
U_F = 1.15
I_F = 0.05

R = (U - U_F) / I_F = 43.00 Ω

But I am not sure about Work Resistor. Formula should be:

R_A = (V_CC * SF) / (I_F * CTR)

V_CC = 24
SF = 5 (Switching speed is no matter)
I_F = 0.05 (I read that this comes from LED?)
CTR = 1 (I am not sure about CTR from datasheet)

So R_A would be 2.4 kΩ from this calculation. But as you can see, I am not sure about CTR. In the data sheet I only see one graph which is only for 25 °C and two completely different curves Sample A and Sample B. To this I am not sure what I shoulg choose on x-axis (Forward current I_F (mA)). I talk about this graph:

Thank you and best regards!

[EDIT 20181118] The final and reviewed drawing

#### outsider

#1
##### Nov 17, 2018, 09:32 am
The 0.05 A (50 mA) for the led is the absolute maximum, you will probably need only 5 to 10 mA depending on the output transistor load, what is the opto switching? Can you post a diagram?

#### timmorn

#2
##### Nov 17, 2018, 09:59 amLast Edit: Nov 17, 2018, 12:35 pm by timmorn
I hope this is nearly what you want. If you tell me how I can make the diagram better, I would be happy:

The outputs which go to ground in the image should be connected with E1-E4 from the device you can see in this thread. It is signal level switching.

#### Paul__B

#3
##### Nov 17, 2018, 01:24 pm
Well, you got that diagram wrong!

You show E1 to E4 connected to ground instead of the phototransistor emitters.

The optimal LED current will be in the 10 to 20 mA range - as your graph shows.  Let's say 20 mA and a 100 Ohm resistor.  Worst case CTR is 0.5, so you may expect 10 mA from the phototransistor, at 24V that would correspond to 2k4 and the resistor would dissipate a quarter watt. I think 4k7 would be a more conservative choice (if you needed them - see below).

Do we know yet what the input characteristic of your 24 V device is?  Since the datasheet refers only to switches pulling up to 24 V, you do not need pull-down resistors in any case.

#### timmorn

#4
##### Nov 17, 2018, 04:10 pm
You show E1 to E4 connected to ground instead of the phototransistor emitters.
Is only my understanding of the drawing wrong? If you look at the device, my idea was to connect the 2.2k resistor in my drawing to E1, E2, ... Perhaps I only draw it wrong.

Or do I have to connect the side where the 24V are originating?

The optimal LED current will be in the 10 to 20 mA range - as your graph shows.  Let's say 20 mA and a 100 Ohm resistor.  Worst case CTR is 0.5, so you may expect 10 mA from the phototransistor, at 24V that would correspond to 2k4 and the resistor would dissipate a quarter watt. I think 4k7 would be a more conservative choice (if you needed them - see below).
Thank you. I will draw again, as soon, as I understand your previous statement.

Do we know yet what the input characteristic of your 24 V device is?  Since the datasheet refers only to switches pulling up to 24 V, you do not need pull-down resistors in any case.
I will measure as soon as possible. In the moment I have no access to the device. But I am sure that the 24V are only needed for logic, because the devices are completely functional without connecting the 24V to them.

To what resistor are you refering with "pull-down"? The 2.2k in my drawing?

Thank you!

#### WattsThat

#5
##### Nov 17, 2018, 05:08 pm
Using 43 ohm current limiting resistors will destroy your Pro Micro. You cannot draw 50 ma from an output pin, 20ma is the reasonable, practical limit. 150 ohms, perhaps 120 ohms would be the absolute minimum value to use with a 1.15 vf led.

Eliminate the resistors in series with transistor emitters and remove the ground symbols. The emitters connect directly to the inputs of your fan controller. The controller is the load resistor in your drawing. The circuit is a simple emitter follower, when the led is on, the transistor is on, suppling 24vdc to the controller.

I do not know if you'll have enough current to satisfy to the controller since we don't know the rank of the tl421 and thus do know know the exact CTR, but it will be at least 100%. A simple voltage measurement when a transistor is on will tell you. More than a volt of drop and you don't have enough drive current.
Vacuum tube guy in a solid state world

#### timmorn

#6
##### Nov 17, 2018, 05:50 pm
I understand my mistake. I wanted to symbolize that the device is grounded. But I understand my mistake. If I want to do this, I would have to add Ground in series with Ex.

If the LED resistor is too high, my optocoupler will not switch?

Is the following correct?

#### Paul__B

#7
##### Nov 17, 2018, 09:58 pmLast Edit: Nov 17, 2018, 10:00 pm by Paul__B
Schematic is essentially correct, now as to the resistor values.

Without knowing what current is needed to switch your device, it is difficult to know whether it will switch reliably, but it is unlikely that it will require more than 10 mA, so it should be fine.

Using 43 ohm current limiting resistors will destroy your Pro Micro. You cannot draw 50 ma from an output pin, 20ma is the reasonable, practical limit. 150 ohms, perhaps 120 ohms would be the absolute minimum value to use with a 1.15 vf led.
Sadly, "WattsThat" has failed the basic requirements for answering a question, which is to comprehend the question asked by reading it in the first place.

I am sympathetic, because I nearly fell into the same trap.

The correct resistor value is 100 Ohms.  If WattsThat takes the care to read the whole thread (and in particular, the third sentence of the OP) he will agree.

#### timmorn

#8
##### Nov 18, 2018, 10:34 am
Thank you very much for the help and looking in detail on my problem!

Without knowing what current is needed to switch your device, it is difficult to know whether it will switch reliably, but it is unlikely that it will require more than 10 mA, so it should be fine.
Sadly, "WattsThat" has failed the basic requirements for answering a question, which is to comprehend the question asked by reading it in the first place.
I think here I still have a understanding problem with opto coupler. I do not understand why my led resistor has something to do with the current on the phototransistor side? Because the phototransistor is more activated if the led is brighter?

#### Paul__B

#9
##### Nov 18, 2018, 11:25 am
I do not understand why my LED resistor has something to do with the current on the phototransistor side? Because the phototransistor is more activated if the led is brighter?
And that is precisely the case.  That is the whole point of a photocoupler.

You will see that I referred to the "CTR - the Current Transfer Ratio - and you actually showed a graph of this versus the LED current.

The CTR refers to the ratio of the phototransistor current to the LED current.  In general it should be a constant ratio but in fact, it is not which is what that graph describes; it is non-linear.  In any case, the phototransistor current does increase with the LED current (as long as there is voltage across the transistor) so you need sufficient LED current to enable a particular phototransistor current.  Simple as that.

#### timmorn

#10
##### Nov 18, 2018, 06:03 pm
May I ask one more question? What is exactly the reason for the pull down resistor we removed from my drawing and which is calculated by?

R_A = (V_CC * SF) / (I_F * CTR)

#### Paul__B

#11
##### Nov 18, 2018, 10:07 pm
Not necessary.  You are emulating a switch and the optocoupler transistor does just that.  The only requirement is when "switched on" that it can conduct sufficient current to satisfy the circuit to which it is connected.

#### WattsThat

#12
##### Nov 18, 2018, 11:04 pm
The load resistor was removed because it provides no function, it only increases the current that must be sourced by the transistor of the optocoupler. The fan controller provides the necessary load. We don't know what that actual load is but it will be evident by the voltage at the emitter of the optocoupler transistor. A voltage less than supply minus 0.7 volts would indicate insufficient current being sourced by the transistor.
Vacuum tube guy in a solid state world

Go Up