How to make a Light Sensor Circuit using a Photoresistor and a Raspberry Pi

Flopperam
Flopperam
20.8 هزار بار بازدید - 5 سال پیش - In this video, we go
In this video, we go over how to calculate how long it takes to charge a capacitor in a circuit containing a variable resistance resistor. The resistor being used is a photoresistor, so depending on how much light is present, the resistance changes. When light is present, the resistance is lower, making it faster to charge the capacitor. When light is not present, the resistance is higher, making it slower to charge the capacitor. We use the Raspberry Pi to constantly read voltage values to determine how long it takes to charge the capacitor. Since the Pi does not have any analog pins, we can not read the resistance from the photoresistor directly without a Analog-to-Digital converter.

Link to the wiring: https://raw.githubusercontent.com/chr...
Link to the python script used: https://github.com/chris-gong/forty-y...

Materials used in this video:
Raspberry Pi 4 Board Only: https://www.amazon.com/dp/B07TC2BK1X/
Photoresistors: https://www.amazon.com/dp/B01N7V536K/
Breadboards: https://www.amazon.com/dp/B07DL13RZH/
Breadboard Jumper Wires: https://www.amazon.com/dp/B07GD2BWPY/
Capacitors: https://www.amazon.com/dp/B01MSQOX0Q/
Red Dot Laser Head/Diode: https://www.amazon.com/dp/B071FT9HSV/
Battery Pack/Holder: https://www.amazon.com/dp/B07BNMKNQX/
Soldering Iron Kit: https://www.amazon.com/dp/B07S61WT16/
Helping Hand for Soldering: https://www.amazon.com/dp/B002PIA6Z4/

How to support the channel:
Get a shirt or sweatshirt with free shipping (Use code "SHIP" at checkout): https://teespring.com/stores/flopperam
Become a member: @flopperam
Support us on Patreon: Patreon: flopperam
Donate to our PayPal: https://www.paypal.me/flopperam
Sponsor us on Github: https://github.com/sponsors/chris-gong

Social media links:
Discord: Discord: discord
Twitter: Twitter: Flopperam
Instagram: Instagram: flopperam
Facebook: Facebook: flopperam

**** MATERIALS USED ****
Raspberry Pi Model 3 B+: https://www.amazon.com/dp/B07BDR5PDW/
Breadboard: https://www.amazon.com/dp/B07DL13RZH/
Photoresistor: https://www.amazon.com/dp/B01N7V536K/
1 uF Capacitor: https://www.amazon.com/dp/B074LZWRV5/
Jumper Wires: https://www.amazon.com/dp/B07GD2BWPY/
Laser diode/pointer: https://www.amazon.com/dp/B07WFMYNG3/
Battery Holder: https://www.amazon.com/dp/B07BNMKNQX/

Music Creds
Song: LAKEY INSPIRED - Chill Day (Vlog No Copyright Music)
Music provided by Vlog No Copyright Music.
Video Link: LAKEY INSPIRED - Chill Day (Vlog No C...

0:00 What a photoresistor is
1:11 Wiring setup
2:16 Writing a Python program
6:21 Running the code

#raspberrypi #photoresistor #lightsensor
5 سال پیش در تاریخ 1398/06/31 منتشر شده است.
20,877 بـار بازدید شده
... بیشتر