UV Sensor reading 0

Hi everyone, I'm encountering a problem with my UV sensor, when I read the value I just get 0. It's a basic sensor with VCC, which I've connected to 5V, GND which I've connected to GND, and OUT, which I've connected to A0. I was using another sensor model with the same pins and it gave me the same 0 result.
Right now I'm using this library, all of the example code is giving me 0 as a result, as well as my own code:

#include <AnalogUVSensor.h>

AnalogUVSensor AUV;

void setup() {
  Serial.begin(9600);
  AUV.begin(A0);
}

void loop() {
  float uvi = AUV.read(5);
  Serial.print("UVI: ");
  Serial.println(uvi);
  delay(1000);
}

Does anybody know why? It's an Arduino Uno R3. It's for a student project.
Thanks very much in advance.
I included a picture of the very basic wiring.

UV datasheet?

So simple, hard to go wrong. Could you just try another analog input?
Or, just do an analog read without the library in your way, to see if there's anything to read?

read() returns the UV index

if you are indoor, you probably have very few UV and the reading indeed could be 0

from the GitHub

Voltage UV index risk of harm Colour
<0.050 0 low Green
0.227 1 low Green
0.318 2 low Green
0.408 3 moderate Yellow
0.503 4 moderate Yellow
0.606 5 moderate Yellow
0.696 6 high Orange
0.795 7 high Orange
0.881 8 very high Red
0.976 9 very high Red
1.079 10 very high Red
1.170> 11 extreme Purple
1 Like

It's the same with the other analog inputs. Without the library it's also 0 :confused:

Are you indoors? Your sensor, at least, should be outside, in the open. See post #4.

Use your multimeter to check continuity of all the connections.

Did you carefully solder header pins to the UV sensor board?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.