top of page

Arduino based gesture Home Automation using APDS-9960

In this tutorial to learn the Arduino UNO Rev 3 based Gesture Home Automation using APDS 9960, will enable the user to use a Home Automation System using by hand for gesture. The gesture sensor sense the hand direction for Right to Left, Left to Right, Up to Down, Down to Up, Near to Rar, Far to Near. Arduino has an interface with APDS-9960 and 4 channel relay, These gesture commands to control the relay. The relay for controlling LED light by using HAND GESTURE. The output status is displayed through the LCD display.


Circuit diagram


Components Required

Arduino Uno - 1 no

APDS-9960 Gesture sensor- 1no


APDS9960 sensor

The APDS9960 sensor is a multi function sensor widely used in smart phones to provide a number of functions. The first use is recognition of swiping gestures as up, down, left or right depending on the movement of a user’s finger over the screen.


This sensor also provides proximity sensing which is used to detect when the phone is placed near the ear thereby disabling the touchscreen while attending to a call. The ambient light and RGB color detection feature is used to adjust the brightness and color balance of the phone’s backlight depending on lighting conditions.


There are six header pin connections namely;

  • VL – This an optional power supply for the IR LED. It is used when the PS jumper is removed and should have a voltage of 3.0 – 4.5V DC.

  • GND – Connection to ground of a microcontroller.

  • VCC – Power supply connected to 3.3V of the microcontroller.

  • SDA – I2C Data line.

  • SCL – I2C Clock line.

  • INT – Interrupt output active LOW. Output is open-collector so requires pull-up resistor and is connected to an interrupt input of a microcontroller when used.

The breakout board also has two solder jumper pads.

  • PS – This solder jumper comes closed by default and is used to connect the power supplies of the sensor and IR LED together therefore you only need to supply power to the VCC pin. However, if the jumper is open, you have to provide separate power supplies for VCC (2.4 – 3.6V) and VL (3.0 – 4.5V).

  • I2C PU – This is a 3-way solder jumper used to connect the I2C 10K pull-up resistors to the SDA and SCL line on the board circuits. The jumper is also closed by default but in case you want to use external pull-up resistors then you can open it.


APDS-9960 module Datasheet

Installing Library

To install the library navigate to the Sketch > Include Library > Manage Libraries… Wait for Library Manager to download libraries index and update list of installed libraries.


Arduino_APDS9960.h : you need to Download and install the Gesture library.


LiquidCrystal_I2C.h : you need to Download and install the LCD display library.


After installing the required libraries, copy the following code to your Arduino IDE.


Demo



bottom of page