

The VEML7700 is a high-precision digital ambient light sensor manufactured by SAMIROB. It is designed to measure ambient light levels with exceptional accuracy, thanks to its integrated photodiodes, amplifiers, and analog-to-digital converter (ADC). The sensor provides a digital output that corresponds to the intensity of ambient light, making it ideal for applications requiring automatic brightness adjustment or energy-efficient lighting.








The VEML7700 is a versatile sensor with the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage (VDD) | 2.5V to 3.6V |
| Communication Interface | I²C (up to 400 kHz) |
| Ambient Light Range | 0.003 lux to 120,000 lux |
| Resolution | 16-bit |
| Operating Temperature | -25°C to +85°C |
| Power Consumption | 2 µA (typical in shutdown mode) |
| Package Type | Surface-Mount (6-pin) |
The VEML7700 has a 6-pin configuration, as detailed below:
| Pin Name | Pin Number | Description |
|---|---|---|
| VDD | 1 | Power supply input (2.5V to 3.6V). |
| GND | 2 | Ground connection. |
| SDA | 3 | I²C data line for communication. |
| SCL | 4 | I²C clock line for communication. |
| INT | 5 | Interrupt output (optional, configurable). |
| NC | 6 | No connection (leave unconnected). |
0x10. Ensure no address conflicts if multiple devices are on the same bus.Below is an example of how to interface the VEML7700 with an Arduino UNO to read ambient light levels:
#include <Wire.h>
// VEML7700 I2C address
#define VEML7700_ADDR 0x10
// Register addresses
#define VEML7700_ALS_CONF 0x00 // Configuration register
#define VEML7700_ALS_DATA 0x04 // Ambient light data register
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Configure the VEML7700
Wire.beginTransmission(VEML7700_ADDR);
Wire.write(VEML7700_ALS_CONF); // Point to configuration register
Wire.write(0x00); // Low byte of configuration (default settings)
Wire.write(0x00); // High byte of configuration (default settings)
Wire.endTransmission();
Serial.println("VEML7700 initialized.");
}
void loop() {
uint16_t ambientLight = readAmbientLight();
Serial.print("Ambient Light (lux): ");
Serial.println(ambientLight);
delay(1000); // Wait 1 second before next reading
}
uint16_t readAmbientLight() {
uint16_t data = 0;
// Request ambient light data
Wire.beginTransmission(VEML7700_ADDR);
Wire.write(VEML7700_ALS_DATA); // Point to ambient light data register
Wire.endTransmission();
// Read 2 bytes of data
Wire.requestFrom(VEML7700_ADDR, 2);
if (Wire.available() == 2) {
data = Wire.read(); // Read low byte
data |= (Wire.read() << 8); // Read high byte and combine
}
return data;
}
No Data from Sensor:
0x10.Inaccurate Light Readings:
I²C Communication Errors:
Q1: Can the VEML7700 measure light in complete darkness?
A1: Yes, the VEML7700 has a very high sensitivity and can measure light levels as low as 0.003 lux.
Q2: What is the maximum distance for I²C communication?
A2: The I²C bus is typically reliable for distances up to 1 meter. For longer distances, consider using I²C bus extenders.
Q3: Can the sensor be used outdoors?
A3: The VEML7700 is not weatherproof. If used outdoors, it must be enclosed in a protective, transparent housing.
Q4: How do I convert raw data to lux?
A4: The raw data from the sensor can be converted to lux using a scaling factor provided in the datasheet.