Skip to content

How to add Hand gestures to your Arduino projects using PAJ7620



 

Hello and welcome, this tutorial is about the PAJ7620 Hand gestures sensor, it permits your hand gestures to be detected by the Arduino board, and then you can use it to control lights, robots (cool stuff), HMI, games… using IR LED and optical CMOS array, it can detect up to 15 gestures.

This one costs around 2-3$ only but it is not very precise (as you can see in the video) as the Thermal Imaging Arrays who can detect precisely complex gestures cost around 30-40$.

The gestures that can be detected are:

  • Right, Left, Up, Down, Forward, Backward,
  • Clockwise, Anti clockwise,
  • and waving.

Those are the basic 9 then you can add:

  • Right-Left, Left-Right,
  • Up-Down, Down-up,
  • Forward-Backward, Backward-Forward (Check the video to know the differences).

There are two ways of detecting:

  •  Near, which is on 5-15 cm distance with 60° angle
  •  Far, on 15-30 cm distance with 30° angle

For this project I’m gonna interface it with Arduino Uno board, and I’ll use a LCD i²c screen to show the gesture detected, using this method you can adapt it to whatever project you’re working on.

Hardware and parts



Wirings

Wiring 1: Basic wiring of the module

Wiring 1
Direct wiring, the module uses i²c interface

Wiring 2: Adding LCD i2c

Wiring 2
I add a LCD i²c screen, to show that the code can be adapted to other things easily

Libraries

Please pay attention, the libraries in Github get constantly modified and may not work with old versions of Arduino IDE, chose to either keep up or use the library I provided. I may do a review for these codes in the future.

Codes

Code 1: Library example – paj7620_9gestures


 



Code 2: Library example – paj7620_15gestures

Code 3: Using LCD i2c

You can Download it here.

Test

The tests are straight forward, just wire the module, plug the Arduino, upload the code, open the serial monitor and start moving your hands.

T1
Test using the serial monitor

 

T2
Using the LCD i²c



Overall the module performances are not bad for 2$, sometimes it can be tricky when detecting the Forward gesture, you can check the code to actually find that it can be confused with other gestures, you can always modify the detection speed for all and for the forward&backward alone:

C1

Also make sure the module is on a flat surface, otherwise the clockwise anti-clockwise gestures won’t be detected, and make sure you have enough space for you hand to move.

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

One thought on “How to add Hand gestures to your Arduino projects using PAJ7620 Leave a comment

Leave a Reply to AB TECHNOLOGIESCancel reply

Discover more from SURTR TECHNOLOGY

Subscribe now to keep reading and get access to the full archive.

Continue reading