GithubHelp home page GithubHelp logo

vcnl36687's Introduction

VCNL36687 Arduino library

Arduino library for the VCNL36687 proximity sensor by Jainam Mehta

Sensor description

VCNL36687S by Vishay Intertechnology, Inc is a fully integrated proximity sensor that combines a high power vertical-cavity surface-emitting laser (VCSEL), a photodiode, a signal processing IC, and a 12-bit ADC in a single package. The new VCNL36687S is designed to be used in smartphones, tablets, virtual reality / augmented reality (VR / AR) headsets and other battery-operated devices.

Through its standard I2C bus serial digital interface, the VCNL36687S allows easy access to the proximity signal. Its programmable interrupt function offers wake-up functionality for the microcontroller when a proximity change occurs, which reduces processing overhead by eliminating the need for continuous polling.

Compared to previous generation devices, the VCNL36687S requires less energy to carry out the same functionality; with a 20 mA pulse current, the VCNL36687S can detect a Kodak Gray Card at a distance of 20 cm, where previous VCNL series devices required 200 mA of current.

Usage

This library supports I2C commmunication with the VCNL36687, 2 pins are required to interface

Installation

Use the Arduino IDE Library Manager or simply download this library into your Arduino/libraries folder.

Proximity sensing

The proximity sensor has a range of approximately 20 cm (or 7.9 in.)

Example list

  • Proximity: demonstrates declaring an VCNL36687 object, initializing the sensor and reading data from the proximity sensor

Hardware

Please refer to the VCNL36687 datasheet and your microcontroller's pinout diagram. This library was developed using the VCNL36687S Sensor Evaluation Board from Vishay Semiconductors. And it tested ESP32 with MIKROE-3439.

Wiring and I2C

The VCNL36687 pins should be connected as:

  1. GND: ground
  2. VPP: 1.65V to 1.95V power source
  3. VDD: 1.65V to 1.95V power source
  4. VCSEL_A: 2.68V to 4.8V power source
  5. VCSEL_C: ground
  6. INT: (optional) connect to interruptable pin on microcontroller
  7. SDA: connect to SDA
  8. SCA: connect to SCL

Addtional resistors (2.4 kΩ to 10 kΩ) should be used as pullups on SCL and SDA.

Compatibility

This library has been tested with:

  • Arduino Uno
  • nRF52 Development Kit from Nordic
  • ESP32

vcnl36687's People

Contributors

mehtajainam avatar mmt-10 avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

immi0 qifeng0419

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.