# Adafruit VCNL4200 Long Distance IR Proximity and Light Sensor

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/133/284/medium800thumb/adafruit_products_6064-05.jpg?1729786888)

We've all been there. That thing is _close_ but _how close?_ When you need to measure a meter-or-so distance with reasonable accuracy, the **VCNL4200 Long Distance Proximity Sensor** from Vishay can do that for you. It's excellent for robotic or motion-detection situations. And if perchance you also needed to measure the amount of light at the same time, you're in luck! The VCNL4200 can do that too, with it's built in ambient light sensor (ALS).

![](https://cdn-learn.adafruit.com/assets/assets/000/133/283/medium800/adafruit_products_6064-04.jpg?1729786686)

The VCNL4200 is a powerful two-in-one sensor, with a proximity sensor that works from 0 to 1.5m (59 inches) and light sensor with range of 0.003 to 1570 lux. It's the longest-range IR distance sensor we've seen other than the [Sharp Analog distance sensors](https://www.adafruit.com/product/1031), and at a great price with I2C interface.

Note that while the chip itself is specced for 1.5 meter distance measurements, that depends a bit on optimal lighting situations and high power configuration. We've found that 50-100cm is a good range to expect, and you won't get a lot of accuracy/precision as the detection object gets farther away. We normally suggest&nbsp;[ToF sensors](https://www.adafruit.com/search?q=time+of+flight+distance+sensor) for long precision measurements, but sometimes you want the low cost and simplicity of infrared. Also, you get a 'free' light sensor which ToF sensors don't contain.

![](https://cdn-learn.adafruit.com/assets/assets/000/133/285/medium800/adafruit_products_6064-02.jpg?1729786951)

"OK, _finally_ I can get started on my proximity and light sensing project, but _how do I use it?"_ you say. To make life easier so you can focus on your important work, we've taken the VCNL4200 and put it onto a breakout PCB along with support circuitry to let you use this little wonder with 3.3V (Feather/Raspberry Pi) or 5V (Arduino/ Metro328) logic levels.

Additionally, since it speaks I2C, you can easily connect it up with two wires (plus power and ground!). We've even included [SparkFun qwiic](https://www.sparkfun.com/qwiic) compatible **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)** connectors for the I2C bus so **you don't even need to solder!** Just wire up to your favorite micro and you can use our CircuitPython/Python or Arduino drivers to easily interface with the VCNL4200 and make approximate approximations of proximity in no time! **QT Cable is not included** , [but we have a variety in the shop.](https://www.adafruit.com/product/4210)

![](https://cdn-learn.adafruit.com/assets/assets/000/133/286/medium800/adafruit_products_6064-03.jpg?1729787037)

To give you some ability to tune your measurements for your situation, the VCNL4200 lets you adjust the integration time for both light sensing and proximity, IR LED power, duty cycle, multi-pulse, and sunlight-immunity. There's also interrupt output support for light or proximity measurement thresholds.

- [Next Page](https://learn.adafruit.com/adafruit-vcnl4200-long-distance-ir-proximity-and-light-sensor/pinouts.md)

## Primary Products

### Adafruit VCNL4200 Long Distance IR Proximity and Light Sensor

[Adafruit VCNL4200 Long Distance IR Proximity and Light Sensor](https://www.adafruit.com/product/6064)
We've all been there. That thing is&nbsp;_close_&nbsp;but&nbsp;_how close?_&nbsp;When you need to measure a meter-or-so distance with reasonable accuracy, the **VCNL4200 Long Distance Proximity Sensor** from Vishay can do that for you. It's excellent for...

Out of Stock
[Buy Now](https://www.adafruit.com/product/6064)
[Related Guides to the Product](https://learn.adafruit.com/products/6064/guides)

## Featured Products

### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)
### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets

[STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets](https://www.adafruit.com/product/4397)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium female headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and...

In Stock
[Buy Now](https://www.adafruit.com/product/4397)
[Related Guides to the Product](https://learn.adafruit.com/products/4397/guides)
### STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable

[STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable](https://www.adafruit.com/product/4209)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium Dupont male headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert...

In Stock
[Buy Now](https://www.adafruit.com/product/4209)
[Related Guides to the Product](https://learn.adafruit.com/products/4209/guides)
### JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic

[JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic](https://www.adafruit.com/product/4398)
This cable will make it super easy to use our plug-and-play STEMMA QT boards with boards like Circuit Playground. On one end you get a Qwiic / STEMMA QT connector (technically known as a JST SH 4-pin plug)&nbsp; into 4 individual wires with grippy alligator clips. We're carrying these to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4398)
[Related Guides to the Product](https://learn.adafruit.com/products/4398/guides)

## Related Guides

- [reef-pi Guide 7: Dosing Controller](https://learn.adafruit.com/reef-pi-guide-5-dosing-controller.md)
- [Adafruit Capacitive Touch Sensor Breakouts](https://learn.adafruit.com/adafruit-capacitive-touch-sensor-breakouts.md)
- [Adafruit BMP580, BMP581, and BMP585 - Temperature and Pressure Sensor](https://learn.adafruit.com/adafruit-bmp580-bmp581-and-bmp585-temperature-and-pressure-sensor.md)
- [MacroPad Remote Procedure Calls over USB to Control Home Assistant](https://learn.adafruit.com/macropad-remote-procedure-calls-over-usb-to-control-home-assistant.md)
- [Adafruit Metro ESP32-S2](https://learn.adafruit.com/adafruit-metro-esp32-s2.md)
- [Adafruit RP2040 Prop-Maker Feather](https://learn.adafruit.com/adafruit-rp2040-prop-maker-feather.md)
- [Big Key Switches Macro Pad](https://learn.adafruit.com/big-key-switch.md)
- [Using ItsaSNAP for HomeKit PIR Motion Detection](https://learn.adafruit.com/itsasnap-homekit-pir-motion-detection.md)
- [Adafruit ESP32-S3 Reverse TFT Feather](https://learn.adafruit.com/esp32-s3-reverse-tft-feather.md)
- [Sparky the Blue Smoke Monster Automaton](https://learn.adafruit.com/sparky-automaton.md)
- [Adafruit STEMMA Audio Amp](https://learn.adafruit.com/stemma-audio-amp.md)
- [Adafruit RP2350 22-pin FPC HSTX to DVI Adapter](https://learn.adafruit.com/adafruit-rp2350-22-pin-fpc-hstx-to-dvi-adapter.md)
- [USB MIDI Keyset Controller](https://learn.adafruit.com/midi-keyset.md)
- [How to add a New Board to the circuitpython.org website](https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website.md)
- [Pip-Boy 2040 Wrist-Mounted Prop](https://learn.adafruit.com/pip-boy-2040.md)
