GUVA-S12SD 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 GUVA-S12SD 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 GUVA-S12S module here.
How to Calculate the 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:
GUVA-S12SD 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 GUVA-S12SD UV Sensor Module with Arduino
Step 1: Circuit
The following circuit shows how you should connect Arduino to GUVA-S12SD sensor. Connect wires accordingly.
Step 2: Code
Upload the following code to your Arduino.
/*
GUVA-S12SD-UV-Module
Made on 03 Feb 2020
by Amir Mohammad Shojaee @ Electropeak
Home
*/
void setup()
{
Serial.begin(9600);
}
void loop()
{
float sensorVoltage;
float sensorValue;
sensorValue = analogRead(A0);
sensorVoltage = sensorValue/1024*5.0;
Serial.print("sensor reading = ");
Serial.print(sensorValue);
Serial.print(" sensor voltage = ");
Serial.print(sensorVoltage);
Serial.println(" V");
delay(1000);
}
We want to display the output in volts on the Serial Monitor. So, we first save the analog input and convert its range to 0 to 5 in volts.
By bringing the camera flashlight of your mobile phone close to the sensor, the output changes in volts as shown below.