The Ambient Light Sensor (DFRobot SEN0390) is a device designed to measure the intensity of ambient light in the environment. It provides an analog output proportional to the light level, making it ideal for applications requiring automatic brightness adjustment. This sensor is commonly used in automatic lighting systems, display backlighting, and energy-saving devices to optimize performance based on surrounding light conditions.
The following table outlines the key technical details of the DFRobot SEN0390 Ambient Light Sensor:
Parameter | Value |
---|---|
Manufacturer | DFRobot |
Part ID | SEN0390 |
Operating Voltage | 3.3V to 5V |
Output Type | Analog Voltage |
Light Intensity Range | 0 to 100,000 lux |
Response Time | < 15ms |
Operating Temperature | -40°C to +85°C |
Dimensions | 22mm x 30mm |
The DFRobot SEN0390 has a simple 3-pin interface. The pinout is as follows:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V to 5V) |
2 | GND | Ground connection |
3 | OUT | Analog output voltage proportional to light intensity |
VCC
pin to a 3.3V or 5V power source, depending on your system's requirements.GND
pin to the ground of your circuit.OUT
pin to an analog input pin of your microcontroller (e.g., Arduino).Below is an example of how to connect the SEN0390 to an Arduino UNO:
VCC
→ 5V
pin on ArduinoGND
→ GND
pin on ArduinoOUT
→ A0
(analog input pin) on ArduinoThe following code reads the analog output of the sensor and converts it into a light intensity value in lux:
// Define the analog pin connected to the sensor's OUT pin
const int sensorPin = A0;
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage (5V system)
// Convert voltage to light intensity (lux)
// Note: The conversion factor depends on the sensor's characteristics
float lightIntensity = voltage * 20000; // Example conversion factor
// Print the light intensity to the Serial Monitor
Serial.print("Light Intensity: ");
Serial.print(lightIntensity);
Serial.println(" lux");
delay(500); // Wait for 500ms before the next reading
}
No Output or Incorrect Readings:
Fluctuating Readings:
VCC
and GND
to stabilize the power supply.Output Stuck at Maximum or Minimum:
Q1: Can this sensor be used outdoors?
A1: Yes, the SEN0390 can operate in a wide temperature range (-40°C to +85°C). However, it should be protected from direct exposure to water or extreme sunlight for prolonged periods.
Q2: How do I calibrate the sensor for accurate lux readings?
A2: Calibration involves comparing the sensor's output with a reference lux meter under controlled lighting conditions. Adjust the conversion factor in your code accordingly.
Q3: Can I use this sensor with a 3.3V microcontroller?
A3: Yes, the SEN0390 is compatible with both 3.3V and 5V systems. Ensure the VCC
pin is connected to the appropriate voltage source.
By following this documentation, you can effectively integrate the DFRobot SEN0390 Ambient Light Sensor into your projects for reliable light intensity measurements.