Accéder au contenu principal
Publicités

How to add Hand gestures to your Arduino projects using PAJ7620

 

                Hello, and welcome, this fast 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 is not efficient (as you can see in the video) as the Thermal Imaging Arrays who can much detect complexe gestures they costs 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.

Parts

Wirings

Wiring 1

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

Wiring 2

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

Libraries

  • PAJ7620 Library: Download it here
  • LCD i²c New Liquid Library: Download it here, This library I’ve been using for years, maybe you can find an alternative or new one.

Codes

The first codes I’ve used are examples from the library.

The second code using the LCD i²c screen you can Download it here.

Test

The tests are straight forward, just plug 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.

Publicités

Yassine Tout afficher

Electronics, Automation engineering student... I try to share my little experience with other electronics amateur.

Répondre

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google

Vous commentez à l'aide de votre compte Google. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s

%d blogueurs aiment cette page :