Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use VEML6070: Examples, Pinouts, and Specs

Image of VEML6070Design with VEML6070 in Cirkit Designer

Introduction

The VEML6070 is a high-precision UV light sensor manufactured by MODUL MOD, with the part ID GY-VEML6070. This sensor is designed to measure UVA and UVB radiation, providing a digital output via the I2C interface. Its compact design and low power consumption make it ideal for applications such as UV exposure monitoring, environmental sensing, and wearable devices.

Explore Projects Built with VEML6070

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Based UV Index Sensor with VEML6075: A project utilizing VEML6070 in a practical application
ESP32-Based UV Index Sensor with VEML6075

This circuit connects an ESP32 Wroom Dev Kit microcontroller with a VEML6075 UV light sensor. The ESP32 powers the sensor and communicates with it via I2C, using GPIO 32 and GPIO 33 for the SCL and SDA lines, respectively. The purpose of this circuit is to enable the ESP32 to read UV index measurements from the VEML6075 sensor.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The following table outlines the key technical details of the VEML6070:

Parameter Value
Operating Voltage 2.7V to 5.5V
Communication Interface I2C
UV Wavelength Range 320 nm to 400 nm (UVA and UVB)
Operating Current 1 µA (typical)
Resolution 16-bit digital output
Operating Temperature -40°C to +85°C
Package Type Surface Mount (SMD)

Pin Configuration and Descriptions

The VEML6070 module has the following pin configuration:

Pin Name Pin Number Description
VCC 1 Power supply input (2.7V to 5.5V)
GND 2 Ground
SDA 3 I2C data line
SCL 4 I2C clock line
ADDR 5 Address selection pin (connect to GND or VCC)

Usage Instructions

How to Use the VEML6070 in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. I2C Communication: Connect the SDA and SCL pins to the corresponding I2C pins on your microcontroller (e.g., Arduino UNO).
  3. Address Selection: Use the ADDR pin to set the I2C address:
    • Connect ADDR to GND for address 0x38.
    • Connect ADDR to VCC for address 0x39.
  4. Pull-Up Resistors: Ensure that the SDA and SCL lines have pull-up resistors (typically 4.7 kΩ) for proper I2C communication.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to interface the VEML6070 with an Arduino UNO:

#include <Wire.h>
#include <Adafruit_VEML6070.h>

// Create an instance of the VEML6070 library
Adafruit_VEML6070 uv = Adafruit_VEML6070();

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  Serial.println("VEML6070 UV Sensor Test");

  // Initialize the VEML6070 sensor
  if (!uv.begin(Adafruit_VEML6070::VEML6070_1_T)) {
    Serial.println("Failed to initialize VEML6070. Check connections!");
    while (1); // Halt execution if initialization fails
  }
  Serial.println("VEML6070 initialized successfully.");
}

void loop() {
  // Read the UV intensity from the sensor
  uint16_t uvReading = uv.readUV();

  // Print the UV reading to the serial monitor
  Serial.print("UV Reading: ");
  Serial.println(uvReading);

  // Delay for 1 second before the next reading
  delay(1000);
}

Notes on the Code

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Response from the Sensor

    • Cause: Incorrect I2C address or wiring.
    • Solution: Verify the ADDR pin connection and ensure proper SDA/SCL wiring.
  2. Inconsistent UV Readings

    • Cause: Electrical noise or improper pull-up resistors.
    • Solution: Add pull-up resistors (4.7 kΩ) to the SDA and SCL lines and ensure a stable power supply.
  3. Sensor Overheating

    • Cause: Operating outside the specified voltage or temperature range.
    • Solution: Ensure the supply voltage is between 2.7V and 5.5V and the temperature is within -40°C to +85°C.
  4. Library Not Found

    • Cause: Missing or outdated library.
    • Solution: Install the latest version of the Adafruit_VEML6070 library from the Arduino Library Manager.

FAQs

Q1: Can the VEML6070 measure UV-C radiation?
A1: No, the VEML6070 is designed to measure UVA and UVB radiation in the 320 nm to 400 nm range.

Q2: What is the maximum I2C bus length for the VEML6070?
A2: The maximum bus length depends on the pull-up resistor values and the capacitance of the bus. For reliable communication, keep the bus length under 1 meter.

Q3: Can I use the VEML6070 with a 3.3V microcontroller?
A3: Yes, the VEML6070 operates at 2.7V to 5.5V, making it compatible with both 3.3V and 5V systems.

Q4: How do I calculate the UV index from the sensor's output?
A4: Use the manufacturer's formula or a library like Adafruit_VEML6070 to convert the raw digital output into a UV index value.