
Add reflected-infrared proximity detection and ambient-light sensing to a microcontroller project with the Adafruit VCNL4040 breakout. It combines an IR emitter and proximity receiver with a lux sensor, connected over I2C. STEMMA QT / Qwiic connectors and breadboard-friendly pads offer two ways to wire it.
Features
- VCNL4040 two-in-one proximity and ambient-light sensor.
- Approximate proximity sensing over short distances, up to about 200 mm under suitable conditions. The response depends on the target and setup.
- Ambient-light measurements with selectable integration time for different sensitivity and measurement ranges.
- Configurable IR LED current and duty cycle for tuning proximity response.
- 3.3V or 5V microcontroller power and logic support.
- I2C interface with fixed address 0x60.
- STEMMA QT / Qwiic connectors, breakout pads and mounting holes.
- Arduino and CircuitPython/Python library support.
Using the sensor
Use the board for object-presence detection, touchless controls, screen-wake experiments or monitoring room-light changes. This is a reflected-IR proximity sensor, not a time-of-flight sensor or a precision distance meter. Dark, reflective or differently sized targets can give different readings at the same distance. Calibrate thresholds for your application.
Connect power, ground, SDA and SCL to a compatible host, then use the maker's library to read proximity and ambient light. The fixed I2C address should be considered when sharing a bus. Adjust integration time and IR LED settings to suit the installation. The wiring images are connection examples, not extra items in the package.
Package includes
- 1 x Adafruit VCNL4040 Proximity and Lux Sensor breakout board.
Host microcontroller, Raspberry Pi, breadboard, wires, STEMMA QT cable and the scale coin are not included. Loose headers are not promised as part of this listing.
Useful links
- Adafruit VCNL4040 guide
- Pinouts and power connections
- Arduino wiring and library setup
- Python and CircuitPython examples
- Supplier product reference
Image credits
Board photographs and Metro, Feather and Raspberry Pi wiring diagrams: Bryan Siepert / Adafruit, CC BY-SA 3.0. Sources: angled board, rear and scale coin, Metro wiring, Feather wiring, Raspberry Pi wiring. ESP32 Feather V2 STEMMA QT wiring: Tyeth Gundry / Adafruit, CC BY 3.0, source asset. Wiring diagrams are examples; connected equipment is not included.