1
\$\begingroup\$

As far as I know, TM4C123 LaunchPad safely accepts voltages values up to 3.3V . I got a CNY70 reflective optical sensor and want to connect it to one of the analog input ports safely as in the attachment. (each of +5V comes from 5V AC to DC adapter)

enter image description here

The main problem is that I don't understand much from the CNY70's datasheet. (I couldn't find anything about the ON state resistance of the transistor, which could make things much easier for me)

Could you please explain what calculations should I do, or which figures should I check in the data sheet in order to calculate the X resistance value for safe operation.

P.S: Please keep in mind that, I'm quite a newbie in electronics

Thank you

\$\endgroup\$
3
\$\begingroup\$

The transistor does not behave like a resistor. It's more like a current source until Vce drops to below a volt or so. The relevant curves from the datasheet (specified with a known reflectance) are below:

enter image description here

You have about 20mA going through the LED (a bit much for my liking), so the typical CTR is about 5% (Figure 7). That means that a typical unit will pass about 1mA through the transistor. If your resistor X is high enough (more than 4K or so, typically) then the CTR will be much lower (Figure 8). The transistor will bottom out at 100mV or so. The voltage will be If * CTR/100 * Rx.

If your application does not have the 0.3mm spacing then Figure 11 comes into play- so the voltage will be If * CTR/100 * Rx * Icrel

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Did you use Fig. 3 to calculate forward voltage and current? \$\endgroup\$ – SoajanII Jul 7 '15 at 19:53
  • \$\begingroup\$ I could have, but I happen to know the Vf of an infrared LED is close enough to 1.2V at 20mA, so I didn't. \$\endgroup\$ – Spehro Pefhany Jul 7 '15 at 19:55
  • \$\begingroup\$ It's 100% safe (as in nothing will be damaged)- it might saturate or not at high reflectance, depending. There is only a typical 1mA a minimum 0.3mA and no maximum (very loose specifications). I would guess that most units are between 0.3 and 3mA under the specified conditions (0.3mm Kodak card, 20mA). \$\endgroup\$ – Spehro Pefhany Jul 7 '15 at 20:35
  • \$\begingroup\$ Edit: Accidentaly removed my question: "Is it safe to use 3K resistor for operation" \$\endgroup\$ – SoajanII Jul 7 '15 at 20:37
1
\$\begingroup\$

You shouldn't think of "on state resistance" of a bipolar transistor.

For opto couplers and similar items, such as this, you should look at the Current Transfer Ratio (CTR). This indicates how much current the transistor should pass, for a given LED current. For the CNY70, the CTR is illustrated by Fig. 5.

In the "Basic Characteristics" table, the first line indicates that the typical transistor current is 1 mA with an LED current of 20 mA, when viewing a white card.

\$\endgroup\$
  • \$\begingroup\$ Wish I could have enough reputation to upvote. Today with your help, I learned that there are photoresistors around and work quite different than bipolar transistors :) Thank you \$\endgroup\$ – SoajanII Jul 7 '15 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.