# Design of output stage for CNY70 reflective sensor

I have built the following circuit for a reflective sensor:

The resistor $R_D$ has been given the value 200 $\Omega$ and the resistor $R_T$ is to be dimensioned. $V_{CC}$ is 5 V.
I have examined the datasheet and for my application the CTR for the CNY70 will be 5%, and the $I_{C,rel}$ will be about 1, when the forward current through the diode is 20 mA.
I have used the following equation to calculate a resistor value for $R_T$, so that the output voltage $V_{out}$ over $R_T$ will be close to 5 volts when the infrared light emitted by the diode is reflected and captured by the phototransistor, and close to 0 volts when the infrared light is absorbed by the surface:
$V_{out} = I_F * CTR * I_{C,rel} * R_T$
which in this case gives a resistor value of $R_T = 5 k\Omega$ when setting $V_{out} = 5$ V.
When setting up the practical circuit, the output voltage is nowhere near the 5 volts, but peaks at about 1.7 V at maximum reflection. This makes me wonder whether the equation i used is correct.
Out of curiosity, I tried using a resistor value of $R_T = 56 k\Omega$, where $V_{out} = 1.5 V$ at minimum, and $V_{out} = 5 V$ at maximum reflection, which is fine, as I am using a Schmitt Trigger to discard voltages under a certain level and amplify voltages over a certain level to 5 V's.
What is wrong with my equation? Sorry, if i left some important details out. I'm pretty new in this field. Feel free to ask further questions.

• Measure both currents (they can be derived from the voltage drop over the resistors). I'd guess the CTR is quite different.
– CL.
Commented Apr 6, 2018 at 20:16