Adafruit VCNL4040 Proximity and Lux Sensor - STEMMA QT / Qwiic

$8.50
Cashback: $0.26
  • 5 or more $8.08
  • 20 or more $7.23
  • Availability: 2

    Buy locally from a partner

    Country:
    Description

    The VCNL4040 is a handy two-in-one sensor, with a proximity sensor that works from 0 to 200mm (about 7.5 inches) and light sensor with the range of 0.0125 to 6553 lux.

    We've all been there. That thing is close but how close? When you need to measure a small distance with reasonable accuracy, such as the rough height of a particularly calm bumble bee, the VCNL4040 Proximity Sensor from Vishay can do that for you. If perchance you also needed to measure the amount of light at the same time, perhaps to let the bee to know if it's time for bed, you're in luck! The VCNL4040 can do that too (bumble bee not included, we tried putting it in the anti-static bag but it started buzzing in a threatening manner)

    "OK, finally I can get started on my bee measuring 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 VCNL4040 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 compatible STEMMA QT connectors for the I2C bus so you don't even need to solder! Just wire up to your favorite MCU and you can use our CircuitPython/Python or Arduino drivers to easily interface with the VCNL4040 and make approximate approximations of proximity in no time!

    To know more about STEMMA QT, watch this video:

    To give you some ability to tune your measurements for your situation, the VCNL4040 lets you adjust the integration time (how long light is being measured) to set the sensitivity of your measurements depending on the lighting conditions. With an integration time of 80ms, since the sensor only collects measurements for a short period, each measured bit of light represents a larger amount of light. For this reason, the maximum range in lux for the 80ms integration time is 6553.5 lux.

    If you use a longer integration time and get the same amount of light measurements "events", you know that there is comparatively less light because we're waiting around longer for light to show up and getting the same number, meaning the rate of light events is lower. For this reason, at the maximum integration time of 640ms the VCNL4040 will only measure up to 819.2 lux.

    It is also worth keeping in mind that as you increase the integration time you are also increasing the sensitivity and resolution within the measurement range

    In addition to adjusting the sensitivity of light measurements, you can change the current and duty cycle of the IR LED that powers the proximity detection to adjust how sensitive proximity measurements are.

    To learn more about this sensor, you can visit this page.

     

    Pinouts:

    • Power Pins
      • Vin - this is the power pin. Since the sensor chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
      • 3Vo - this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
      • GND - common ground for power and logic
    • I2C Logic Pins
      • SCL - this is the I2C clock pin, connect to your microcontroller's I2C clock line.
      • SDA - this is the I2C data pin, connect to your microcontroller's I2C data line
      • STEMMA QT - These connectors allow you to connect to dev boards with STEMMA QT connectors or to other things with various associated accessories
    • Other Pins
      • INT -This is the interrupt pin. You can set up the VCNL4040 to pull this low when certain conditions are met such as proximity or lux level thresholds being crossed.
    Warranty Period: 12 months
    Features
    • Features the VCNL4040 Proximity and Lux Sensor
    • Communicates via I2C
    • Comes with SparkFun Qwiic compatible STEMMA QT JST SH connectors
    Packing List
    • 1 x Adafruit VCNL4040 Proximity and Lux Sensor - STEMMA QT / Qwiic
    • 1 x Header pins

    Resources
    VCNL4040 Datasheet
    EagleCAD files on GitHub
    Q & A

    Ask a question

    Reviews
    • 5 out of 5
                    
    • 5
      100%
    • 4
      0%
    • 3
      0%
    • 2
      0%
    • 1
      0%
    Sort By: