UVM30A UV Sensor Module Features
Ultraviolet (UV) light is produced by sunlight. Gradual thinning of Earth’s ozone layer has increased the amount of UV radiation which can lead to sunburn and other problems. UV radiation is a form of electromagnetic radiation with wavelength from 200 nm to 370 nm, shorter than that of visible light, but longer than X-rays.
The UVM30A UV sensor module is used for detecting the intensity of ultraviolet radiation. This module has an analog output that changes with the intensity of UV light.
Note
The primary purpose of measuring UV radiation by such modules is to prevent damage to humans.
Download the datasheet of UVM30A module here.
UVM30A UV Sensor Module Datasheet
How to calculate UV Index
As mentioned, the module has an analog output and varies approximately between 0 and 1 volt. The output voltage of this module varies in accordance with the intensity of UV light according to the following diagram.
You can see the accurate value of UV intensity according to output voltage in the image below.
Each level of UV intensity represents the causative factor. The image below shows what each level includes:
UVM30A UV Sensor Module Pinout
This module has 3 pins:
- VCC: Module power supply – 3V to 5V
- GND: Ground
- OUT (SIG): Output analog signal – varies from 0-1 V
You can see the pinout of this module here.
Required Materials
Hardware Components
Software Apps
Interfacing UVM30A UV Sensor Module with Arduino
Step 1: Circuit
The following circuit shows how you should connect Arduino to UV sensor. Connect wires accordingly.
Step 2: Code
Upload the following code to your Arduino.
/*
UVM30A-UV-Module
Made on 02 Feb 2020
by Amir Mohammad Shojaee @ Electropeak
Home
*/
void setup(){
Serial.begin(9600);
}
void loop()
{
int sensorValue;
sensorValue=analogRead(A0);
Serial.print("The voltage value:");
Serial.print(sensorValue*5000/1023.0);
Serial.println("mV");
delay(1000);
Serial.print("\n");
}
We want to display the output in millivolts on the Serial Monitor. So, we first save the analog input and convert its range to 0 to 1000 in millivolts.
By bringing the camera flashlight of your mobile phone close to the sensor, the output changes in millivolts as shown below.