Working Principle
The ML8511 from LAPIS Semiconductor (Rohm) is a UV-A/UV-B photodiode sensor with a built-in amplifier that outputs an analog voltage proportional to the UV light intensity (280–390 nm). The internal photodiode has a spectral response tuned to the UV region, and the on-chip amplifier provides a linear voltage output from ~1.0 V (no UV) to ~2.8 V (strong UV, ~15 mW/cm²).
UV intensity is commonly expressed as a UV Index (0–11+), which is a standardised measure of the erythema-weighted UV irradiance. The ML8511 output can be mapped to approximate UV Index for health-related applications (sunburn risk assessment).
Electrical Characteristics
| Parameter | Value |
|---|---|
| Spectral Range | 280–390 nm (UV-A + UV-B) |
| Output Voltage | ~1.0 V (no UV) to ~2.8 V (15 mW/cm²) |
| Peak Sensitivity | ~365 nm (UV-A) |
| Supply Voltage | 2.7–3.6 V |
| Current Draw | ~300 µA active, ~0.1 µA standby |
| Output | Analog voltage (linear with UV intensity) |
| Response Time | <0.5 seconds |
| Enable Pin | Active HIGH (pulls low for shutdown) |
Interfacing with an MCU
Connect VCC (3.3 V), GND, EN (enable, tie to 3.3 V for always-on or control via GPIO), and OUT to an ADC pin. For best accuracy, use the 3.3 V rail as your ADC reference voltage. The SparkFun ML8511 breakout provides a 3.3 V reference pin for ratiometric measurements.
Calibration
- Two-point mapping: At ~1.0 V output = 0 mW/cm²; at ~2.2 V = ~10 mW/cm². Interpolate linearly between these points
- UV Index conversion: UV Index ≈ UV intensity (mW/cm²) / 0.25 (approximate, varies by weighting standard)
- Cross-reference: Compare readings against a calibrated UV meter or weather service UV Index for your location
Code Example
/*
* ML8511 UV Index Sensor — Arduino (3.3V board or level-shifted)
* SparkFun breakout: OUT → A0, 3V3 ref → A1, EN → 3.3V
*/
#define UV_PIN A0
#define REF_PIN A1 /* 3.3V reference for ratiometric reading */
float readUV() {
int uvRaw = analogRead(UV_PIN);
int refRaw = analogRead(REF_PIN);
/* Ratiometric conversion */
float voltage = 3.3 * (float)uvRaw / (float)refRaw;
return voltage;
}
float uvToIndex(float voltage) {
/* Linear mapping: 1.0V = 0 mW/cm², 2.2V = 10 mW/cm² */
float intensity = max(0.0, (voltage - 1.0) / (2.2 - 1.0) * 10.0);
float uvIndex = intensity / 0.25; /* Approximate UV Index */
return uvIndex;
}
void setup() {
Serial.begin(9600);
Serial.println("ML8511 UV Sensor Ready");
}
void loop() {
float uv = readUV();
float idx = uvToIndex(uv);
Serial.print("UV Voltage: ");
Serial.print(uv, 2);
Serial.print(" V UV Index: ");
Serial.print(idx, 1);
if (idx < 3) Serial.println(" (Low)");
else if (idx < 6) Serial.println(" (Moderate)");
else if (idx < 8) Serial.println(" (High)");
else if (idx < 11) Serial.println(" (Very High)");
else Serial.println(" (EXTREME)");
delay(2000);
}
Real-World Applications
UV Exposure Monitoring, Sunscreen Alerts & UV Curing
ML8511 sensors are used in personal UV dosimeters (sunburn prevention wearables), weather stations, UV curing lamp intensity monitoring (3D printing, nail salons), agricultural UV exposure tracking, water purification UV lamp monitoring, and smartphone UV accessories. The simple analog-out interface makes it easy to add UV sensing to any project.
Limitations
- Approximate UV Index: Not calibrated to the CIE erythema action spectrum; UV Index is approximate.
- No UV-C: Spectral response cuts off below 280 nm; cannot measure UV-C (germicidal wavelengths).
- Temperature drift: Output voltage drifts slightly with temperature; compensate for precision applications.
- Indoor limitation: UV levels indoors are very low; sensor is primarily for outdoor use.