×

SparkFun will be closed May 25, 2015 for Memorial Day. Orders placed after 2pm on Friday the 22nd will ship out on Tuesday. Thanks!

Creative Commons images are CC BY-NC-SA 3.0

Description: In physical computing it’s sometimes nice to know how physically close you are to an object. In other words, you may need to know your ‘proximity’ to an object, that’s where the VCNL4000 does its magic. Okay, it’s not actually magic, it’s a combination ambient light sensor and IR proximity sensor.

The VCNL4000 can detect its proximity to an object using IR within a range of about 20cm. Proximity data as well as ambient light level data can be collected over an I2C interface. This breakout board gives you access to the I2C pins, the Vcc pin, GND and the IR+ pin (power supply for the built-in IR emitter). Simply give the board a clean 3.3V power source and give the IR emitter anywhere from 2.5-5V and you’ll be able to tell how far you are from an object up to 20cm.

Features:

  • Voltage Rating: 3.3V
  • IR Emitter Vin: 2.5-5V
  • I/O pins are 5V compliant
  • Range: Up to 20cm
  • Built-in Ambient Light Sensor

Documents:

Recommended Products

Customer Comments

  • According to the datasheet you can’t set the I2C address:

    “The VCNL4000 has a fix slave address for the host programming and accessing selection. The predefined 7 bit I2C bus address is set to 0010 011 = 13h.”

    This means there is no way to have more then one on your I2C bus, correct? You might want to post that in the “Features” section before someone orders a bunch of them to create a sensor array. Would be nice if the board had a I2C to analog out so you could have more then one. Also, people will be lucky to get much more then 10 cm range.

    • The arduino UNO rev. 3 now has a additional sets of SCL / SDA pins.. would this enable usage of 2 of these at the same time? Or is it still as noted here by Tedspark? I need to run two of these to provide correction numbers for referencing position on an adjustable-pivot CNC backgauge that’s not calibrating correctly. I need to measure each end with a precision of approx 1/64" (~.4mm), at a distance of about 2" (50.8 mm) or 4" (76mm) , so that I can plug the numbers into the system as an offset adjustment each time the machine is started up. I’m really hoping that my solution won’t require the use of two arduinos. Has anyone tried using two of them on a rev.3 to see if they’ll work?

      • I have the same problem. I need to run 4 of them on the same Arduino ! How can I do that ?

    • The answer to this quandary is the 24LC256 chip. Each chip is an I2C 256k EEPROM, and supports having multiple chips on the same line. So you can have 1 VCNL4000 tied to a 24LC256, and multiple 24LC256 on the same I2C bus. The 24LC256 supports chaining of up to 8 chips…so 8 I2C devices on the same bus.

      • What you’re saying is that you can have up to eight 24LC256 devices on an I2C bus. This is correct, but how does it solve OP’s problem, which is having several VCNL4000 devices on a bus? Answer: it doesn’t!

        • I am using 2 vcnl4000, i decide to use an 74HC4066AP, it is a high speed bilateral switch, with this devices you can enable from arduino only one vcnl4000 every time (for example every 10ms), regardless that both has the same addres. If you need to use it, I can send you my design by email. My email is: morellana2209@gmail.com I already with 3 vcnl4000 and my program works perfect.

  • I am using Microchip PIC MCU to communicate with this sensor. My code does not have a big difference with the example code. However, I cannot get a data ready when I try to read proximity. Does anyone else have the same problem?

  • The size of this sensor/breakout is important to my application (I’m trying to detect a ¾-inch wall, so I need the sensor to be pretty close to the ground.) As such, I’d like to know the size (length/width) of this breakout board… :) Specifically, I’d like to know if it is larger than this sensor from Adafruit. Thanks!

    • Don’t know about this board, but if you want the sensor to be really low, check out BV4241. A bit more expensive, but has a 3V3 regulator. The board measures 16x26mm, and the sensor’s holes are less than 5mm from the board edge.

  • Does this include an IR led, or does that need to be added?

    • There’s an IR LED inside the monolithic VCNL4000 package. There is a separate power source option (the IR+ pin on the breakout) so that you can turn the IR LED off when you don’t need it (though you could set the receiver to standby just as well).

  • Can you please put a regulator on the next rev. of this board like adafruit’s breakout for the same sensor?

    • Hi Adrian - There’s a ton of different types of applications out there and we like to provide the most basic breakout possible. A 3.3V regulator tends to hide the necessary requirements to get a given technology to work. In the case that you may be hooking this sensor up to a 5V micro, you’ll need 3.3Vs power as well as translation circuitry. In the case you want to attach the breakout to a 3.3V micro, we want to give you direct access.

      • Hi Nate: Basic is good. Adafruit is basic too: it does 3.3v like yours and level translation and 5v and it is the same price:

        “This sensor is easy to use with any microcontroller that has i2c capability. It is 5 volt compliant so you can use it with 3.3V or 5V logic with no risk of damage. There is an onboard 3.3V ultra low dropout regulator so you can power it with 3.3 to 5.0V. However, if you can give it 5.0V that is ideal since the VIN voltage powers the IR LED and the higher the voltage you can give it, the more powerful it is.”

  • According to the datasheet, at 200mA LED output, the proximity is given at about 18,000 counts for 4mm and 40,000 counts for 2mm. It’s logarithmic, and because I’m too lazy right now to check, the linear resolution would be 2mm / (22,000 counts) = 0.0001mm / count which seems very very absurd: if you moved the reflecting surface the thickness of a human hair, it would change by 825 counts.

Customer Reviews

No reviews yet.