Overview

The VEML7700 is a 16-bit high-accuracy digital ambient light sensor (ALS) manufactured by Vishay Semiconductors. Designed for display brightness control, backlight dimming, and weather station monitoring, it features Vishay's proprietary Filtron technology, which matches the spectral response of the human eye (peak 550 nm550\text{ nm}).

Offering an extreme dynamic range from 0.0036 Lux to 120,000 Lux (resolving sub-lux moonlight up to direct full sunlight), programmable gain settings (18,14,1,2\frac{1}{8}, \frac{1}{4}, 1, 2), adjustable integration times (25 ms25\text{ ms} to 800 ms800\text{ ms}), and I2CI^2C communication, the VEML7700 is widely used on Adafruit and ESPHome sensor nodes.

Quick reference

Operating voltage (VCC)3.3 V to 5.0 V DC (breakout with 3.3V LDO)
IC supply voltage (VDD)2.5 V to 3.6 V DC (3.3 V nominal)
InterfaceI2CI^2C (Standard 100 kHz / Fast 400 kHz)
Fixed I2CI^2C address0x10
Dynamic range0.0036 Lux to 120,000 Lux
Resolution16-bit digital output
Operating current45 μA45\ \mu\text{A} active / 0.5 μA0.5\ \mu\text{A} shutdown

Pinout

Standard 4-pin 0.1" (2.54 mm) header or Qwiic / STEMMA QT connector:

PinNameTypeDescription
1VCCPowerSupply input (+3.3 V to +5.0 V DC)
2GNDPowerGround (0 V)
3SCLDigital InputI2CI^2C Serial Clock
4SDADigital Input / OutputI2CI^2C Serial Data

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Module)VCCV_{CC}3.33.3 / 5.05.5VPower rail with LDO
Active Supply CurrentIDDI_{DD}45100µAIntegration time 100 ms
Shutdown CurrentIsdI_{sd}0.51.0µASoftware shutdown
Minimum ResolutionLuxminLux_{min}0.0036Lux/digitGain = 2, tint=800 mst_{int} = 800\text{ ms}
Maximum Measurable LuxLuxmaxLux_{max}120000LuxGain = 18\frac{1}{8}, tint=25 mst_{int} = 25\text{ ms}
Peak Sensitivity Wavelengthλp\lambda_p550nmMatches human photopic eye response

I2CI^2C Register Map

The VEML7700 uses 16-bit register words (0x10 address):

Command (8-bit)Register NameAccessResetDescription
0x00ALS_CONFR/W0x0001Configuration: Gain, Integration Time, Persistence, Shutdown
0x01ALS_WHR/W0x0000High Threshold Window for interrupt
0x02ALS_WLR/W0x0000Low Threshold Window for interrupt
0x04ALS_DATARead16-bit raw ALS illuminance data
0x05WHITE_DATARead16-bit raw White channel data

Lux Calculation & Gain Multipliers

Lux=Raw ALS Code×Resolution Scale Factor\text{Lux} = \text{Raw ALS Code} \times \text{Resolution Scale Factor}

For default settings (Gain=1\text{Gain} = 1, Integration Time=100 ms\text{Integration Time} = 100\text{ ms}), the resolution multiplier is 0.0576 Lux/digit0.0576\text{ Lux/digit}.

High-lux nonlinear compensation formula (for raw Lux >1000> 1000):

Luxcorrected=6.0135×1013×L49.3924×109×L3+8.1488×105×L2+1.0023×L\text{Lux}_{corrected} = 6.0135 \times 10^{-13} \times L^4 - 9.3924 \times 10^{-9} \times L^3 + 8.1488 \times 10^{-5} \times L^2 + 1.0023 \times L

Wiring

VEML7700 PinArduino / MCUESP32Notes
VCC5V / 3.3V3.3VModule includes 3.3V LDO
GNDGNDGNDSystem ground
SCLA5GPIO 22I2CI^2C Clock
SDAA4GPIO 21I2CI^2C Data

Example

cpp
#include <Wire.h>
#include "Adafruit_VEML7700.h"

Adafruit_VEML7700 veml = Adafruit_VEML7700();

void setup() {
  Serial.begin(9600);
  while (!Serial) delay(10);

  Serial.println("Initializing VEML7700...");
  if (!veml.begin()) {
    Serial.println("VEML7700 not found! Check wiring.");
    while (1);
  }
  Serial.println("VEML7700 online.");

  veml.setGain(VEML7700_GAIN_1);
  veml.setIntegrationTime(VEML7700_IT_100MS);
}

void loop() {
  float lux = veml.readLux();
  Serial.print("Ambient Light: ");
  Serial.print(lux);
  Serial.println(" Lux");

  delay(1000);
}

Common mistakes

  • I2C address collision: VEML7700 uses a fixed hardcoded address (0x10). Connecting multiple VEML7700 sensors to the same I2CI^2C bus requires an I2CI^2C multiplexer (such as TCA9548A).
  • Clipping in bright outdoor sunlight: At default gain (×1\times 1), raw output clips at ~3,700 Lux. For outdoor solar measurements, set gain to 18\frac{1}{8} (VEML7700_GAIN_1_8) and integration time to 25 ms25\text{ ms}.

Notes

  • VEML7700 vs BH1750: VEML7700 offers significantly higher sensitivity (0.0036 Lux0.0036\text{ Lux} vs 1.0 Lux1.0\text{ Lux}) and wider dynamic range.

Assets & downloads