Understanding the CTR of an optocoupler

Thread Starter

ba58smith

Joined Nov 18, 2018
62
I'm trying to design a circuit that will monitor a 12V pump (actual voltage can vary from 8V to 20V when the turns on and off) on my boat with a 3.3V microcontroller (an ESP8266). So, lots more voltage and amperage on the 12V side. I've considered a LOT of ways to do it, but have decided to use an optocoupler. Trying to decide which one is challenging to me, because of all of the variables. I'm having a particularly hard time understanding the CTR (Current Transfer Ratio), and how that will impact my choice. I've read several things that explain it, but I get lost in all of the terms. Can someone give me a very simplified explanation of how the CTR of an optocoupler will impact my choice of one, given the parameters of my project? (And a side question: if an optocoupler incorporates a Schmitt Trigger, is CTR even relevant? I think maybe not, because I think the Schmitt Trigger converts the output signal on the receiving side to a logical HIGH or LOW, as opposed to a variable output. But I may be wrong.) Thanks!
 
Last edited:

pmd34

Joined Feb 22, 2014
529
Hi ba58smith. Usually for switching loads, i would always opt for using a MOSFET, for simplicity an N-Channel so you would switch the ground supply:
https://www.electronics-tutorials.ws/transistor/tran57.gif
If this is undesirable, to prevent accidental starting by shorting to a grounded casing etc. you can use a P-Channel and have an N-Mosfet to then activate it from a low voltage:
https://i.stack.imgur.com/5ssj0.png
(For 3.3V switching check the "threshold voltage" of the specific N-Mosfet to ensure it is below your 3.3v logic level to make sure its well switched on. And also put a diode across the wires to the pump to prevent big back EMF spikes when you switch the motor, which can damage the FETs).

An optocoupler would help you to isolate the microcontroller from your 12 supply, should anything happen, but it wont in itself be able to switch your pump, unless you go for a big industrial module. Most optocouplers only switch 10s of mA max. I guess your CTR is referring to the current you put into the LED side of the optocoupler, to the current response at the other side of it. ie. 1:1... 1mA on the LED side gives you an output of 1mA. But as you say for this is probably only of interest if you are doing some sort of analogue control.
 

Thread Starter

ba58smith

Joined Nov 18, 2018
62
An optocoupler would help you to isolate the microcontroller from your 12 supply, should anything happen, but it wont in itself be able to switch your pump, unless you go for a big industrial module. Most optocouplers only switch 10s of mA max. I guess your CTR is referring to the current you put into the LED side of the optocoupler, to the current response at the other side of it. ie. 1:1... 1mA on the LED side gives you an output of 1mA. But as you say for this is probably only of interest if you are doing some sort of analogue control.
I'm not trying to switch the pump - I want to know when it's on or off. Sorry if my original post wasn't clear on that point.
 

Alec_t

Joined Sep 17, 2013
15,101
The CTR for an opto with an analogue output is just the ratio of the output device current to the input diode current. For example, if the diode current is 5mA and the CTR is 120% the maximum current through the output device will be 5mA x 1.2 = 6mA.
You are correct that the CTR isn't relevant for an opto with a Schmitt output stage; however, you would need to check the datasheet to see the minimum input diode current requirement to operate that stage.
Speed of response also doesn't seem critical for your application.
 

Thread Starter

ba58smith

Joined Nov 18, 2018
62
The CTR for an opto with an analogue output is just the ratio of the output device current to the input diode current. For example, if the diode current is 5mA and the CTR is 120% the maximum current through the output device will be 5mA x 1.2 = 6mA.
You are correct that the CTR isn't relevant for an opto with a Schmitt output stage; however, you would need to check the datasheet to see the minimum input diode current requirement to operate that stage.
Speed of response also doesn't seem critical for your application.
Thanks, that makes sense. The "minumum input diode current requirement to operate that stage" - I see in the Datasheet (https://www.onsemi.com/pub/Collateral/H11L3M-D.pdf) a Turn-On Current Threshold with a note: Maximum Turn-On Current Threshold is the maximum current required to trigger the output. For example, a 1.6mA maximum trigger current would require that the LED be driven at a current greater than 1.6mA to guarantee the device turns on. The maximum allowable LED drive current is 30mA."

That seems pretty clear: given my 8 - 20 V input and the voltage drop across the device's LED, I should be able to calculate a resistor that will keep me in the middle of that 1.6mA to 30mA safe zone. HOWEVER... I can't find the voltage drop across the LED (in the datasheet, I mean). In the snippet below, is it the Input Forward Voltage, in the "Emitter" section? (The use of the word "emitter" is throwing me - isn't there an emitter, along with a collector, on the Detector side of the device?) I'll assume that's it.

With (8V - 1.2V) and 10mA, the resistor should be 680 ohms.
With (8V - 1.5V) and 10mA, it should be 650.
With (20V - 1.2V) and 10mA, it should be 1880.
With (20V - 1.5V) and 10mA, it should be 1850.
The average of the low (650) and high (1880) is 1590.

Now, using 1600 ohms and every combination of 8V - 20V input, 1.2V - 1.5V LED voltage drop, the range of current through the LED is from 4.0mA to 11.75mA, well within the 1.6 - 30 safe range.

Is that how I need to calculate the resistor value?

upload_2019-2-12_14-46-11.png
 

crutschow

Joined Mar 14, 2008
38,316
"Emitter" in the case, refers to the input LED light emitter, not a transistor emitter.
Thus its forward drop is 1.2V nominal, 1.5V maximum.

So your calculations appear correct.
 

sghioto

Joined Dec 31, 2017
8,633
Is that how I need to calculate the resistor value?
Another way is to take the average voltage minus the Vf drop and divide by 10ma.
18.8v + 6.8v = 25.6v / 2 = 12.8v /.010 = 1280 ohms or a standard 1200 ohm resistor. LED current in the 5 to 15 ma range
SG
 
Last edited:
Top