You are on page 1of 8

(/) Let's Make ...

Featured (/featured/) Write an InstructableLogin (/account/login/) | Sign Up (/account/gopro)


(/about/create.jsp)

Classes (/classes/) Contests (/contest/) Forums (/community/?categoryGroup=all&category=all) Answers (/tag/type-question/?sort=RECENT)


(http://www.autodesk.com)

Teachers (/teachers/) advertisement

Resuelve problemas empresariales con metodologías de innovación. ¡Inicia hoy!


1 Design Thinking Workshop - Estudia en el Tec de Monterrey educacioncontinua.info

2 Watch The Demo Today Everything You Need - Nothing You Don't. SugarCRM Is Your Cure For CRM Bloatware. info.sugarcrm.com

Find out what can go wrong when weighing a sample and recording data manually.
3 From Paper to Digital - Download free Reference Paper mt.com/Reference+Paper/Balances

Tracking Cat Eyes Via Kinect by jgbradley1 (/member/jgbradley1/) in arduino (/technology/arduino/)

Download h (/id/Tracking-Cat-Eyes-via-Kinect/) 7 Steps .

 Collection I Made it!  Favorite  Share 


advertisement

Essential CRM Guide


Sameness is the enemy of
success. Download this guide
to rise above CRM status quo.

About This Instructable

License:
8 15.830 views Public
Domain
 113 favorites

jgbradley1
(/member/jgbradley1/)
(https://cdn instructables com/F8X/0VIS/HV3Q1HLI/F8X0VISHV3Q1HLI MEDIUM jpg)
(https://plus.google.com/1002526

Follow 12
(/member/jgbradley1/)
This instructable was made as part of the CS graduate course "Tangible
Interactive Computing" at the University of Maryland, College Park taught by
More by jgbradley1:
Professor Jon Froehlich. The course focused on exploring the materiality of
interactive computing and, in the words of MIT Professor Hiroshii Ishii, sought to
"seamlessly couple the dual worlds of bits and atoms. Please visit
http://cmsc838f-s14.wikispaces.com/ (http://cmsc838f-s14.wikispaces.com/) for
more details. (/id/Tracking-
Cat-Eyes-
This project involved the use of Microsoft Kinect and servo motors. Although a
via-Kinect/)
simple idea, you are guaranteed to get some reactions! As you probably
guessed from the title, the general idea behind this project was to use a Kinect
to track movement, and then use output from the Kinect to make cat eyes follow advertisement

people as they walk by.

Shopping List
1. Creepy Poster (we suggest a cat poster)
2. 2x 1 1/2" Wooden Balls
3. Paint
4. 2x Standard Servo TowerPro SG-5010 Motors
(http://www.adafruit.com/products/155)
5. 8xAA Batteries (battery case optional)
6. Arduino Uno
7. IC Breadboard
8. Microsoft Kinect
9. Hot Glue Gun

Step 1: Select a Poster and Cut Out Eyeholes

(https://cdn instructables com/FMP/1AAV/HV9FTNTC/FM

(https://cdn instructables com/F90/AER9/HV3Q1HGA/F9

Go out to the store and find your favorite poster/painting. For aesthetic reasons,
I recommend finding one that already has eyes printed on it. It will be easier to
trace and cut out.
Step 2: Paint Eyeballs

(https://cdn instructables com/F6E/3TSD/HV9FTS27/F6E3TSDHV9FTS27

Find some spherical object that will represent eyeballs. Anything round will work.
It is important to use round balls that are bigger than the cut out eye holes.
Otherwise, the eyeballs will not fill the hole and viewers will see behind the
poster. For my poster, 1 1/2" wooden balls were sufficient. These can be found
at most local craft shops. Grab some paint while you're there and paint on
eyeballs. For maximum impact, the paint color and and pupil shape should
match the figure before the eye holes were cut out. This will help the eyes blend
into the poster and seem realistic.

Step 3: Mount Eyeballs Onto Servo Motors

(https://cdn instructables com/FAT/MLUI/HV9FXG3B/FATMLUIHV9FXG3B MEDIUM jpg)


Once the eyeballs are dry, mount each eye on a servo. For a temporary solution
that won't ruin the motors, I recommend mounting them onto a motor horn first
(included in the Adafruit motor kit linked above) via hot glue gun. Then attach
the horn to the motor. Be sure the servos are in their normal state before gluing
the eyeballs on the horn. When mounted, the eyeballs should be oriented such
that they can rotate 90 degrees in either direction.

Step 4: Mount Motors on Back of Poster

(https://cdn instructables com/FTA/XXGB/HV3Q1HGB/FTAXXGBHV3Q1HGB MEDIUM jpg)

To mount the motors on the back of the poster, find some material that will act as
a platform. It should be light enough to hang on the back of the poster, yet sturdy
enough to withstand the weight of the motors and prevent any unwanted shifting
during motor operation. Something as simple as leftover styrofoam is sufficient.
Again, I recommend using a hot glue gun (see picture in previous step for a
closeup of mounting the motors).

Step 5: Circuit Setup

(https://cdn instructables com/FNO/KG6E/HV9FXWHJ/FNOKG6EHV9FXWHJ MEDIUM jpg)


(https://cdn instructables com/FDV/AOG5/HV3Q1H7S/FDVAOG5HV3Q1H7S MEDIUM jpg)

Now for the fun part! Since we need to power two servos at the SAME time, we
cannot rely on power from an Arduino alone. An external power source is
required for the motors. Each servo is rated to work at 4.8V - 6V. Therefore, a
12V power source (an 8 AA battery pack works well) for the motors should be
fine. If the motors were controlled one at a time, you could easily run both off of
the Arduino.

IMPORTANT NOTE: Although the Arduino will be run on a different power


source from the motors, it must still share a common ground (see circuit
diagram).

Step 6: (optional) Make a Cover to Prevent Background Light

(https://cdn instructables com/FPD/VZ7P/HV9FY6QJ/FPDVZ7PHV9FY6QJ MEDIUM jpg)

This is purely an optional step. To ensure that no additional light can be seen
around the edges of the eye hole cutouts (from the perspective of the front of the
poster), use napkins and tape to enclose the motor setup.
Step 7: Upload Code to Arduino and Run Kinect

Kinect Eyes - Somebody's Watching You!

Now for the final step. Programming! On the Arduino side, a Servo library
(http://arduino.cc/en/reference/servo) was used. This abstracts out most of the
details required to understand how servos truly operate.
Processing (http://processing.org/) was used to work with the Kinect, due to its
simplicity. Specifically, a processing library called simple-openni
(https://code.google.com/p/simple-openni/) was used to interface with the
Microsoft Kinect. Although not currently supporting as many verbose Kinect
features as other languages (i.e. C#, C++) and documentation is somewhat
lacking, it is a good choice to use as the only information we seek is basic
tracking information. There is sufficient amount of code examples by the author
to skim through as well.

Feel free to use the attached code as a starting point.

Now go out and have some fun with people!

NOTE: A better video will be posted soon

Arduino_Motor_Contr…
Download (https://cdn.instructables.com/ORIG/FGK/IO10/HV9FYCOJ/FGKIO10HV9FYCOJ.pde)
(https://cdn.instructables.com/ORIG/FGK/IO10/HV9FYCOJ/FGKIO10HV9FYCOJ.pde)

Kinect_Body_Tracker.i…
Download (https://cdn.instructables.com/ORIG/FF5/9G7V/HV9FYCOK/FF59G7VHV9FYCOK.ino)
(https://cdn.instructables.com/ORIG/FF5/9G7V/HV9FYCOK/FF59G7VHV9FYCOK.ino)

advertisement
Comments

We have a be nice comment policy.


Please be positive and constructive. w I Made it!  Add Images Post Comment

Corrugator Supercilii (/member/Corrugator+Supercilii/) 2014-05-25 Reply

This is information poor on execution, can anyone actually read this and
reproduce the same thing? How does the Kinect interface with the Arduino?
Look what I've made! Great for you! Can you tell us how exactly?

seattlegus (/member/seattlegus/) . Corrugator Supercilii


(/member/Corrugator+Supercilii/) 2014-08-13 Reply

I think the key detail missing from the article and the photos is that there's
a PC/laptop involved.

Kinect connects to a PC where the Processing program is running.

Arduino connects to that same PC via USB and waits for a sequence of
coordinates/commands that it receives via the serial connection.

Tecwyn Twmffat (/member/Tecwyn+Twmffat/) 2014-06-08 Reply

Can the kinect be programmed to detect certain animals eg a dog?

samalert (/member/samalert/) 2014-05-22 Reply

It cud have been done with single servo too without gears.

richard_johnson (/member/richard_johnson/) 2014-05-17 Reply

This is awesome!

I More Comments
Newsletter About Us
Let your inbox help you discover our best Who We Are (/about/)
projects, classes, and contests. Instructables Advertise (/advertise/)
will help you learn how to make anything! Contact (/about/contact.jsp)
Jobs (/community/Positions-available-at-Instructables/)
enter email I'm in!
Help (/id/how-to-write-a-great-instructable/)
Find Us Resources
Facebook (http://www.facebook.com/instructables) For Teachers (/teachers/)
Youtube (http://www.youtube.com/user/instructablestv) Residency Program (/pier9residency)
Twitter (http://www.twitter.com/instructables) Gift Premium Account (/account/give?sourcea=footer)
Forums (/community/?categoryGroup=all&category=all)
Pinterest (http://www.pinterest.com/instructables)
Answers (/tag/type-question/?sort=RECENT)
Google+ (https://plus.google.com/+instructables)
Sitemap (/sitemap/)

Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |


Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (https://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
© 2017 Autodesk, Inc.

You might also like