The “Do-you-think-he-saurs”

Building a face-tracking Dinosaur with the AIY Projects Kits

Over the last few months I’ve been having a lot of fun with the Google AIY Projects Kits. First with the Voice Kit, putting together a retro-rotary phone Voice Assistant and a voice-controlled Magic Mirror, but more recently with the new Vision Kit, when I integrated it with the Voice Kit so that my magic mirror could recognise when you were looking at it, and respond.

An unmodified plushie dinosaur roams the desktop with his cyborg’ed cousin, the Do-you-think-he-saurs.

Gathering your Tools and Materials

For this project you’ll need a craft knife, scissors, a set of small wire snips, a soldering iron, solder, jumper wires, electrical tape, a cable tie or two, a needle and thread, some Sugru, heat shrink tubing, some small diameter wooden dowelling (or possibly plastic straws) and, of course, a plushie dinosaur.

The electronics of the ‘do-you-think-he-saurs.’

Assembling and Testing the Vision Kit

Putting together the new Vision Kit is somewhat simpler than the original kit with the addition of a pre-provisioned micro SD Card. So go ahead and plug the kit together following the instructions.

The core parts of the Vision Kit.
$ ssh pi@raspberrypi.local
pi@raspberrypi.local's password:
.
.
.
$ sudo systemctl stop joy_detection_demo.service
$ sudo systemctl disable joy_detection_demo.service
$ bin/AIY-projects-shell.sh
~/AIY-projects-python $ cd src/examples/vision
$ python ./face_detection_camera.py --num_frames 50
Iteration #0: num_faces=0
Iteration #1: num_faces=0
Iteration #2: num_faces=0
Iteration #3: num_faces=0
Iteration #4: num_faces=1
Iteration #5: num_faces=1
Iteration #6: num_faces=1
Iteration #7: num_faces=1
Iteration #8: num_faces=0
Iteration #9: num_faces=0
Iteration #10: num_faces=1
Iteration #11: num_faces=1
.
.
.
Iteration #49: num_faces=0
$

Adding and Controlling a Servo

Connecting a servo to the Vision Kit is fairly easy. Grab a small micro server, and then you can either snip the connector wires to separate them and solder connectors directly to the ends of the wires, or solder together a connector cable. Since I had the parts available, I went down the second route and built a break-out cable.

Micro Servo (top) and brake-out cable (bottom).
The pin out of the GPIO header (left) and Button Connector (right).

Face Tracking

Face tracking is a more-or-less out of the box experience with the AIY Projects software, we just have to grab the bounding box of the first detected face in the camera image and decide whether it is to the left, or to the right, of the center of the frame.

Moving my head around in the camera frame moves the servo left and right.

Powering Things with a Battery

It’s not going to be a particularly mobile dinosaur if it’s hooked up to a power adaptor, so it’s time to break out the batteries.

The AIY Projects Vision Kit attached to an Adafruit PowerBoost 1000C and Lithium Ion battery.

Our Dinosaur

Casting around for a good plushie, I came across a small blue Triceratops.

The original plushie.

Building a Cyborg Dinosaur

The first step is to make our dinosaur a lot less plush. Carefully cut around the neck seam, and remove all the stuffing. There will be far more than you might expect from such a small toy.

Removing all the stuffing from our plushie dinosaur.
Re-stuffing the body of the dinosaur with our electronics.
Replacing the right eye with the Raspberry Pi Camera Module.
Sewing the camera module into the head.
The ‘Do-you-think-he-saurs’.

The Completed ‘Do-you-think-he-saurs’

Hopefully the answer to whether our cyborg dinosaur saw us will be, “Yes!”

The completed Do-you-think-he-saurs next to an unmodified plushie.

This Dinosaur Will Catch Fire 🔥

Now obviously, all those electronics stuffed inside a very small dinosaur are going to generate a lot of heat. As it stands, the build is a bit of a fire hazard, and you should definitely not even think about charging the battery in-situ. That’s almost certainly going to be a step too far. But, I wanted something small, portable, and cute that I could use for five minutes at a time during conference talks. So for me, this was perfect. But, just this time, you should not follow along. If you do, you’re probably going to burn your house down.

Where Can I Buy it?

The AIY Projects Vision Kit is for sale in Target, both in store, and online. The Voice Kit costs $49.95, while the Vision Kit costs $89.95, and both kits now come with everything you need to get started — including a Raspberry Pi Zero WH and, for the Vision Kit, the Raspberry Pi Camera Module.

Scientist, Author, Hacker, Maker, and Journalist.