Grove UV Sensor

An analog ultraviolet radiation sensor

Hello World

Import programSeeed_Grove_UV_Sensor_Example

The Grove – UV Sensor is used for detecting the intensity of incident ultraviolet(UV) radiation. This form of electromagnetic radiation has shorter wavelengths than visible radiation. The Grove - UV Sensor is based on the sensor GUVA-S12D which has a wide spectral range of 200nm-400nm. The module outputs electrical signal which varies with the UV intensity.

Library

Import programSeeed_Grove_UV_Sensor_Example

The Grove – UV Sensor is used for detecting the intensity of incident ultraviolet(UV) radiation. This form of electromagnetic radiation has shorter wavelengths than visible radiation. The Grove - UV Sensor is based on the sensor GUVA-S12D which has a wide spectral range of 200nm-400nm. The module outputs electrical signal which varies with the UV intensity.

Datasheet

http://www.seeedstudio.com/wiki/Grove_-_UV_Sensor

Notes

Features

  • High stability
  • Good Sensitivity
  • Low power consumption
  • Schottky type photodiode sensor
  • Wide response range
  • Grove Interface

Usage

  • UV sensors are used in many different applications. Examples include pharmaceuticals, automobiles, and robotics. UV sensors are also used in the printing industry for solvent handling and dyeing processes. In addition, UV sensors are also used in the chemical industry for the production, storage, and transportation of chemicals.
  • The fact of the UV sensor work is: In sunlight, the UV index and Photocurrent are a linear relationship.

Benchmark

  • 8->10% = indoors at night
  • 10->30% = shade
  • 70% = vampire combustion threshold
  • 100% = full sunlight

Examples

Busy Wait Example

This example uses the wait() function to wait for a number of seconds between each sample.

Repository: Seeed_Grove_UV_Sensor_Example

Ticker Example

This example uses the Ticker class to set up periodic polling of the sensor and print out the value. The Ticker class works by setting up a counter in seconds, when the timer hits zero the callback function is called, in this case ticker_handler, the counter is reset, and the whole process starts again.

ticker_example.cpp

#include "mbed.h"
 
AnalogIn sensorUV(A0);
Ticker sensor_ticker;

void ticker_handler(void){ // get the value from the sensor and print it out
    float value;
    value = sensorUV;
    printf("\rUV Value = %3.2f%%",value*100);
}

int main() {
    sensor_ticker.attach(&ticker_handler, 0.1); // set up ticker_handler() to be called every 0.1 second

    while (true) {
        // do something else
    }
}

You need to log in to post a discussion