The Adafruit LTR390 UV Light Sensor is a precision sensor module capable of detecting ultraviolet (UV) light and ambient light. It provides accurate UV index readings, which are essential for monitoring exposure to ultraviolet radiation. This sensor is commonly used in applications such as UV index monitoring, UV sterilization systems, environmental sensing, and wearable devices that track UV exposure.
Pin Number | Name | Description |
---|---|---|
1 | VIN | Power supply (3.3V to 5V) |
2 | GND | Ground connection |
3 | SCL | I2C clock line |
4 | SDA | I2C data line |
5 | INT | Interrupt pin (optional use) |
To use the LTR390 with an Arduino UNO, you will need to use the I2C communication protocol. Below is a sample code snippet to get started with reading UV index values from the sensor.
#include <Wire.h>
#include <Adafruit_LTR390.h>
Adafruit_LTR390 uv = Adafruit_LTR390();
void setup() {
Serial.begin(9600);
// Initialize the sensor
if (!uv.begin()) {
Serial.println("Couldn't find LTR390 sensor!");
while (1);
}
Serial.println("Found LTR390 sensor");
}
void loop() {
// Perform a UV reading
uint32_t uv_index = uv.readUVS();
Serial.print("UV Index: ");
Serial.println(uv_index);
delay(1000); // Wait for 1 second before the next reading
}
Q: Can the sensor measure visible light? A: Yes, the LTR390 can measure both UV and ambient light.
Q: What is the range of UV index values the sensor can measure? A: The sensor can measure UV index values from 0 to 11+.
Q: Is the sensor waterproof? A: No, the LTR390 is not waterproof. Protect it from moisture and water exposure.
Q: How do I calibrate the sensor? A: Calibration involves comparing the sensor readings to a known light source or a reference sensor. Adafruit provides a detailed guide on calibration procedures.
For further assistance, consult the Adafruit LTR390 datasheet and the Adafruit support forums.