This is the VCNL4200 a highly sensitive long distance proximity IR and ambient light sensor (ALS) on i2C designed by VISHAY SEMICONDUCTORS. This device is pack into package that combined IRED and ALS Photodiodes, amplifiers, and analog to digital converting circuit into a single CMPS process. This device integrates 16bit high resolution ALS offers excellent sensing capabilities with sufficient selections to fulfill most applications whether a dark or high transparency lens design.

The VCNL4200 offers individual programmable high or low threshold interrupt features for the best utilization of resources and power saving on the microcontroller. For the 12bit and 16bit proximity sensing function this device has a built in smart cancellation scheme that eliminates background light issues and prevents false sensing of proximity due to ambient light noise the adaption of the FILTRON technology achieves the closest ambient light spectral sensitivity to real human eye responses.

VCNL4200 provides excellent temperature compensation for keeping the output stable. ALS (Ambient Light Sensor) and PS (Proximity Sensor) functions are both operated via i2C protocol and range of detection up to 1.5 meter & runs at 2.5v to 3.6v. The ALS (Ambient Light Sensor) has a selectable maximum detection range of 137/393/786 / 1573 LUX with a highest sensitivity of 0.003 LUX/STEP.

The VCNL4200 can be used in human presence detection, home and office appliance like printers, lightning, photocopier, robotics, collision detection, public buildings, home automation, building automation, automotive, parking space, clinical and laboratory appliances. Etc. Below example uses Arduino NANO. However it supports ESP8266, STM32, and AVR. For further readings please refer to datasheet bellow.

VCNL4200

Required Components

  • Arduino IDE | Atmel Studio | Energia 
  • Arduino PRO, FIO, NANO, UNO, MINI, MEGA, PRO MINI, LEO, BT, DUE, ETHERNET,LILYPAD, NodeMCU, Teensy Board, TeensyDuino, ESP8266 12, 12E, ESP32, LinkItOne, ESP8266 NodeMCU, ESPDuino, ATMEGA328 16/12, ATMEGA32u4 16/8/ MHz, ESP8266, MSP430 ,ATMEGA250 16 MHz, ATSAM3x8E,  Note: The Diagram below is using NANO. (please refer to each MCU’s respective pin-outs & bus configurations)
  • VCNL4200 Infrared Proximity & Light Sensor
  • Capacitor (See below required values)
  • Resistors (See below required values)
  • P-Channel MOSFET
  • Jumper Wire (Optional)
  • Prototyping Board (This is optional you can just hookup directly to the MCU)
  • PCB Designer (Circuit simulation to PCB Layout)

Wiring Guide

Source Code

Downloads

Wiring the VCNL4200 Infrared Proximity / Ambient Light Sensor
Facebooktwitterredditpinterestmail
Tagged on:                 

JLCPCBPCBgogoPCBway4pcb

One thought on “Wiring the VCNL4200 Infrared Proximity / Ambient Light Sensor

  • at
    Permalink

    Hi,
    I am using the same library to test VCNL4200 board using Arduino Mega2560. The ALS register is changing the value as light conditions vary but proximity is 0 continuously.
    I will be thankful if anyone can help.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *