Face Tracking Robot

January, 2012

Sparkfun published a great tutorial about building a face-tracking robot, and it inspired me to build one of my own.  I had been thinking about how to do robot vision for a while, and this tutorial helped put the pieces together for me.

My version of the robot uses the ServoCity SPT200 Pan & Tilt system mounted on top of a large project box.  Inside the project box is an Arduino Mega (overkill, but I had it lying around and decided to use it) with a custom shield I built using the Sparkfun Arduino Prototype shield.  The USB cable provides both power and data communication from a laptop which runs the control software.  Mounted on the Pan & Tilt system is a nice Logitec HD web cam with a USB connection and a nice grip-mount designed to mount onto the lid of a laptop.  I also mounted a small laser which I powered from the Arduino.  I have 2 switches on the back of the project box to control  power to the board, and power to the Laser.  For the Pan/tilt configuration, I used a pair of standard-sized Hitec analog servos with Karbonite gears for a good balance of strength and durability.

It’s probably not my best idea to mount a laser onto the platform that is designed to point at a face (due to safety reasons), but with proper aiming, the robot does a good job of hitting the target in the chest, which was my goal.  The extra switch for the laser is an extra safety measure I use when aiming and configuring the robot.

The software was what I was especially excited to dive into.  This was my first exposure to Intel’s OpenCV Processing Library, and I was really impressed.  I found it easy to use, and had a working prototype up and running quickly thanks to the Sparkfun tutorial.  That gave me confidence to tinker around with some of the other options and learn a bit more about the library.  The Arduino IDE is based on Processing, so I had only a minimal learning curve with the new development environment.

A drawback of the software is that I need to leave the camera feed size small in order to get good performance from the robot.  Running at higher resolutions require more horsepower than my laptop could provide.  It doesn’t look as impressive when demonstrating it, but it gets the job done.

Pictures:

423237_368489259844971_1653352789_n  Laptop connected to the robot

422777_368489156511648_899611947_n  Top view of the robot – you can see the control switches on the back.

426892_368489209844976_1896404103_n  Side view of the robot – you can see the laser mounted on the side.

422959_368489276511636_2019142175_n  Front view of the robot tracking its prey.

403112_368489359844961_863297312_n  Inside the project box – An Arduino Mega with a custom shield for connecting the servos, switches and laser.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s