• sales

    +86-0755-88291180

PAJ7620U2 Gesture Sensor User Guide

Introduction

PAJ7620U2 Gesture Sensor,gesture recognition function with general I2C interface into a single chip.
It can recognize 9 gestures including move up, move down, move left, move right, etc with a simple swipe of your hand.

Features

  • Based on PAJ7620U2 sensor, directly recognizes 9 basic gestures, supports gesture interrupt output
  • Embedded infrared LED and optical lens, be able to work in low-light even dark environment
  • I2C interface, requires only two signal pins to control
  • Onboard voltage translator, compatible with 3.3V/5V logic level

Specification

  • Operating voltage: 3.3V/5V
  • Communication interface: I2C
  • Recognition distance: 5cm ~ 15cm
  • Supported gestures: up, down, left, right, forward, backward, clockwise, anticlockwise, shake
  • Recognition rate: 240Hz
  • Recognition angle: 60° (diagonal)
  • Ambient light immunity: <100k Lux
  • Dimensions: 20mm × 20mm
  • Mounting hole size: 2.0mm

Interface

PINSYMBOLDescription
1VCC3.3V/5V
2GNDGround
3SDAI2C data pin
4SCLI2C clock pin
5INTExternal interrupt pin

How to use it

We provide demo codes for easy testing, you can download the demo codes from #Resources

Unzip the archive downloaded to get the codes.

Raspberry Pi

  • Insert the Micro SD card of Raspberry Pi to host PC.
  • Copy the RapberryPi folder to boot directory of the micro SD card.
  • Start your Raspberry Pi with the Micro SD card
  • You can find that the RaspberryPi codes are saved in the BOOT directory.
  • Copy the folder to home directory
sudo cp -r /boot/RaspberryPi/ ./
sudo chmod 777 -R RaspberryPi/
cd RaspberryPi



Install libraries
  • BCM2835:
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.64.tar.gz
sudo tar zxvf bcm2835-1.64.tar.gz
cd bcm2835-1.64
sudo ./configure
sudo make
sudo make check
sudo make install
  • Install wiringPi
sudo apt-get install git
sudo git clone git://git.drogon.net/wiringPi
cd wiringPi
sudo ./build
  • Install python
sudo apt-get install python-pip 
sudo pip install RPi.GPIO
sudo pip install spidev
sudo apt-get install python-imaging
sudo apt-get install python-smbus
sudo apt-get install python-serial
Enable I2C
sudo raspi-config
  • Choose Interfaceing Options -> I2C -> Yes
Hardware connection

The colors of wires may be different, please connect it according to the silk screen printing.

Gesture SensorRaspberry Pi (Board)Raspberry Pi(BCM2835)
VCC3.3V3.3V
GNDGNDGND
SDA3P2
SCL5P3


Run the codes
  • BCM2835 codes
cd ~/RaspberryPi/bcm2835/
cd Gesture
sudo make
sudo ./PAJ7620U2
  • wiringPi codes
cd ~/RaspberryPi/wiringPi
cd Gesture
sudo make
sudo ./PAJ7620U2
  • Python codes
cd ~/RaspberryPi/python
cd Gesture			
sudo python PAJ7620U2.py
Expecture result
  • Gesture detecting
  • Object detecting

STM32 examples

The STM32 examples is based on Waveshare XNUCLEO-F103RB whose chip is STM32F103RB, HAL libraries.

Hardware connection

Connect the sensor to STM32 board according the table, then connect USB to UART interface of XNUCLEO board to host PC.

Gesture SensorSTM32
VCC3.3V/5V
GNDGND
SDAPB9
SCLPB8


  • Open the project (STM32 demo codes) with Keil software
  • Compile it and program to board
Expectre result
  • Run serial assistance software, set bard rate to 115200
  • Gesture Detecting:
  • Obeject detecting:

Arduino

The demo codes provide is based on the Arduino UNO

Hardware connection
Gesture SensorArduino
VCC5V
GNDGND
SDASDA
SCLSCL


  • Open the codes by Arduino IDE
  • Compile and upload to Arduino Board
Expected result
  • Gesture detecting
  • Object detecting

TAG: 2.13inch e Paper HAT+ Black-White 250x122 E-Ink For Raspberry Pi /Jetson Nano /Sunrise X3 Pi /Pwnago Jetson Nano 1.54inch OLED ESP32 3.5 inch Capacitive TouchScreen LCD Display ST7796 FT6336 320x480 For Arduino/Raspberry Pi/Pico DeepsSeek XiaoZhi AI Voice Chat ESP32-S3 1.54 inch LCD Kit N16R8 WROOM-1-N16R8 DevKitC-1 Development Board ESP32-S3 7inch LCD Display 7 inch TouchScreen 7B 1024&amp;times;600 N16R8 CAN RS485 Sensor USB to I2C Magnetic Encoder Servo Motor 85KG.CM 12V/24V 360° RS485 High Precision And Large Torque Industrial grade isolated USB to RS232/485 converter supports USB to 2-way RS232 + 2-way RS232/485 original FT4232HL X1203 Raspberry Pi 5 UPS Board Uninterruptible Power Supply For Li-Battery (NOT includ) Raspberry Pi 5 PCIe To M.2 E KEY NGFF WIFI7 WIFI6 For BE200/AX210/AX200/RTL8822CE Raspberry Pi 5 Terminal RTL8852BE wireless network card Gigabit dual-band WiFi6 wireless module Standard Bluetooth 5.2 Raspberry Pi CM5 Mini Base IO Board NANO B Development For Compute Module 5 Raspberry Pi CM5 Official Original IO Board a Base Development Platform Compute Module 5 IO Board 240x240 Raspberry Pi 5 Cooling Raspberry Pi AI Camera Official Original 12MP IMX500 Intelligent visual Sensor On-Board RP2040 Raspberry Pi Prism Gyroscope Sensor Jetson Orin Nano/NX Super Developer IO Base Development Board Dual network RJ45 For Jetson Orin Nano/NX Module