VEML6070 is an advanced ultraviolet (UV) light sensor with I2C protocol interface and designed by the CMOS process. It is easily operated via a simple I2C command. The active acknowledge (ACK) feature with threshold windows setting allows the UV sensor to send out a UVI alert message.
Under a strong solar UVI condition, the smart ACK signal can be easily implemented by the software programming.
VEML6070 incorporates a photodiode, amplifiers, and analog / digital circuits into a single chip. VEML6070’s adoption of FiltronTM UV technology provides the best spectral sensitivity to cover UV spectrum sensing. It has an
excellent temperature compensation and a robust refresh rate setting that does not use an external RC low pass filter.
VEML6070 has linear sensitivity to solar UV light and is easily adjusted by an external resistor. Software shutdown mode is provided, which reduces power consumption to be less than 1 μA. VEML6070’s operating voltage ranges from 2.7 V to 5.5 V.
Parts Required
Here are the parts I used
you can connect to the sensor using a standard header the classic dupont style jumper wire.
Name | Link | |
ESP32 | ||
VEML6070 | ||
Connecting cables |
Schematics/Layout
Code
Again we use a library and again its an adafruit one – https://github.com/adafruit/Adafruit_VEML6070
#include <Wire.h> #include "Adafruit_VEML6070.h" Adafruit_VEML6070 uv = Adafruit_VEML6070(); void setup() { Serial.begin(9600); Serial.println("VEML6070 Test"); uv.begin(VEML6070_1_T); // pass in the integration time constant } void loop() { Serial.print("UV light level: "); Serial.println(uv.readUV()); delay(1000); }
Output
Open the serial monitor – this is what I saw. I was indoors at the time
UV light level: 0
UV light level: 0
UV light level: 0
Links
https://www.vishay.com/docs/84277/veml6070.pdf