Analog UV Light Sensor Breakout - GUVA-S12SD

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
tlharv
 
Posts: 12
Joined: Wed Feb 06, 2013 6:40 pm

Analog UV Light Sensor Breakout - GUVA-S12SD

Post by tlharv »

Hello all,

What range of numbers (the analog signal) should I expect to see from a properly connected GUVA-S12SD board, between total darkness and intense bright sunlight?

I'm assuming that it should be connected to 5VDC, ground, and an analog pin on the Uno according to the code below. Thanks for the help.
________________

// Connect OUT pin on breakout board to analog pin 2
#define UVpin 2

void setup() {
serial.Begin(9600);
pinMode(UVpin, INPUT);
}

void loop() {
int UVreading = analogRead(UVpin);
int UVindex = UVreading / 0.1;

serial.Print(“The reading is “);
serial.print(UVreading);
serial.Print(“ and the UV index is “);
serial.println(UVindex);

delay(2000);
}

User avatar
tlharv
 
Posts: 12
Joined: Wed Feb 06, 2013 6:40 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by tlharv »

I should say that with the above code I get UVreading values of around 15 in the shade and around 110 in full sunlight. I'm wondering if i should be getting something less if the conversion to UV index (as stated in the product description) is to divide by 0.1.

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by adafruit_support_mike »

You aren't scaling your input measurement for the Arduino's supply voltage. An Uno runs from 5v rails and has a 10-bit ADC, so to get voltage you need to multiply the ADC reading by 5/1024.

If you want to simplify the equation a little, multiply the ADC reading by 5.0/102.4 to get the UV index.

User avatar
tlharv
 
Posts: 12
Joined: Wed Feb 06, 2013 6:40 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by tlharv »

Thank you for the prompt reply!

User avatar
tlharv
 
Posts: 12
Joined: Wed Feb 06, 2013 6:40 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by tlharv »

Since I ran it successfully on an Uno, now I'm running it off of a standalone ATMega328P-PU that's bootloaded to use the 8MHz internal clock (to minimize power consumption). I'm powering it from two AA batteries and it works fine. Since supply voltage is now 3V, should the UV index equation become:

UVindex = (ADC reading * 3.0 / 102.4); // using 3V instead of 5V

Thanks!

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by adafruit_support_mike »

Yep.

User avatar
katehid
 
Posts: 2
Joined: Mon Nov 02, 2015 10:57 am

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by katehid »

How do you go about connecting the sensor to raspberry pi? Has anybody done it before? Is there any guidance on it?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by adafruit_support_mike »

It's an analog sensor, so a RasPi can't measure its output directly. You'd have to put an ADC between the RasPi and the GUVA-S12SD.

User avatar
katehid
 
Posts: 2
Joined: Mon Nov 02, 2015 10:57 am

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by katehid »

I've got Custard pie too which is for AC. Is there a python code I can use to get the data from the sensor on my raspberry pi?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by adafruit_support_mike »

I don't know that device, so you'd have to check with the folks who made it for information.

User avatar
GeorgePBurdell
 
Posts: 2
Joined: Sat Apr 01, 2017 9:22 am

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by GeorgePBurdell »

What's the typical power consumption of this? I want to use it with a ESP8266, and it would be convenient if I could just power it off one of the GPIO pins, which can source 12mA. I can't tell what op amp this uses, but the whole thing shouldn't draw more than 1mA, should it?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by adafruit_support_mike »

That sounds about right. The GUVA-S12SD generates a few nanoamps, and the MCP6001 amplifier converts that to an output voltage.

The MCP6001 only uses about 100uA for itself, plus whatever goes to the load. That would be a few more microamps for an ADC input, so 1mA sounds like a good overall guess.

User avatar
malnap
 
Posts: 1
Joined: Fri Nov 03, 2017 5:17 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by malnap »

Hi All!
What is the range of angles this sensor can see? Is there an angle-output curve for this sensor? If not, what is the angle that I can safely assume will result in at least 80% of the output compared to the same intensity UV light directly perpendicular to the sensor?

Thank you!

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Analog UV Light Sensor Breakout - GUVA-S12SD

Post by adafruit_support_mike »

The datasheet doesn’t have any specs for the angular sensitivity, so for an off-axis point source, the best you can do is drop back to the basic physics.

Any angle can be broken down into sine and cosine components relative to a given surface, with the sine component being perpendicular to the surface and the cosine being parallel to it. Only the sine component will be visible to the sensor, and the arcsine of 0.8 is about 53 degrees from the plane, or 37 degrees off-axis.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”