razor7877 / SpectroPi

A project about creating a cheap and simple UV-VIS spectrophotometer using a Raspberry Pi
0 stars 0 forks source link

Get a photoresistor working with the Pi #3

Closed razor7877 closed 6 months ago

razor7877 commented 7 months ago

Try and power a photoresistor using the Rasberry Pi power output pins and measure the light intensity with the GPIO pins

razor7877 commented 7 months ago

The photoresistors come from the Super Starter Kit UNI R3 Project by ELEGOO: https://www.elegoo.com/en-ca/blogs/arduino-projects/elegoo-uno-project-super-starter-kit-tutorial

razor7877 commented 7 months ago

Here is the documentation for the starter kit: https://drive.google.com/file/d/1UbLdYMcaIgeKvDwNnbeMES71M-Zrgpef/view?usp=sharing

razor7877 commented 7 months ago

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 UNO 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.

razor7877 commented 7 months ago

The setup used to try the photoresistor which doesn't work since all the GPIO pins are digital.

IMG20240306143611

The 220 ohm resistor used to limit the input voltage

IMG20240306113340

razor7877 commented 6 months ago

The idea of using a Pi to get the photoresistor working has been abandoned (see #5) and an Arduino Uno R3 will be used instead (see #6)