Photocell

A photocell (also light-dependent resistor, photoresistor or photoconductor) is a variable resistor whose value decreases with increasing incident light intensity. In this project, an LED is controlled by a photocell (for example: the LED could be turned on and off depending on ambient light).

Use a photocell (R1), a 1K resistor (R2), a resistor with a resistance equal to the resistance of the photocell in your normal ambient light conditions (R3), an LED, and a 220 Ohm resistor (R4). You will need a multimeter to measure the resistance of the photocell.

By omer
Created on April 9, 2009, 18:15

Category: Analog / Digital

Difficulty: kids

License:  Creative Commons Attribution-Share Alike 3.0 Unported License

Tags: analog, digital, photocell, photoresistor, photoconductor

Images

Files

Links

Comments

  1. CityEl_Fahrer # Dec. 25, 2009, 9:40 p.m.

    Hello, code is buggy, see http://fritzing.org/forum/thread/166/
  2. dermatthias # Jan. 13, 2011, 1:17 p.m.

    Code is not buggy. You just increased the threshold for the photo cell. This depends heavily on the lightning conditions on your room (and the photo cell / resistors used).
  3. csanyipal # Dec. 23, 2011, 8:57 p.m.

    Hi, the code is good but in the lines are bugs: instead of int ledPin = 2; // select the pin for the LED there must be int ledPin = 13; // select the pin for the LED because the LED is connected to the Arduino's Digital pin 13, and in the lines analogWrite(ledPin, HIGH); } else{ analogWrite(ledPin, LOW); instead of analog there must be digital digitalWrite(ledPin, HIGH); } else{ digitalWrite(ledPin, LOW); because LED pins are connected again to the Arduino's Digital pins GND and 13.

Login to post a comment...
  • Print this
© 2007 - 2011 University of Applied Sciences Potsdam