Photo Cell Sensor

From LinkSprite Playgound
Revision as of 06:02, 13 December 2012 by Katherine.d (talk | contribs) (Usage)
Jump to: navigation, search

Introduction

Photocells are sensors that allow you to detect light. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they often appear in toys, gadgets and appliances. They are often referred to as CdS cells (they are made of Cadmium-Sulfide), light-dependent resistors (LDR), and photoresistors.

Photo cell.jpg

For most light-sentsitive applications like "is it light or dark out", "is there something in front of the sensor (that would block light)", "is there something interrupting a laser beam" (break-beam sensors), or "which of multiple sensors has the most light hitting it", photocells can be a good choice!

Photo cell-01.gif

Features

  • 2.54mm general interface
  • Wide supply voltage range: 3V–30V
  • 2.0cm x 2.0cm module
  • Application fields widely

Schematic

Specifications

  • Size: Round, 5mm (0.2") diameter. (Other photocells can get up to 12mm/0.4" diameter!)
  • Resistance range: 200KΩ (dark) to 10KΩ (10 lux brightness)
  • Sensitivity range: CdS cells respond to light between 400nm (violet) and 600nm (orange) wavelengths, peaking at about 520nm (green).
  • Power supply: pretty much anything up to 100V, uses less than 1mA of current on average (depends on power supply voltage)

Measuring Light

As we've said, a photocell's resistance changes as the face is exposed to more light. When its dark, the sensor looks like an large resistor up to 10MΩ, as the light level increases, the resistance goes down. This graph indicates approximately the resistance of the sensor at different light levels. Remember each photocell will be a little different so use this as a guide only

Graph.gif

Note that the graph is not linear, its a log-log graph!

Photocells, particularly the common CdS cells that you're likely to find, are not sensitive to all light. In particular they tend to be sensitive to light between 700nm (red) and 500nm (green) light.

Cdsspectreturn.gif

Usage

Connecting a Photocell

Because photocells are basically resistors, they are non-polarized. That means you can connect them up 'either way' and they'll work just fine!

Installation.jpg

Photocells are pretty hardy, you can easily solder to them, clip the leads, plug them into breadboards, use alligator clips, etc. The only care you should take is to avoid bending the leads right at the epoxied sensor, as they could break off if flexed too often.

Installation02.jpg

Using a Photocell

Analog Voltage Reading Method

The easiest way to measure a resistive sensor is to connect one end to Power and the other to a pull-down resistor to ground. Then the point between the fixed pulldown resistor and the variable photocell resistor is connected to the analog input of a microcontroller such as an Arduino (shown)

Anasch.gif

Pulldowndiag.gif

For this example I'm showing it with a 5V supply but note that you can use this with a 3.3v supply just as easily. In this configuration the analog voltage reading ranges from 0V (ground) to about 5V (or about the same as the power supply voltage).

The way this works is that as the resistance of the photocell decreases, the total resistance of the photocell and the pulldown resistor decreases from over 600KΩ to 10KΩ. That means that the current flowing through both resistors increases which in turn causes the voltage across the fixed 10KΩ resistor to increase. Its quite a trick!