Sensing Light Levels with a Photocell

PrintFriendly and PDF

Table of Contents

  1. Introduction
  2. Assemble the Parts
  3. Configure the Radio
  4. Wire up the Circuit
  5. Use it!

1) Introduction

Photocells are a popular component in electronics projects; they let you sense and take action based on the amount of light hitting the cell. Not only are they great for sensing the ambient light to tell if it’s day or night, but they can also be used as an interface input. That is to say, if someone waves their hand over the sensor, the shadow of the user’s hand can actuate some response. Best of all, these sensors are cheap—at about a dollar a piece, they’re a great component to keep stocked in your bins.

The resistance across the two leads of the cell varies according to the amount of light hitting the cell. The more light that hits the cell, the less the resistance is. And, of course, the less light means greater resistance. We’re going to use the XBee 802.15.4 radio’s analog-to-digital converter (ADC) to send these various light levels out into the airwaves as digital data.

Comments are closed.