SparkFun
Micro Proximity Sensor - 20 cm VCNL4040 (Qwiic)
· MPN: SEN-30161
Built around the VCNL4040, this tiny Qwiic Micro breakout provides short-range presence detection for projects where space and weight are tight. It is design...
Get notified when back in stock
Built around the VCNL4040, this tiny Qwiic Micro breakout provides short-range presence detection for projects where space and weight are tight. It is designed for qualitative sensing: detecting whether an object is present within range and whether it is getting closer or moving farther away, rather than reporting a precise millimetre distance.
The board keeps the interface streamlined for its compact size. Only the VCNL4040 interrupt pin is broken out, while power and all other signals are routed through the Qwiic connector. It can detect right up to the sensor face, avoiding the blind zone found on many older proximity sensors.
Alongside proximity sensing, the VCNL4040 includes an ambient light sensor for measuring lux and environmental lighting conditions. It suits applications such as touchless controls, gesture or collision detection, screen brightness adjustment, and automatic lighting.
Connection is via the Qwiic Connect System, so no soldering is required for compatible setups. SparkFun documentation and software support includes a schematic, KiCad files, hookup guide, VCNL4040 datasheet, Arduino Library and Python Package, and the board is compatible with OpenLog Artemis and DataLogger systems for no-code logging.
Features:
- Infrared Emitter (IRED): Integrated infrared emitter for proximity sensing.
- Proximity Sensor (PS): Detects object presence and relative movement within range.
- Ambient Light Sensor (ALS): Measures lux and environmental lighting conditions.
- Qwiic Connect System: No soldering is required to connect the Micro VCNL4040 board to the rest of your system.
- No-code logging: Compatible with SparkFun OpenLog Artemis and DataLogger systems for automatic detection, scanning, configuration and logging.
- Qwiic daisy-chain use: Works alongside the Qwiic Multiport or at the end of a Qwiic daisy chain.
Specifications:
- Range: ~0cm to 20cm (Qualitative detection)
- Dead Zone: None (Reads up to the sensor face)
- Operating Voltage: 3.3V
- I2C Address: 0x60 (Fixed)*
- Qwiic Micro Form Factor: 0.75in x 0.30in
- Qwiic Connector: 1x Qwiic Connector
- Dimensions: 0.75in. by 0.30in. (or 24.65mm by 7.62mm)
- 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.
Please note this board has only a single Qwiic connector, making it best suited to compact builds, use with a Qwiic Multiport, or the end of a Qwiic chain.
Jargon buster
Plain-language definitions for the technical terms used above.
- Ambient light sensor
- A sensor that measures the general brightness of light falling on it, similar to how a device can adjust screen brightness automatically. It matters when you want a project to react to room lighting, daylight, shadows, or covered/uncovered conditions.
- breakout
- A breakout board carries a small or fine-pitched component and brings its connections out to standard, breadboard- and header-friendly pins. Describing a part as a breakout means it can be wired into a project without soldering directly to the component's tiny contacts.
- Daisy chain
- A wiring layout where devices are connected one after another in a line. It matters because long or awkward chains can make projects messy or less convenient, while a hub lets several devices branch out from one point.
- I2C
- I2C is a two-wire communication bus used by many sensors and small modules. It matters because several I2C devices can share the same two wires, but each device needs a compatible address and your controller must support I2C.
- I2C address
- An I2C address is the number a device uses so a microcontroller can tell it apart from other devices on the same I2C bus. It matters because two devices with the same fixed address may conflict if used together.
- lux
- Lux is the standard unit for measuring how much light falls on a surface, similar to how a light meter reports brightness. A sensor that outputs lux gives readings that are easier to compare between rooms, outdoor conditions, and different projects.
- multiplexer
- A multiplexer (mux) is a chip or circuit that selects one of several input signals and routes it to a single shared output, with select lines choosing which input is connected; running the same idea in reverse, to send one input to a chosen output, gives a demultiplexer. Multiplexers let a single controller or line work with several signals or devices that would otherwise clash on a shared connection.
- Proximity sensor
- A sensor that detects the presence of a nearby object without physical contact, using methods such as infrared, ultrasonic, capacitive, inductive or time-of-flight. Useful ranges vary widely between types, from a few millimetres to several metres, so check a given sensor's specified range to see whether it suits close-up touch-free triggers or longer-distance detection.
- Qwiic
- Qwiic is a plug-in connector system for I2C devices that uses small 4-pin cables, so you can connect compatible sensors without soldering. It matters because your controller or adapter also needs Qwiic, or you will need a cable or breakout to wire it up.
Find this product in
VCNL4040 Micro Proximity Sensor Schematic
Schematic · 25.8 KB · Click any page to view full size
VCNL4040 Sensor Datasheet
Datasheet · 394.4 KB · Click any page to view full size
Supplier page — sparkfun.com
Supplier Description · 1.2 MB · Click any page to view full size
Resources & Downloads
Guides, code examples, and more
Source Code
Open-source libraries, firmware & example projects for this product
An Arduino library for the VCNL4040, a simple IR presence and ambient light sensor, excellent for detecting if something has appeared within 20cm in front of the sensor.
ecaf451
about 3 years ago
· 17 commits
- examples Fixing lib typo in examples about 8 years ago
- src Merge pull request #3 from KyleLomen/KyleLomen-patch-1 about 3 years ago
- .gitattributes Initial commit about 8 years ago
- keywords.txt Initial commit about 8 years ago
- library.properties Update library.properties about 3 years ago
- LICENSE.md Initial commit about 8 years ago
- README.md Update README.md over 7 years ago
Python module to interface with the Qwiic Proximity board
7f73cc3
almost 7 years ago
· 39 commits
- docs initial docs setup almost 7 years ago
- examples pythonized the api almost 7 years ago
- .readthedocs.yml added support for readthedocs doc generation almost 7 years ago
- DESCRIPTION.rst fleshing out install about 7 years ago
- LICENSE MIT License about 7 years ago
- qwiic_proximity.py updates to address pylint issues almost 7 years ago
- README.md Update README.md almost 7 years ago
- setup.cfg fleshing out install about 7 years ago
- setup.py cleanup, version bump almost 7 years ago