Photocell Hookup Guide

Contributors: Jimb0
Favorited Favorite 7


Photocells are light-sensitive, variable resistors. As more light shines of the sensor’s head, the resistance between its two terminals decreases. They’re easy-to-use, and an essential component in projects that require ambient-light sensing.

Mini Photocell


In pitch-black conditions, the photocell’s resistance will be in the megaohm’s (1.0MΩ+) range. Shining an LED on the sensor can drop the resistance to near-zero, but usually the resistance of the photocell falls between 8-20kΩ in normal lighting conditions.

By combining the photocell with a static resistor to create a voltage divider, you can produce a variable voltage that can be read by a microcontroller’s analog-to-digital converter.

Suggested Materials

This tutorial serves as a quick primer on resistive photocells', and demonstrates how to hook them up and use them. Beyond the light sensor, the following materials are recommended:

Arduino Uno – We’ll be using the Arduino’s analog-to-digital converter to read in the variable resistance of the photocell. Any Arduino-compatible development platform – be it a RedBoard, Pro or Pro Mini – can substitute.

Resistor Kit – To turn the photocell’s variable resistance into a readable voltage, we’ll combine it with a static resistor to create a voltage divider. This resistor kit is handy for some trial-and-error testing to hone in on the most sensitive circuit possible.

Breadboard and Jumper Wires – The photocell’s legs, like any through-hole resistor, can be bent and shaped to fit. We’ll stick them and the resistor into a breadboard, then use the jumper wires to connect from breadboard to Arduino.

Resistor Kit - 1/4W (500 total)

Breadboard - Self-Adhesive (White)

Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)


127 Retired

Suggested Reading

Photocells are a great entry-level component for beginners, but there are still a few basic electronics concepts you should be familiar with. If any of these tutorial titles sound foreign to you, consider skimming through that content first.


Light is a useful tool for the electrical engineer. Understanding how light relates to electronics is a fundamental skill for many projects.

Analog to Digital Conversion

The world is analog. Use analog to digital conversion to help digital devices interpret the world.

Voltage Dividers

Turn a large voltage into a smaller one with voltage dividers.

Analog vs. Digital

This tutorial covers the concept of analog and digital signals, as they relate to electronics.