Difference between revisions of "PAJ7620U2 Gesture Recognition Sensor SKU: CQRSENSS001"
(Created page with "=='''Description'''== I am a gesture recognition module based on PAJ7620U2, which can directly recognize 9 basic gestures, supports I2C interface, and is compatible with 3.3V/...") |
(→STM32 Application) |
||
(28 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[File:CQRSENSS001.jpg|thumb|200px|right|PAJ7620U2 Sensor]] | ||
=='''Description'''== | =='''Description'''== | ||
I am a gesture recognition module based on PAJ7620U2, which can directly recognize 9 basic gestures, supports I2C interface, and is compatible with 3.3V/5V level. | I am a gesture recognition module based on PAJ7620U2, which can directly recognize 9 basic gestures, supports I2C interface, and is compatible with 3.3V/5V level. | ||
Compared with APDS-9960 and other solutions, I have faster recognition speed, higher accuracy, more gesture recognition, and stronger anti-interference, which is suitable for low-power application scenarios such as smart home and robot interaction. | Compared with APDS-9960 and other solutions, I have faster recognition speed, higher accuracy, more gesture recognition, and stronger anti-interference, which is suitable for low-power application scenarios such as smart home and robot interaction. | ||
+ | ---- | ||
+ | =='''Specificationn'''== | ||
+ | '''3D Gesture Sensor Specifications''' | ||
+ | *Operating Voltage: 3.3V/5V | ||
+ | *Communication Interface: I2C | ||
+ | *Recognition Distance: 5cm to 15cm | ||
+ | *Supported Gestures: up, down, left, right, forward, backward, clockwise, anticlockwise, shake. | ||
+ | *Recognition Rate: 240Hz | ||
+ | *Recognition Angle: 60 Degree (diagonal) | ||
+ | *Ambient Light Immunity: Less Than 100k Lux | ||
+ | *Dimensions: 23.14mm * 27.76mm | ||
+ | *Mounting Hole Size: 3.0mm | ||
+ | '''Ocean Interface Cable Specifications''' | ||
+ | *Cable specifications: 22AWG | ||
+ | *Material: Silicone | ||
+ | *Withstand Voltage: Less Than 50V | ||
+ | *Withstand Current: Less Than 1000MA | ||
+ | *Length: 21cm | ||
+ | *Line Sequence: Black-Negative Power Supply, Red-Positive Power Supply, Green-SDA, Blue-SDA, Yellow-INT. | ||
+ | [[image:CQRPAJ7620U2-A-2.jpg|thumb|1000px| center]] | ||
+ | ---- | ||
+ | =='''DataSheet '''== | ||
+ | [[Media: PAJ7620U2 General Datasheet.pdf]] | ||
+ | ---- | ||
+ | =='''Raspberry Pi Application '''== | ||
+ | *Insert the Micro SD card of Raspberry Pi to host PC. | ||
+ | *Copy the Rapberry Pi folder to boot directory of the micro SD card. | ||
+ | *Start your Raspberry Pi with the Micro SD card | ||
+ | *You can find that the Raspberry Pi codes are saved in the BOOT directory. | ||
+ | |||
+ | [[File:CQRSENSS001-1.jpg|600px]] | ||
+ | |||
+ | *Copy the folder to home directory | ||
+ | <pre> | ||
+ | sudo cp -r /boot/RaspberryPi/ ./ | ||
+ | sudo chmod 777 -R RaspberryPi/ | ||
+ | cd RaspberryPi | ||
+ | </pre> | ||
+ | |||
+ | [[File:CQRSENSS001-2.jpg|400px]] | ||
+ | |||
+ | '''Install libraries''' | ||
+ | *BCM2835: | ||
+ | <pre> | ||
+ | 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 | ||
+ | </pre> | ||
+ | *Install wiringPi | ||
+ | <pre> | ||
+ | sudo apt-get install git | ||
+ | sudo git clone git://git.drogon.net/wiringPi | ||
+ | cd wiringPi | ||
+ | sudo ./build | ||
+ | </pre> | ||
+ | *Install python | ||
+ | <pre> | ||
+ | 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 | ||
+ | </pre> | ||
+ | |||
+ | '''Enable I2C''' | ||
+ | <pre> | ||
+ | sudo raspi-config | ||
+ | </pre> | ||
+ | *Choose Interfaceing Options -> I2C -> Yes | ||
+ | |||
+ | '''Hardware Connection''' | ||
+ | |||
+ | The colors of wires may be different, please connect it according to the silk screen printing. | ||
+ | |||
+ | [[File:CQRSENSS001-5.jpg|400px]] | ||
+ | |||
+ | [[File:CQRSENSS001-6.jpg|600px]] | ||
+ | |||
+ | '''Download and Run the Test Examples''' | ||
+ | |||
+ | [[Media: PAJ7620U2 Gesture Recognition Sensor-Raspberry Pi.rar]] | ||
+ | |||
+ | '''Run the codes''' | ||
+ | *BCM2835 codes | ||
+ | <pre> | ||
+ | cd ~/RaspberryPi/bcm2835/ | ||
+ | cd Gesture | ||
+ | sudo make | ||
+ | sudo ./PAJ7620U2 | ||
+ | </pre> | ||
+ | *wiringPi codes | ||
+ | <pre> | ||
+ | cd ~/RaspberryPi/wiringPi | ||
+ | cd Gesture | ||
+ | sudo make | ||
+ | sudo ./PAJ7620U2 | ||
+ | </pre> | ||
+ | *Python codes | ||
+ | <pre> | ||
+ | cd ~/RaspberryPi/python | ||
+ | cd Gesture | ||
+ | sudo python PAJ7620U2.py | ||
+ | </pre> | ||
+ | |||
+ | '''Expecture Result''' | ||
+ | *Gesture detecting | ||
+ | |||
+ | [[File:CQRSENSS001-8.jpg|400px]] | ||
+ | |||
+ | *Object detecting | ||
+ | |||
+ | [[File:CQRSENSS001-10.jpg|400px]] | ||
+ | ---- | ||
+ | =='''Arduino Application '''== | ||
+ | |||
+ | The demo codes provide is based on the Arduino UNO | ||
+ | |||
+ | '''Hardware Connection''' | ||
+ | |||
+ | [[File:CQRSENSS001-11.jpg|400px]] | ||
+ | |||
+ | [[File:CQRSENSS001-12.jpg|600px]] | ||
+ | |||
+ | '''Download and Run the Test Examples''' | ||
+ | |||
+ | [[Media: PAJ7620U2 Gesture Recognition Sensor-Arduino.rar]] | ||
+ | |||
+ | *Open the codes by [https://www.arduino.cc/en/software Arduino IDE] | ||
+ | *Compile and upload to Arduino Board | ||
+ | |||
+ | '''Expected Result''' | ||
+ | |||
+ | *Gesture detecting | ||
+ | |||
+ | [[File:CQRSENSS001-13.jpg|500px]] | ||
+ | |||
+ | *Object detecting | ||
+ | |||
+ | [[File:CQRSENSS001-15.jpg|500px]] | ||
+ | ---- | ||
+ | =='''STM32 Application '''== | ||
+ | |||
+ | The STM32 examples are based on Waveshare XNUCLEO-F103RB whose chip is STM32F103RB, HAL libraries. | ||
+ | |||
+ | '''Hardware Connection''' | ||
+ | |||
+ | Connect the sensor to the STM32 board according to the table, then connect the USB to UART interface of the XNUCLEO board to the host PC. | ||
+ | |||
+ | [[File:CQRSENSS001-16.jpg|400px]] | ||
+ | |||
+ | '''Download and Run the Test Examples''' | ||
+ | |||
+ | [[Media: PAJ7620U2 Gesture Recognition Sensor-STM32.rar]] | ||
+ | |||
+ | *Open the project (STM32 demo codes) with Keil software | ||
+ | *Compile it and program to board | ||
+ | |||
+ | '''Expectre Result''' | ||
+ | |||
+ | *Run serial assistance software, set baud rate to 115200 | ||
+ | *Gesture Detecting: | ||
+ | [[File:CQRSENSS001-17.jpg|600px]] | ||
+ | *Obeject detecting: | ||
+ | [[File:CQRSENSS001-18.jpg|600px]] | ||
---- | ---- |
Latest revision as of 16:18, 19 January 2022
Contents
Description
I am a gesture recognition module based on PAJ7620U2, which can directly recognize 9 basic gestures, supports I2C interface, and is compatible with 3.3V/5V level. Compared with APDS-9960 and other solutions, I have faster recognition speed, higher accuracy, more gesture recognition, and stronger anti-interference, which is suitable for low-power application scenarios such as smart home and robot interaction.
Specificationn
3D Gesture Sensor Specifications
- Operating Voltage: 3.3V/5V
- Communication Interface: I2C
- Recognition Distance: 5cm to 15cm
- Supported Gestures: up, down, left, right, forward, backward, clockwise, anticlockwise, shake.
- Recognition Rate: 240Hz
- Recognition Angle: 60 Degree (diagonal)
- Ambient Light Immunity: Less Than 100k Lux
- Dimensions: 23.14mm * 27.76mm
- Mounting Hole Size: 3.0mm
Ocean Interface Cable Specifications
- Cable specifications: 22AWG
- Material: Silicone
- Withstand Voltage: Less Than 50V
- Withstand Current: Less Than 1000MA
- Length: 21cm
- Line Sequence: Black-Negative Power Supply, Red-Positive Power Supply, Green-SDA, Blue-SDA, Yellow-INT.
DataSheet
Media: PAJ7620U2 General Datasheet.pdf
Raspberry Pi Application
- Insert the Micro SD card of Raspberry Pi to host PC.
- Copy the Rapberry Pi folder to boot directory of the micro SD card.
- Start your Raspberry Pi with the Micro SD card
- You can find that the Raspberry Pi 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.
Download and Run the Test Examples
Media: PAJ7620U2 Gesture Recognition Sensor-Raspberry Pi.rar
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
Arduino Application
The demo codes provide is based on the Arduino UNO
Hardware Connection
Download and Run the Test Examples
Media: PAJ7620U2 Gesture Recognition Sensor-Arduino.rar
- Open the codes by Arduino IDE
- Compile and upload to Arduino Board
Expected Result
- Gesture detecting
- Object detecting
STM32 Application
The STM32 examples are based on Waveshare XNUCLEO-F103RB whose chip is STM32F103RB, HAL libraries.
Hardware Connection
Connect the sensor to the STM32 board according to the table, then connect the USB to UART interface of the XNUCLEO board to the host PC.
Download and Run the Test Examples
Media: PAJ7620U2 Gesture Recognition Sensor-STM32.rar
- Open the project (STM32 demo codes) with Keil software
- Compile it and program to board
Expectre Result
- Run serial assistance software, set baud rate to 115200
- Gesture Detecting:
- Obeject detecting: