Grove UV Sensor

Im using the UV sensor from Grove, data here:

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

In this document the Grove states that:

"wide spectral range of 200nm-400nm. The module outputs electrical signal which varies with the UV intensity, which gives your suggestion if it is a good idea to beach today​"

So basically the sensor returns mV which using this equation:

illumination intensity = 307 * Vsig

can be converted to illumination intensity in mW/m2. The Grove goes on to reference the EPA UV Index measurement which can be 'roughly estimated' using this conversion:

UV Index = illumination intensity / 200

But what I am getting is, for example, 500 on average with occasional peaks of 1,500 for UVIndex according to this sketch:

void setup(){
 
  Serial.begin(9600);
}
 
void loop(){  
  int sensorValue;
  long  sum=0;
  for(int i=0;i<1024;i++)
   {  
      sensorValue=analogRead(A0);
      sum=sensorValue+sum;
      delay(2);
   }   
 sum = sum >> 10;
 Serial.print("The voltage value:");
 Serial.print(sum*4980.0/1023.0); // This gives mV according to Grove
 Serial.println("mV");
 delay(20);
 Serial.print("\n");
 
 delay(20);

 Serial.print("UVIndex is: ");
 uvindex = (307*(sum*4980.0/1023.0))/200; // This would be the equivalent UVIndex
 Serial.println(uvindex);
 Serial.print("\n");
}

It seems way off (values of 500 for uvindex) versus the 0-11+ scale the EPA uses even though it is referenced in the document. Has anyone worked with this sensor?

Hi,
Have you sat down with a calculator and used it to do the program calcs?

Tom.... :slight_smile:

Here is a simple script I am using with this sensor to translate the digital signal back to the voltage and from there to calculate illumination in mW/m2
in a sunny day in may (Toronto) I am getting 250 mW, according to the wiki corresponds to about UVI of 1 (the official reading for Toronto for UVI is 2).

//seeedstudio grove uv sensor (240 nm - 340nm).
// the script converts the digital input to milivolts and then to illumination in mW/m2

int val=0;

void setup(){

Serial.begin(9600);
}

void loop()
{

int val=analogRead(0); //reading the digital signal 0-1023
float mvolts = val4.9; // 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit
float illum = mvolts/1000
307; //illumination intensity unit: mW/m2 for the combination strength of UV light with wavelength range: 240nm~370nm

Serial.print(illum);
Serial.println();
delay(20);

}