Application Circuits for the Phototransistor Switch Application Bulletin 213 General Description Phototransistors circuits may be adjusted for a selected sensitivity range and often do not require additional amplification. They can be applied in two modes, Active or Switch mode. “Switch mode”: means the phototransistor will either be “off” or “on” for a digital logic response to the object sensed. “Active mode”: means the phototransistor generates an output response based on the light or irradiance level. IC(on) will be proportional to the coupled light intensity. The examples in this bulletin apply to reflective and slotted OPB switches as well as Optek discrete IRLED and Phototransistor pairs, when also applied in object sensing applications. Circuits are designed for the “Switch Mode” and based on typical product performance and application conditions. Each application design should be evaluated for adjustments to these circuit values in order to optimize the performance of the optical sensor. Application variables will include: aperture size, reflective surfaces and blocking material, sensing distance, etc… For “Active Mode” operation adjust the load resistance by decreasing the value of R2 based on application experiments. This value will typically be less than 5KΩ. Figure 1: The common-emitter circuit LED Off/Blocked = Output High Figure 2: The common-collector circuit LED On/Unblocked = Output High Conditions IF = 20mA, VF = 1.5V & VCE = 0.3V (typical) Basic Interface Circuits for CMOS The common-emitter circuit will generate an output signal which transitions from high to low high when the phototransistor detects light or infrared radiation. This is commonly referred to as an “inverting logic condition”. The common-collector circuit will generate an output signal which transitions from low to high when the phototransistor detects light or infrared radiation. This is commonly referred to as a “noninverting logic condition”. These two circuit examples are compatible with all CMOS logic in the 3.3V to 15V versions. Collector circuit current (IC) is limited to approximately 0.5mA. If optical signal levels are very low, increase the load resistance R2. OPTEK Technology - 1645 Wallace Drive, Carrollton, TX 75006 Phone: (800) 341-4747 Fax: (972) 323-2396 [email protected] Example for VCC = 5 volts For VCC = 15 volts R1 ~ 675 and R2 ~ 29K For best compatibility with CMOS, a condition of phototransistor saturation is best. When fast switch response times are needed or direct TTL compatibility is required, consider the addition of a buffer as shown in figures 3 through 6. www.optekinc.com Issue 1.1 Dec 2004 Page 1 of 3 Application Circuits for the Phototransistor Switch Application Bulletin 213 Interface Circuits for TTL or Hardware Drivers The transistor buffer is a cost effective choice in single-sensor applications where logic buffers and gates may not be available packaged singly. More versatile, this circuit can provide optimum noise immunity, faster switching speeds, or directly drive low current mechanical relays if using a 2N2219 or equivalent for Q1. R3 can be 1K to support 1.6mA TTL sink current. R4 will typically be about 50KΩ. Figure 4: Adding a Buffer IC to Figure 1 or 2 The schmitt trigger inverter (SN7414 or equal) provides hysteresis and helps to stabilize the logic signal when sensing marginal photocurrent levels or slow mechanical transitions. Complete saturation of the phototransistor is not necessary, however, adjustments to R2 may be required if sensor is too sensitive or affected by ambient light interference. Connect Vout direct to TTL, or R3 may be a substituted for a relay input. Figure 5: Adding a Schmitt Trigger Inverter IC to Figure 1 or 2 The voltage comparator interface (LM339, or equal) features a voltage reference that may be used to set a threshold level: R2 should be equal to Vref / IC(on). Figure 3: Adding a transistor buffer stage Conditions IF = 20mA, and VF = 1.5V (typical) VCEsat = 0.3V (typical) Figure 6: Adding a Voltage Comparator to Figure 2. Select R2 = Vref / IC(on) Example for VCC = 5 volts Conclusion R2 ~ 5K to 10K R3 = 1K R4 ~ 50K Q1 is a PN2222A or 2N2219 type. The logic buffer (SN74S00 or equivalent) is a popular interface option and provides fast switching and good signal conditioning. Refer to Figure 4. Environmental effects, such as temperature and contamination, for example, must be taken into consideration when evaluating the circuit design. Also aging effects may account for up to 25% reduction in LED efficiency when operated at these suggested levels. Please consult the Optek product specification for the applied product before choosing or finalizing a circuit design. Optek reserves the right to make changes at any time in order to improve design and to supply the best product possible. All information is subject to Optek’s own data and considered accurate at time of print. OPTEK Technology - 1645 Wallace Drive, Carrollton, TX 75006 Phone: (800) 341-4747 Fax: (972) 323-2396 [email protected] www.optekinc.com A subsidiary of TT electronics plc Issue 1.1 Dec 2004 Page 2 of 3