Skip to content
LearnTronics menu

LearnTronics

Light-Controlled Transistor Switch

Tutorial Index

Recipe #16 — light-controlled switch

This circuit combines a sensor, a voltage divider, and a transistor switch.

LIGHT-CONTROLLED TRANSISTOR SWITCH +9 V LDR R1 10 kΩ RB B C E +9 V RLIMIT LED
Bright light: the LDR resistance falls, the divider voltage rises, and the transistor can be driven on strongly enough to operate the load.

Several earlier lessons are now working together

The LDR and R1 form a voltage divider. RB limits base current. The transistor acts as the electronic switch. The LED and its resistor are the load.

Real threshold circuits often add a comparator

A single transistor can make a useful simple light switch, but the change from OFF to ON is not especially sharp. A comparator or Schmitt trigger can give a cleaner switching threshold and better noise immunity.

Try these yourself

What happens to a typical LDR resistance as light increases? LIGHT-CONTROLLED TRANSISTOR SWITCH +9 V LDR R1 10 kΩ RB B C E +9 V RLIMIT LED
A typical light-dependent resistor has lower resistance in brighter light.
What do the LDR and R1 form?
The sensor and fixed resistor divide the supply voltage according to the LDR resistance.
Why might a comparator be added to a practical sensor switch?
A comparator can change state more sharply when the sensor voltage crosses a chosen reference.