Photocell Hookup Guide

Pages
Contributors: jimblom
Favorited Favorite 14

Introduction

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

Mini Photocell

SEN-09088
$1.60
7

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)

Resistor Kit - 1/4W (500 total)

COM-10969
$8.95
188
Breadboard - Self-Adhesive (White)

Breadboard - Self-Adhesive (White)

PRT-12002
$5.50
48
SparkFun RedBoard - Programmed with Arduino

SparkFun RedBoard - Programmed with Arduino

DEV-13975
$21.50
50
Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)

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

PRT-11026
$2.45
20

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

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. This tutorial covers: what a voltage divider circuit looks like and how it is used in the real world.

Analog vs. Digital

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