Component guide · Intermediate · 4 min read
UV Sensor Modules

LTR390 (Adafruit, Waveshare, DFRobot, RAK12019), ML8511 GYML8511, Adafruit AS7331 UVA/UVB/UVC, UVM-30A, DFRobot UV Index, Sharp GA1AUV100WP and Grove Sunlight Sensor
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
UV sensors measure ultraviolet light from the sun or UV lamps. The LTR390 is the easiest digital choice: it reads UV and ambient light over I2C and suits UV index projects. ML8511 and UVM-30A boards give an analog voltage that rises with UV. The AS7331 separates UVA, UVB and UVC, which suits UV lamp and curing checks.
Key specs at a glance
- Digital
- LTR390 (I2C 0x53), AS7331, GA1AUV100WP, UV index modules
- Analog
- ML8511, UVM-30A, ACEBOTT UV
- Bands
- UVA and UVB on most; UVC on AS7331 and some UV index sensors
- Supply
- 3.3V (chips), 3.3-5V on most boards
- Use
- UV index, sun exposure, UV lamp checks
- Window
- Needs a UV-transparent cover outdoors
This part can carry many amps. Use wire thick enough for the current, put a fuse close to the battery, check that connectors are rated for the load and give drivers and motors room to cool. A short at these currents melts wires in seconds.
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Adafruit LTR390 UV Light Sensor – STEMMA QT/Qwiic₹755
Option 2LTR-390UV UV & Ambient Light Sensor Module – I2C Digital Output₹489
Option 3Waveshare LTR390-UV Digital Ultraviolet Sensor Module – I2C Interface, 3.3V/5V₹979
Option 4RAKwireless RAK12019 UV Light Sensor Module Lite-On LTR-390UV-01 – I2C Interface, WisBlock Compatible₹669
Option 5DFRobot Gravity LTR390 UV Sensor 280–430nm I2C UART₹974
Option 6DFRobot Gravity UV Index Sensor (240-370nm, UVA, UVB, UVC) – I2C/UART₹1,049
What the UV sensor modules (LTR390, ML8511, AS7331, UVM-30A) is
UV sensor modules such as the LTR390 (I2C) and ML8511 (analog) measure ultraviolet light to estimate UV index for weather stations and sun safety projects.
For a weather station, use an LTR390 and convert its UV count to a UV index with the factor in the data sheet or library. For a simple sunlight UV meter, an ML8511 or UVM-30A on an analog pin is enough. For germicidal or curing lamps, the AS7331 can tell UVC from UVA.
Normal glass and many plastics block UV, so put the sensor behind quartz or UV-transparent acrylic, or leave it open under a small rain shield. Never look at UVC lamps.
UV sensor modules (LTR390, ML8511, AS7331, UVM-30A) pinout
The pins on the UV sensor modules (LTR390, ML8511, AS7331, UVM-30A) and what each one does.
| Pin | Function |
|---|---|
| VIN | 3.3-5V |
| GND | Ground |
| SDA / SCL | I2C on digital modules |
| OUT | Analog output on ML8511 and UVM-30A |
| EN | Enable on ML8511 boards (tie high) |
- VIN
- 3.3-5V
- GND
- Ground
- SDA / SCL
- I2C on digital modules
- OUT
- Analog output on ML8511 and UVM-30A
- EN
- Enable on ML8511 boards (tie high)
Wiring the UV sensor modules (LTR390, ML8511, AS7331, UVM-30A)
Ordinary glass blocks most UV. Use quartz or UV-transparent plastic over the sensor.
| UV sensor modules (LTR390, ML8511, AS7331, UVM-30A) pin | Connection | Note |
|---|---|---|
| VIN | 3.3V | ESP32 3V3 |
| GND | GND | Common |
| SDA | GPIO21 | I2C |
| SCL | GPIO22 | I2C |
- VIN
- Connection:
- 3.3V
- Note:
- ESP32 3V3
- GND
- Connection:
- GND
- Note:
- Common
- SDA
- Connection:
- GPIO21
- Note:
- I2C
- SCL
- Connection:
- GPIO22
- Note:
- I2C
Example code
Uses the Adafruit LTR390 library. Switch to LTR390_MODE_ALS to read visible light instead.
#include <Wire.h>
#include <Adafruit_LTR390.h>
Adafruit_LTR390 ltr;
void setup() {
Serial.begin(115200);
Wire.begin(21, 22);
if (!ltr.begin()) {
Serial.println("LTR390 not found");
while (1) delay(10);
}
ltr.setMode(LTR390_MODE_UVS);
ltr.setGain(LTR390_GAIN_3);
ltr.setResolution(LTR390_RESOLUTION_16BIT);
}
void loop() {
if (ltr.newDataAvailable()) {
Serial.print("UV counts: ");
Serial.println(ltr.readUVS());
}
delay(500);
}Setup and tuning
connect VCC, GND, SDA and SCL; use the Adafruit LTR390 library.
read the analog voltage and map it to UV intensity.
use a UV-transparent cover; most plastics block UV.
compare with a reference UV index for best results.
face the sky with no shade.
What you need
Shop this list16 of 16 found in our store · ₹14,431
Adafruit LTR390 UV Light Sensor – STEMMA QT/Qwiic: the part this guide coversAdafruit LTR390 UV Light Sensor – STEMMA QT/Qwiic₹755
LTR-390UV UV & Ambient Light Sensor Module – I2C Digital Output: another version this guide coversLTR-390UV UV & Ambient Light Sensor Module – I2C Digital Output₹489
Waveshare LTR390-UV Digital Ultraviolet Sensor Module – I2C Interface, 3.3V/5V: another version this guide coversWaveshare LTR390-UV Digital Ultraviolet Sensor Module – I2C Interface, 3.3V/5V₹979
RAKwireless RAK12019 UV Light Sensor Module Lite-On LTR-390UV-01 – I2C Interface, WisBlock Compatible: another version this guide coversRAKwireless RAK12019 UV Light Sensor Module Lite-On LTR-390UV-01 – I2C Interface, WisBlock Compatible₹669
DFRobot Gravity LTR390 UV Sensor 280–430nm I2C UART: another version this guide coversDFRobot Gravity LTR390 UV Sensor 280–430nm I2C UART₹974
DFRobot Gravity UV Index Sensor (240-370nm, UVA, UVB, UVC) – I2C/UART: another version this guide coversDFRobot Gravity UV Index Sensor (240-370nm, UVA, UVB, UVC) – I2C/UART₹1,049
Adafruit AS7331 UV / UVA / UVB / UVC Sensor Breakout – STEMMA QT / Qwiic: another version this guide coversAdafruit AS7331 UV / UVA / UVB / UVC Sensor Breakout – STEMMA QT / Qwiic₹3,599
GYML8511 Analog UV Light Sensor Module – 280-390nm Detection, 3-5V: another version this guide coversGYML8511 Analog UV Light Sensor Module – 280-390nm Detection, 3-5V₹1,939
UVM-30A UV Ultraviolet Ray Detection Sensor Module: another version this guide coversUVM-30A UV Ultraviolet Ray Detection Sensor Module₹935
Generic UV Detection Sensor Module Ultraviolet Ray Module for Arduino – DC 3.3V-5V, 0-1V Output: another version this guide coversUV Detection Sensor Module Ultraviolet Ray Module for Arduino – DC 3.3V-5V, 0-1V Output₹429
ACEBOTT UV Sensor Module Easy-Plug – 200-370nm, 0-5V Analog Output for ESP32/Arduino: another version this guide coversACEBOTT UV Sensor Module Easy-Plug – 200-370nm, 0-5V Analog Output for ESP32/Arduino₹589
Sharp Microelectronics GA1AUV100WP UV & Ambient Light Sensor, I²C Digital Output, 16-Bit ADC, 2.2~5.5V, SMD: another version this guide coversSharp Microelectronics GA1AUV100WP UV & Ambient Light Sensor, I²C Digital Output, 16-Bit ADC, 2.2~5.5V, SMD₹139
Seeed Studio Studio Grove Sunlight Sensor – UV/Visible/IR Light Sensor Module: another version this guide coversSeeed Studio Grove Sunlight Sensor – UV/Visible/IR Light Sensor Module₹1,309Closest match, check the specs
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
Alternatives and when to choose them
- GUVA-S12SD UV sensor: simple analog UV.
- Ambient light and lux sensors: visible light.
- VEML7700 lux sensor: accurate lux.
Common mistakes to avoid
- Covering it with plastic.
- Shaded mounting.
- Expecting certified accuracy.
- Wrong analog mapping.
Frequently asked questions
Can the LTR390 give UV index?
Yes, it reports UV that you convert to UV index.
Why does my UV sensor read zero behind plastic?
Most plastics block UV; use quartz or UV-transparent covers.
Is ML8511 accurate?
Roughly. It shows UV levels for projects, not certified measurements.
Can I use it indoors?
Indoor UV is very low, so readings will be near zero.
Which sensor is easier to use?
The LTR390 is easier, because it uses I2C with a ready Adafruit library.
Parts for this guide
- ₹755View
- ₹489View
- ₹979View
RAKwireless RAK12019 UV Light Sensor Module Lite-On LTR-390UV-01 – I2C Interface, WisBlock Compatible₹669View- ₹974View
- ₹1,049View
- ₹3,599View
- ₹1,939View
- ₹935View
- ₹429View
- ₹589View
Sharp Microelectronics GA1AUV100WP UV & Ambient Light Sensor, I²C Digital Output, 16-Bit ADC, 2.2~5.5V, SMD₹139View- ₹1,309View
- ₹389View
- ₹49View
- ₹139View
Projects that use it
Put this into practice: 26 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.
