VCNL4040 Proximity & Ambient Light Sensor
Dual-function sensor combining proximity detection (up to 20cm) with ambient light measurement. Compact package for close-range interaction.
Say it to PAL
“Tell me when someone comes close.”
The code PAL writes
p.onSensorChange('qwiic-vcnl4040', 'proximity', (prox) => {
if (prox > 5000) p.notify('Object detected nearby');
});
await p.waitUntilStopped();“How close is something, and how bright is it?”
The code PAL writes
const prox = await p.read('qwiic-vcnl4040', 'proximity');
const lux = await p.read('qwiic-vcnl4040', 'ambient_light');
p.log(`Proximity: ${prox}, Light: ${lux} lux`);When to pick it
Proximity detection (is something close?) plus ambient light. Choose APDS-9960 if gesture direction is needed, or VL53L1X/VL53L0X for actual distance measurement.
Good to know
- Ambient light maxes at ~6553 lux — not suitable for outdoor/direct sunlight measurement.
About it
The VCNL4040 combines a proximity sensor with an ambient light sensor in a single compact package. The IR proximity sensor detects objects up to ~20cm with 16-bit resolution, while the ambient light sensor measures illuminance up to 6553 lux. Ideal for touchless user interfaces, screen wake-on-approach, paper detection in printers, and automatic display brightness. The fixed I2C address (0x60) keeps it simple for single-sensor designs.
Where to buy
Facts
Tested
It is in our catalog, but nobody has checked it on a real board. It may not work yet. Its driver is written, but it has not been tested on hardware yet.
I2C address
The VCNL4040 Proximity & Ambient Light Sensor answers at I2C address 0x60. The address is fixed.
Current
2 mA
The catalog lists a typical draw of 2 mA for the VCNL4040, copied from the maker’s description and not measured by Palpable.
Board size
25.4 × 25.4 mm
The VCNL4040 board measures 25.4 × 25.4 mm and stands 4.6 mm tall with its parts. It has 2 mounting holes. These dimensions are from the maker’s mechanical drawing.
Chip
VCNL4040
Its sensor is the Vishay VCNL4040.
Free to reuse
Every fact here is open data under CC BY 4.0. Copy it into your own docs or code, and credit Palpable. Download it
This record was last changed on October 6, 2026.