Photocells
Try measuring the resistance across the two ports as you move the slider too.- Edit below: Trying to explain more. Alright let me try to explain more, most of the answers are trying to explain the same thing but maybe this will help. To recap, you have a 5V source, and you want to vary that 5V source with a resistor. Step 1, Position the resistor with the gold or silver color band to the right.Step 2, Read the color sequence that must be decoded to determine resistance. Read the bands from left to right. The colors seen could be any of the following: black, brown, red, orange, yellow, green, blue, violet, gray and white.Step 3, Determine the coded number for the resistive value. Change the colors to numbers as follows. Change black to 0. Change brown to 1. Change red to 2. Change orange to 3.
a.k.a CdS cells, photoresistors, LDR (light dependent resistor)...What is a photocell?
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 are often referred to a CdS cells (they are made of Cadmium-Sulfide), light-dependent resistors (LDR), and photoresistors.
A Photocell is basically a resistor that changes its resistive value (in ohms) depending on how much light is shining onto the squiggly face. They are very low cost, easy to get in many sizes and specifications, but are very inaccurate. Each photocell sensor will act a little differently than the other, even if they are from the same batch. The variations can be really large, 50% or higher! For this reason, they shouldn't be used to try to determine precise light levels in lux or millicandela. Instead, you can expect to only be able to determine basic light changes
For most light-sensitive 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!
Some basic stats
These stats are for the photocell in the Adafruit shop which is very much like the PDV-P8001. Nearly all photocells will have slightly different specifications, although they all pretty much work the same. If there's a datasheet, you'll want to refer to it
- Size: Round, 5mm (0.2') diameter. (Other photocells can get up to 11mm/0.4' diameter!)
- Price$1.50 at the Adafruit shop
- Resistance range: 200K ohm (dark) to 10K ohm (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)
- Datasheet and another Datasheet
- Two application notes on using and selecting photocells where nearly all of these graphs are taken from