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:
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?
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.
Paul__B:
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?
Paul__B:
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.
Paul__B:
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?
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.
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?
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.
WattsThat:
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.
Thank you very much for the help and looking in detail on my problem!
Paul__B:
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?
timmorn:
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.
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.
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.