UV_sensor_SKU__SEN0162-DFRobot

Introduction

This UV Sensor used GUVA-S12SD chip is suitable for detecting the UV raditation in sunlight. It can be used in UV Index Monitoring, DIY project, UV-A Lamp Monitoring, Plants growing Environmental monitoring...etc. It can detect the UV wavelength of 200-370nm, fast response, linear analog voltage signal output. Small size, easy for installing. With the diagram of the world health organization UV index grading standards, you can know the UV index from the sensor directly.

Applications

Specification

Diagram

SEN0162 Connection diagram

UV index

💡Note: The Analog Value in the diagram above is calculated based on the ADC of Arduino UNO R3 (10-bit, reference voltage 5V). If using other MCUs (such as ESP32) with a different ADC reference voltage and precision, please make the corresponding conversion.

Sample Code

/*
    # This Sample code is for testing the UV Sensor .
    #Connection:
        VCC-5V
        GND-GND
        OUT-Analog pin 0
*/

void setup() {
  Serial.begin(9600);  // open serial port, set the baud rate to 9600 bps
}

void loop() {
  int sensorValue;
  int analogValue = analogRead(A0);  //connect UV sensors to Analog 0
  if (analogValue < 20) {
    sensorValue = 0;
  } else {
    sensorValue = 0.05 * analogValue - 1;
  }

  Serial.print("UV Index: ");
  if (sensorValue < 12) Serial.println(sensorValue);  //print the value to serial
  else Serial.println("11+ Warning: High Ultraviolet! Exceeded UV index range!");
  delay(1000);
}

DFshopping_car1.png Get UV Sensor (SKU:SEN0162) from DFRobot Store or DFRobot Distributor.

Turn to the Top

category: Product Manual category: DFR Series category: Module <!--Hidden Categories--!>

category: Diagram category: DFRobot