[3] the standard phototransistor symbol
[3] the standard phototransistor symbol
[1] a standard phototransistor
[2] A phototransistor is a light-sensitive transistors that works like a standard BJT, but IO using base current, it uses incident light to control current flow between its collector and emitter terminals.
The magnitude of collector-emitter current it passes depends on the light intensity its base receives. Thus it can be used as solid-state light sensor with built-in current gain, Beta (β) producing a much larger output current (milliamps) than a photodiode (microamps) for the same amount of light intensity.
etm: "photo-" (Gr.) = light
[1] Similarly, a photodiode is a semiconductor converting light into electricity. It absorbs incoming light particles (photons), creating free electrons and holes, creating electric current. The current's magnitude matches the light brightness.
[1] Like a regular BJT, a phototransistor consists of 2 PN-junctions and 3 terminals; the emitter, base, and collector.
But the phototransistor can also be a photodiode whose output photo-current is fed directly to the base of a regular small signal transistor, making phototransistors much more sensitive to variations in light intensity than photodiodes, but respond slower to such changes."
While a photodiode's output signal can always be amplified via an op-amp or other circuits, it's often more practical and cost effective to use 1 phototransistors for light detection.
Also, phototransistor can pass emitter currents of up to a few milliamps compared to the microamps of a photodiode, making them easier to interface to than photodiodes.
[1]
Other types [1] Phototransistors can be used as optical switches in optocoupler devices to electrically isolate the output phototransistor switch from the input single being generated by the LED. The transmissive sensor detects an object or rotating slotted or coded disk that blocks the light passing through the gap between the LED and phototransistor of the optical switch.
An optical sensor uses a phototransistor alongside a photoemitter/LED that's constantly on, often powered by a 5 V supply with a slotted rotating optical disk.
The transistor is often NPN type with a IR light-sensitive base.
When the beam of IR light from the photemitter goes through one of the holes of the disk, the transistor's base receive the IR light, generating current at the terminal
The emitter emits IR light to the transistor's base.
Without IR light hitting the transistor's base, if it's instead physically blocked by the spaces between the holes, no base current generates. With the transistor off, as an open circuit, no current flows from the collector through the emitter to ground. A pull-up 10 k resistor is often used to the collector, as an open-collector output, is connected with a 5 V supply in between. Without current flow, no voltage drop (often of 1.7 V) is across the resistor and the collector pin stays pulled up to 5V.
This is also when the transistor's CE junction becomes in high impedance state.
An IR reflective sensor is a type of optical sensor that also uses a phototransistor alongside a photoemitter/LED to send IR light, but sends it to detect objects by bouncing the light back to the phototransistor.
If the IR light hits a white surface, the light is able to reflect back, generating current at the transistor's base, turning on the transistor as a closed switch.
If the IR light hits a darker or black surface, the light is instead absorbed by the surface and little of it will reflect back, thus no current is received at the base, keeping the transistor off as an open switch.
[Q1]
In this circuit, the reflective sensor has its emitter powered by a supply through a 390 Ω and the detector through a pull up 10 kΩ resistor with the input of a LM324 op-amp's inverting input in between it.
White surface in contact When the IR light hits a white surface, current is drawn to the receiver's base, sinking current to ground and pulls the collector voltage down to near 0 V. This makes the inverting pin's voltage to be lower (near 0 V) than the non-inverting (Vin+>Vin-), causing the op-amp to output 5 V via the pull-up resistor.
The LM324 already can already a output voltage of 3.3-3.8 V, but needs a 5 V supply through a pull-up resistor of 10 kΩ to boost the voltage to 5 V. That's unlike the LM339 op-amp, which uses an open-collector output to output 5 V if Vin+>Vin-, not because its output voltage isn't enough, but because, if Vin+>Vin-, it can't output voltage at all if its output is in high impedance state by opening its internal switch, thus needing a 5 V supply through a pull resistor connected.
LM324's internal output circuit The LM324 uses an internal push-pull output stage, comprised of 2 transistors connected vertically.
The top transistor acts as the high side by being connected between its own supply and to the output. Its purpose is to output~ 3 V if Vin+>Vin-.
The bottom transistor acts as the low side by being between connected to ground and the output. Its purpose to sink current to ground if Vin+<Vin-.
Black surface in contact If the IR light hits a black surface, little current reflects black by being absorbed by the surface, keeping the transistor off and allowing current from the supply of the transistor to flow to the inverting input of the LM324. This makes the inverting input as higher than the non-inverting, causing the LM324 to output 0 V by sinking to ground via its internal circuit.
[Q1]