Jetson Nano Face Follower

by Neur0tek in Circuits > Linux

4160 Views, 5 Favorites, 0 Comments

Jetson Nano Face Follower

jetsonFace.png
negif.gif
Capture d’écran 2019-08-30 à 10.51.06.png

This is just a quick proof of concept , there is still a lot of improvements to do in order to have it to work faster.
( This is my first tutorial , any feedback would be valued ! )

Supplies

-Nvidia Jetson Nano

-SD Card 64go

-Pi Camera v2 (IMX219 sensor)

-Adafruit PCA9685

-Power supply 5V 4A

- MG90S Servo

- Inmoov Eyes mechanism

Wiring

PCA Jetson
GND <----> GND

OE <----> NC

SCL <----> SCL (PIN 28)

SDA <----> SDA (PIN 27)

Vcc <----> 3.3V

V+ <----> NC

Connect MG90S servo to Channel 0 of the PCA9685

Installation

First install the dependencies :

sudo apt-get install python-smbus

sudo apt-get install i2c-tools

sudo apt-get install python3-dev

sudo pip install adafruit-pca9685

sudo pip install imutils

Add User to the I2c Group

Capture d&rsquo;écran 2019-06-27 à 20.55.21.png

sudo usermod -a -G i2c username
sudo reboot

Check that your user is into the i2c group with the command groups

Verify If the PCA9685 Board Is Detected

i2cdetectv2.png

i2cdetect -y -r 0

/!\ be sure to select the correct i2c bus on your nano /!\

The device should be detected as 0x40

Download the Code and Try It !

You can download the source code directly from my github : https://github.com/Neur0tek/Jetson-Face-Follow

Open a terminal and launch the script ( replace WIDTH and HEIGHT with the desired values):

python3 JetsonCvPCA.py WIDTH HEIGHT

Extra

You can add a led on channel 0 of the adafruit PWM driver , it will light up depending on your position !

3DPrint the eyes mechanisme from the Inmoov robot and use the code to drive the mg90s servo