EasyManua.ls Logo

Elego 37 SENSOR KIT - Page 69

Default Icon
137 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Http://www.elego.cc
69 / 137
analog input, it need to be converted into a voltage.
The simplest way to do that is to combine it with a fixed resistor.
The resistor and photocell together behave rather like a pot. When the light is very bright,
then the resistance of the photocell is very low compared with the fixed value resistor, and
so it is as if the pot were turned to maximum.
When the photocell is in dull light the resistance becomes greater than the fixed 1kΩ resistor
and it is as if the pot were being turned towards GND.
Load up the sketch given in the next section and try covering the photocell with your finger,
and holding it near a light source.
Connection
Schematic