SparkFun Proximity Sensor Breakout - 20cm, VCNL4040 (Qwiic)

The SparkFun VCNL4040 Breakout provides simple, qualitative proximity detection up to 20cm with zero dead zone and an integrated ambient light sensor, all accessible via Qwiic.


Description

The SparkFun Proximity Sensor Breakout is a simple, high-performance IR presence and ambient light sensor built around the VCNL4040 from Vishay. If you have ever used an automatic paper towel dispenser or a touchless soap dispenser, you have likely interacted with this type of technology.

This sensor is the perfect digital alternative to popular analogue "Sharp" sensors. But what separates it from them is that it has absolutely no dead zone. Unlike many sensors that require an object to be at least 4cm away to be detected, the VCNL4040 can detect objects up to the face of the sensor, making it ideal for close-range detection and touchless interfaces.

Qualitative vs. Quantitative

It is essential to understand that this is a qualitative sensor, not a quantitative one.

  • What it does: It detects if an object is present within its 20cm range and determines if it is getting closer or moving farther away.
  • What it doesn't do: It does not provide a precise millimetre distance reading (e.g., "The object is exactly 177mm away").

If your project requires precise, millimetre-accurate distance measurements, we recommend checking out our Time-of-Flight (ToF) sensors. But for detecting presence, gestures, or collisions, the VCNL4040 is what you need.

Two Sensors in One

In addition to proximity, the VCNL4040 features a built-in Ambient Light Sensor (ALS). This allows the board to measure lux and the lighting conditions of the environment, making it great for adjusting screen brightness, controlling automatic night lights, or triggering your next glitter cannon.

Easy Integration & No-Code Logging

Utilising the handy Qwiic Connect System, no soldering is required to connect the VCNL4040 to the rest of your system. However, if you want to skip the programming entirely, this breakout is fully compatible with the SparkFun OpenLog Artemis and DataLogger systems. When connected, the sensor is automatically detected, scanned, configured, and logged. This allows you to start gathering proximity data immediately! No programming, soldering, or complex setup required.

By eliminating the "blind zone" found in legacy sensors, the VCNL4040 offers effective detection from 0 to 20cm. Paired with excellent ambient light suppression, it ensures consistent readings in fluctuating environments, making it a dependable solution for precise, short-range presence detection.


Specifications

Range: ~0cm to 20cm (Qualitative detection)

  • Capabilities:
    • Infrared Emitter (IRED)
    • Proximity Sensor (PS)
    • Ambient Light Sensor (ALS)
  • Dead Zone: None (Reads up to the sensor face)
  • Operating Voltage: 3.3V
  • I2C Address: 0x60 (Fixed)*
  • 2x Qwiic Connectors

*Technical Note: The I2C address of the VCNL4040 is hardware-defined. To use multiple sensors on a single bus, you will need a multiplexer like the Qwiic Mux Breakout.


Resources

Related Products