I was curios about using Light Sensors in projects and I couldn't decide between these two. So I got both and I wanted to compare them against eachother.
- I thought it might be cool to add a light sensor to a project.
- Couldn't decide which one to get, so I got these two.
- So here is a way to see how they both react to the same environment.
SOFTWARE
HARDWARE
List the ready features here:
- It shows the Analog Voltage of both sensors (0-4095)
- Converts ADC to Voltage (0.0 - 3.3)
- Added a meter option as well (totally stole it)
Straight from Adafruit:
ALS-PT19
"It's a pretty simple sensor - connect - to ground, + to 2.5V-5.5V or so to power it. Now measure the analog voltage on the OUT pin. That's it! The voltage will increase when the sensor detects more light."
Photo Transistor
"To use, connect the pin connected to the 'thicker' part of the sensor (longer pin) to 3-15VDC or so, and the thinner-part (shorter) pin through a ~1K-10K series resistor to ground. When it's dark, there's almost no current flowing through the sensor or resistor and the analog voltage is near ground. When there's light near the sensor, the current through the resistor will increase, raising the voltage. You can adjust the series resistor to get the voltage range you need and measure the analog voltage with a microcontroller."
And there is a Collin's Lab video for it.
Now you should be able to see the difference between the two sensors, and be able to make a better decision for which one will work best for you.
Project is: complete
It looks like the Photo Transistor is more sensitive and more accurate for my needs. I do prefer the breakout board style of the ALS but it doesn't accurately represent the ambient light.
- Got the README template from ritaly.
- Got the Meter from Bodmer TFT_eSPI examples.