I am trying to read values from a photoresistor. I would like to be able to read the 'level' of light, not just a binary signal. So I bought an MCP 3008 analog to digital converter, but I am running into problems.
I followed this tutorial to set up the MCP:
I am pretty sure it is set up correctly. I then plugged a photoresistor with the analog out to channel 1, the ground pin to gnd rail, and the power in to a 3.3V source. The exact model of photo resistor I used was this one:
But the results I received were problematic.
When the photoresistor was plugged in as described above with the lights on, the reading on channel 1 was the max (1023). The other channels had a bunch of noise with readings from 0-200.
When I turned off the lights or tried to cover the photoresistor, the values would only only drop to around 500 or 600 (+/- 100). When I unplugged the voltage source from the sensor, the readings plummeted to 1.
Is this normal? Is there a way I can sift through the noise?
Eventually I have to provide accurate measurements of AC current and voltage from a wire in my home (separate project) and want to get the photoresistor working before I attempt to measure current.
Thanks for the help!!!!
Below are photos of my setup and the results. NOTE: In the results photo, I plugged the photoresistor in channel 3, which is why the 3rd column is all 1023, the max value.