Master the Basics: What is a Photodiode
Share
A photodiode is the light-sensitive cousin of the LED. While LEDs convert electrical energy into light, photodiodes do the opposite: they convert light into electrical current. When light shines on a photodiode's semiconductor junction, it generates a small amount of current based on the amount of light absorbed.
Photodiode Symbol and Appearance
The schematic symbol for a photodiode is similar to an LED, but with arrows pointing toward the diode to represent incoming light. Physically, photodiodes come in various shapes and sizes—from small photo cells used in light sensors to large solar panels used in energy harvesting.
Caution: Some through-hole photodiodes look similar to LEDs. To tell them apart:
-
The longer lead is the anode.
-
The shorter lead and flat side indicate the cathode.
How Photodiodes Work
When exposed to light, photodiodes generate a current that flows from the cathode to the anode (opposite of a typical forward-biased diode). The more light it receives, the more current it produces.
You can measure this current directly with a digital multimeter set to a low current range (e.g., 20 μA). Light levels directly affect the output:
-
More light = higher current
-
Shadowed or dark = lower current
Building a Basic Photodetector Circuit
To use a photodiode in a circuit:
-
Connect it in reverse bias (cathode to +V, anode to ground) with a resistor in series.
-
As light hits the photodiode, it allows a small current to flow, creating a voltage across the resistor.
Using Ohm’s Law, the voltage drop across the resistor gives a measurable output that reflects the light level.
Arduino Demonstration
You can build a simple light detector using:
-
A photodiode
-
A 330kΩ resistor
-
A 5V Arduino Uno
Connect the circuit so the photodiode is reverse biased and the resistor goes to ground. Read the voltage across the resistor using an analog input on the Arduino.
In the Arduino sketch:
-
Read the analog voltage
-
Use an if/else statement to classify the light level as either light or dark
Example: In a bright room, you may get ~2.9V. When shadowed, the voltage drops, and your program can flag the difference.
Note: You may need to test and calibrate the voltage thresholds for your specific setup.
Photodiode vs. Photoresistor
These two components often get confused, but they operate differently:
-
Photodiode: Generates a current proportional to light
-
Photoresistor: Changes its resistance based on light
When to use each:
-
Use a photoresistor for slow-changing conditions (e.g., ambient room light)
-
Use a photodiode for fast-changing light signals (e.g., blinking LEDs)
Key Takeways
Photodiodes are fast, reliable components ideal for building simple light-detection circuits. Whether you're using a multimeter or an Arduino, they offer a straightforward way to sense and respond to light. For most beginner projects, either a photodiode or a photoresistor will get the job done—with photodiodes being better for speed, and photoresistors better for sensitivity.