A phototransistor is a light-sensitive bipolar junction transistor (BJT) that converts optical energy into electrical current. Unlike a standard BJT driven by base current, a phototransistor uses photons striking the base-collector junction to generate electron-hole pairs, effectively acting as the base drive. For 90% of hobbyist and industrial optical sensing tasks—like encoders, object detection, and IR receivers—the safe default part numbers are the Vishay TEFT4300 (high sensitivity, 940nm IR) and the Everlight PT334-6C (cost-effective, 940nm IR). If you need visible light detection, the Lite-On LTR-3208E is your go-to.
Symbol, Pinout, and Safe Default Part Numbers
The schematic symbol for an NPN phototransistor is identical to a standard NPN BJT, but the base lead is usually omitted and replaced with two inward-pointing arrows indicating incoming light. In a standard 5mm (T-1 3/4) epoxy package, the physical pinout is straightforward: the longer lead is the Emitter and the shorter lead is the Collector. The base is optically coupled directly to the silicon die; there is no physical base pin on standard plastic packages, though metal-can TO-18 variants (like the Vishay BPW85B) sometimes expose the base for electrical biasing or dark-current compensation.
| Part Number | Peak Wavelength | V_CEO (Max) | I_C (Max) | Package / Notes |
|---|---|---|---|---|
| Vishay TEFT4300 | 940 nm (IR) | 70 V | 50 mA | 5mm T-1 3/4, High Gain |
| Everlight PT334-6C | 940 nm (IR) | 30 V | 20 mA | 5mm T-1 3/4, Budget |
| Lite-On LTR-3208E | 940 nm (IR) | 30 V | 50 mA | 3mm T-1, Compact |
| Vishay BPW85B | 900 nm (IR) | 70 V | 50 mA | TO-18 Metal Can, Exposed Base |
For a deeper dive into manufacturer specifications, the Vishay Semiconductors Phototransistor Portfolio provides comprehensive datasheets detailing spectral response and angular sensitivity.
Biasing and Operation Regions
To use a phototransistor as a sensor, you must bias it in a common-emitter configuration. The emitter is tied to ground, and a load (pull-up) resistor connects the collector to your logic voltage (e.g., 5V or 3.3V). The value of this pull-up resistor dictates whether the device operates in the active (linear) region or the saturation (digital switching) region. A higher resistance (e.g., 100kΩ) increases sensitivity and pushes the device into saturation quickly, acting as a digital switch. A lower resistance (e.g., 1kΩ) keeps it in the active region, allowing you to measure relative light intensity, but requires more illumination to register a voltage change.
| Region | Light Condition | Typical V_CE | Typical I_C | Circuit Behavior |
|---|---|---|---|---|
| Cutoff | Total Darkness | ~5.0 V | < 1 µA (Dark Current) | Output pulled HIGH via resistor |
| Active (Linear) | Moderate / Ambient | 0.7 V to 4.5 V | 0.05 mA to 0.4 mA | Output voltage scales with light |
| Saturation | Direct / Intense Beam | < 0.2 V (V_CE(sat)) | > 0.5 mA | Output pulled LOW (near GND) |
Note on Dark Current: Even in total darkness, a tiny leakage current ($I_{CEO}$) flows. This dark current roughly doubles for every 10°C rise in ambient temperature. If your circuit operates in a hot enclosure, you may need to lower the pull-up resistor value to prevent thermal noise from falsely triggering a logic LOW.
Complete Application Circuit: 5V Digital Pulse Counter
Raw phototransistor outputs are analog and susceptible to slow edge transitions when a physical object slowly breaks the light beam. To interface this reliably with a microcontroller (like an Arduino or ESP32) for RPM counting or optical encoding, we use a comparator to square off the signal. The LM393 dual comparator is the industry standard for this task due to its low cost and open-collector outputs.
Bill of Materials:
- 1x Vishay TEFT4300 Phototransistor (PT1)
- 1x 940nm IR LED (e.g., Vishay TSAL6200) with a 150Ω current-limiting resistor
- 1x LM393 Dual Comparator IC
- 2x 10kΩ resistors (R1, R2 for voltage divider)
- 1x 10kΩ resistor (R3, phototransistor pull-up)
- 1x 10kΩ resistor (R4, LM393 output pull-up)
- 1x 100nF ceramic capacitor (C1, noise filtering)
- Emitter Setup: Connect the Emitter (short lead) of PT1 directly to system GND.
- Collector Pull-up: Connect the Collector (long lead) of PT1 to one end of R3 (10kΩ). Connect the other end of R3 to 5V VCC.
- High-Frequency Filtering: Solder C1 (100nF) in parallel with R3. This creates a low-pass filter that suppresses EMI from nearby motors, though it will slightly round the rising edge of your pulse. For high-speed encoders (>10kHz), omit C1.
- Reference Voltage: Wire R1 (10kΩ) from 5V to LM393 Pin 3 (IN+). Wire R2 (10kΩ) from Pin 3 to GND. This creates a rigid 2.5V reference threshold.
- Comparator Input: Route the junction of PT1 Collector and R3 to LM393 Pin 2 (IN-).
- Comparator Output: Connect LM393 Pin 1 (OUT) to your microcontroller GPIO. Wire R4 (10kΩ) from Pin 1 to 5V VCC to pull the open-collector output HIGH.
Failure Modes and Multimeter Diagnostics
Phototransistors rarely fail catastrophically unless subjected to overvoltage or physical trauma. When they do fail, it typically manifests in three ways:
- Epoxy Degradation: The clear or black epoxy lens yellows or micro-cracks over years of UV/heat exposure, physically blocking IR light and causing a 'dead' sensor.
- Bond Wire Fatigue: Thermal cycling causes the microscopic wire bond connecting the silicon die to the leadframe to snap, resulting in a permanent open circuit.
- Dark Current Thermal Runaway: Operating near the maximum $V_{CEO}$ in a high-temperature environment causes leakage current to spike, generating internal heat that further increases leakage until the junction breaks down.
How to Test with a Digital Multimeter (DMM):
According to standard diagnostic procedures outlined by Electronics Tutorials, you can verify a phototransistor's health without desoldering it completely, provided it is isolated from parallel low-impedance paths.
- Diode Mode Test (Dark): Set your DMM to Diode Test mode. Place the Red probe on the Collector and the Black probe on the Emitter. Cover the sensor with your finger to block all light. The meter should read 'OL' (Open Loop) or a very high voltage drop (>2.5V), confirming the junction is reverse-biased and not shorted.
- Diode Mode Test (Illuminated): Keep the probes in place. Shine a bright flashlight or an IR remote control directly at the lens. The voltage drop on the DMM should plummet (often down to 0.4V - 1.2V) as the light generates base current and turns the transistor on. If it stays 'OL', the device is dead or opaque to your light source.
- The hFE Socket Trick: For a more quantitative test, set your DMM to the hFE (transistor gain) setting. Plug the Collector and Emitter into the 'NPN' socket on your meter (ignore the Base holes). In the dark, the reading should be near 0. Shine a light on it; a healthy TEFT4300 will easily push the hFE reading into the 300-800 range, proving optical gain is intact.
Phototransistor vs. Photodiode vs. LDR
Choosing the right optical sensor depends entirely on your speed, sensitivity, and linearity requirements. Here is how the phototransistor stacks up against its alternatives for bench and industrial applications.
| Criteria | Phototransistor | Photodiode (e.g., BPW34) | LDR / Photoresistor |
|---|---|---|---|
| Internal Gain | High (100x to 1000x) | None (1:1) | N/A (Resistive) |
| Response Speed | Slow to Medium (µs range) | Extremely Fast (ns range) | Very Slow (10s of ms) |
| Linearity | Poor (Highly non-linear) | Excellent (Strictly linear) | Poor (Logarithmic) |
| Best Application | Object detection, encoders, IR remotes | Fiber optics, precision light metering | Streetlights, ambient night-lights |
| Typical Cost | $0.10 - $0.30 | $0.50 - $2.00 | $0.05 - $0.15 |
Choose a Phototransistor when: You need a robust, high-gain digital switch to detect the presence or absence of an object (like a limit switch or slot encoder) without needing an expensive transimpedance amplifier.
Choose a Photodiode when: You are building a scientific instrument, a lux meter, or a high-speed fiber optic receiver where microsecond response times and strict linear correlation between photon flux and output current are mandatory.






