You are on page 1of 4

How to Build a FaceTrackNoIR HAT for under 10

By Newboerg
1. Needed Hardware:

Some kind of Arduino compatible Microcontroller Board

Img. 1: In this Guide i use a Cheap China Arduino Clone called Pro Micro

An MPU-6050 Breakout Board

Img. 2: This is the one i used

Some wires

A Breadboard or something to put your Circuit on

2. Needed Software:

Arduino Software ( I used Ver. 1.0.5)

FaceTrackNoIR (I Used Ver. 1.7)

HATIRE Facetrack Plugin (https://sourceforge.net/projects/hatire/ )

GY521 Arduino Sketch (https://sourceforge.net/projects/gy512forfacetracknoir/files/)

3. Preparing your Computer

Install the Arduino Software

Install FaceTrack

Put the HATIRE Plugin into the Facetrack folder

4. Assembly of your HAT

Img. 3: Complete Assembly in Comparison to a 5 ct coin

Connect the MPU VCC to Arduino 5V

Connect the MPU GND to Arduino GND

Connect the MPU SDA to Arduino 2

Connect the MPU SCL to Arduino 3

Connect the MPU AD0 to Arduino GND

5. Programming of the Microcontroller

Start the Arduino Software

Go to Tools Board Arduino Leonardo

Load up the Programm Sketch

Go to Tools Serial Port COMx( Port of your Arduino)

Click File Upload

6. Configure FaceTrack

Start FaceTrack

Select Tracker Source Hatire Arduino

Select Arduino Com Port (Same as in Arduino Software before)

Choose which axis does what ( For me it was Yaw=RotX Pitch=RotY)

Disable Filter

Set Smoothing to 15

Click Start

Point the Device straight ahead and Press Home to Center it.

Finished, you should now be able to use your Cheap HAT :)

7. Help

If you need Help with this just contact me via Skype (newboerg)
or Jabber (Benni@newboerg.de)
But put Help with Facetrack in your contact message or ill ignore you

8. Credits
I do not take any credit in the development of these programs, you should thank the
developers of the used Software for their neat little tools

EDIT:
ATTENTION:
It it Important NOT to move the sensor for several seconds after it powers up.
Otherwise you will have some small to severe lag on your Z-Axis
EDIT2:
OK, for the ones having constant drift problems try the following:
search for:
hat.gyro[2]=angle_z;
inside the arduino sketch file and change it to
hat.gyro[2]=angle_z*0.988;
where 0.988 is the value needed to correct the drift you might need to up or down it a bit with
your setup

You might also like