User Manual

175
/
223
Lesson 26 Photocell
Overview
In this lesson, you will learn how to measure light intensity using an Analog Input.
You will build on lesson 25 and use the level of light to control the number of LEDs
to be lit.
The photocell is at the bottom of the breadboard, where the pot was above.
Component Required:
(1) x Elegoo Mega2560 R3
(1) x 830 tie-points breadboard
(8) x leds
(8) x 220 ohm resistors
(1) x 1k ohm resistor
(1) x 74hc595 IC
(1) x Photoresistor (Photocell)
(16) x M-M wires (Male to Male jumper wires)
Component Introduction
PHOTOCELL:
The photocell used is of a type called a light dependent resistor, sometimes called
an LDR. As the name suggests, these components act just like a resistor, except that
the resistance changes in response to how much light is falling on them.
This one has a resistance of about 50 kΩ in near darkness and 500 Ω in bright light.
To convert this varying value of resistance into something we can measure on an
MEGA2560 R3 board's analog input, it needs to be converted into a voltage.
The simplest way to do that is to combine it with a fixed resistor.