×

SparkFun will be closed Friday 7/3/2020 for the 4th of July holiday. All orders placed after 2 pm MT on Thursday 7/2/2020 will be shipped out on Monday 7/6/2020. SparkFun Support will also resume on Monday 7/6/2020. Have a safe holiday!

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

The SparkFun Proximity Sensor Breakout is a simple IR presence and ambient light sensor utilizing the VCNL4040. This type of sensor is often seen in automatic towel and soap dispensers or automatic faucets. With the ability to detect objects qualitatively up to 20cm away, you will be able to detect if something is there and if it is closer or further away since the last reading. Utilizing our handy Qwiic system, no soldering is required to connect it to the rest of your system. However, we still have broken out 0.1"-spaced pins in case you prefer to use a breadboard.

The SparkFun Proximity Sensor Breakout is a great digital alternative to the popular analog based Sharp sensors. The VCNL4040 has no dead zone and can read all the way up to the face of the sensor. This sensor also has an ambient light sensor built it which is excellent if you need a digital light sensor for your next glitter cannon. If you need quantitative distance readings (for example sensing that an object is 177mm away) check out the SparkFun 2 meter and 4 meter Time of Flight (ToF) sensors with mm accuracy.

We've written an Arduino library to flex every feature of this sensor. You can grab it from the Arduino Library Manager or from the SparkFun repo.


The SparkFun Qwiic Connect System is an ecosystem of I2C sensors, actuators, shields and cables that make prototyping faster and less prone to error. All Qwiic-enabled boards use a common 1mm pitch, 4-pin JST connector. This reduces the amount of required PCB space, and polarized connections mean you can’t hook it up wrong.

The VCNL4040 Proximity Sensor Breakout can also be automatically detected, scanned, configured, and logged using the OpenLog Artemis datalogger system. No programming, soldering, or setup required!


  • Qualitative Detection Range: 20cm
  • Integrated Modules: Infrared Emitter (IRED), Ambient Light Sensor (ALS), Proximity Sensor (PS)
  • Operates ALS and PS in Parallel Structure
  • No Dead Zone
  • Operating Voltage: 3.3V
  • I2C Address: 0x60
  • 2x Qwiic Connectors

SparkFun Proximity Sensor Breakout - 20cm, VCNL4040 (Qwiic) Product Help and Resources

Qwiic Proximity Sensor (VCNL4040) Hookup Guide

February 28, 2019

The SparkFun Qwiic Proximity Sensor is a great, qualitative proximity (up to 20 cm) and light sensor. This hookup guide covers a few examples to retrieve basic sensor readings.

Qwiic Kit for Raspberry Pi Hookup Guide

July 4, 2019

Get started with the CCS811, BME280, VCNL4040, and microOLED via I2C using the Qwiic system and Python on a Raspberry Pi! Take sensor readings from the enviroment and display them on the microOLED, serial terminal, or the cloud with Cayenne!

Qwiic Pro Kit Project Guide

November 7, 2019

The Qwiic Pro Kit was designed to allow users to get started with Arduino without the need for soldering or a breadboard. We've included three inputs (a joystick, accelerometer, and proximity sensor) and one display that can be daisy chained to the RedBoard Turbo (SAMD21) Development Board.

Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

3 Programming

Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Is the product 'eye safe'? I didn't see anything in the spec sheet. I'm looking for a Radiant Intensity vs Forward Current chart. I found this limit

    In the case of full IR-A spectral band (700-1400 nm), the standard suggests that irradiance at or below 0.96 mW/cm^2 is safe for continuous exposure of a duration slightly greater than 8 hours.

    in this paper IR reflection hazards paper

Customer Reviews

4 out of 5

Based on 1 ratings:

Currently viewing all customer reviews.

Works fine with Ardunio. Lots of work for Raspberry Pi

Loaded and tested Arduino examples in minutes. Seems to work as advertised for proximity and light intensity sensing applications. Nice. But I need to use this on a Raspberry Pi and I have been unable to find python driver code. So I'm building my own, which is a huge hassle. Should have purchased another sensor that has Python drivers. Also, I will be disabling the power LED. (Why is it there?) Would be nice if Sparkfun had a cuttable trace to disable the LED.