Here comes DFRobot's new Analog Ambient Light Sensor! The brand new design is much more convenient to use.This module can help you to detect the light density of your enviroment and reflect this information back via an analog voltage signal to your Arduino controller. You can set the threshold of voltage level to trigger another aspect of your project. This sensor can be applied in any project where light density is involved! For example, you can use this sensor to automatically adjust the lights in your house depending on the suns intensity.
- Supply Voltage: 3.3V to 5V
- Illumination range : 1 Lux to 6000 Lux
- Responsive time : 15us
- Interface: Analog
- Automatic screen brightness control
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
val=analogRead(0); //connect grayscale sensor to Analog 0
Serial.println(val,DEC);//print the value to serial
from machine import ADC
Open the serial port monitor, set the baud rate according to the program for 9600.The light intensity around the sensor is different, the received data is also different.The more light, the bigger the data.
|Some general Arduino Problems/FAQ/Tips
|The unit of the output from these sensors is? How can I convert it to LUX?
|Well, it is only a simple analog sensor that could show you the relationship of the light intensity (within its detect range) and voltage (0-5V). If you want to transfer the voltage to unit in LUX, then well, it requires that you have a commercial Light Intensity Meter like this that can display LUX info, then you can match the readings to the sensor's analog reading, then you could a map to describe the relationship of voltage and ambient light density.
For any question/advice/cool idea to share, please visit DFRobot Forum.
Get Gravity: Analog Ambient Light Sensor For Arduino from DFRobot Store or DFRobot Distributor.
Turn to the Top