Use Raspberry pi to driver Photoresistor Luminosity sensor

Bynora

Use Raspberry pi to driver Photoresistor Luminosity sensor

Use the following diagram to connect your Photoresistor.

PWM

PWM
A couple of notes before you get started:
In order to use an analog sensor with the Raspberry Pi we must use an Analog to Digital converter. If you use CP3008 please kindly refer to diagram 1, if you use MCP3204 for this task, please kindly refer diagram 2 as above.
Make sure Raspberry Pi is powered off when connecting wires.
When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you!
Some full-size breadboards (used in diagrams below) have a powerline that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.
Step 1
Connect power from the Pi Cobbler to the Photoresistor.
Step 2
Connect the Photoresistor to ground through a 10K pull-down resistor.
Step 3
Connect the Photoresistor to the MCP3008/MCP3204.
Step 4
You’re done! You can now add the Photoresistor to your dashboard, using the MCP3008 Channel 0 to read values from the sensor.

About the Author

nora editor

You must be logged in to post a comment