Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Reindeer with Artificial Intelligence - Raspberry Pi, Google AIY project

New improved Raspberry Pi Christmas reindeer powered by GoogleAIY

A few years ago I created a talking reindeer using a Raspberry Pi. This has served us for a few years with just a few minor tweaks, but since then Google AIY happened. Google AIY is a project home made DIY project using the Google Artificial Inteligence API (hence it's name AIY). It essentially allows you to add Google Voice Recognition and Google artificial intelligence to a Raspberry Pi project. I've already completed one project with Google AIY, using voice to control NeoPixel for voice activated mood lighting.

This time I decided to put the two together and add voice recognition to the reindeer.

The AIY kit I used came with The MapPi magazine, but it is now available to buy directly. I followed the instructions for the new version as this includes a new API, but needed to refer to the MagPi magazine for the switch connections as the type of swich has changed in the new version. See this link for details of the Google AIY voice kit.

First you need to decorate the reindeer head and solder up the LEDs, which is explained in the earlier project. Instructions to make your own Raspberry Pi powered reindeer head.

With the addition of the Google AIY circuit board there is support for buffered output, but as my existing LEDs were already wired up to a circuit board I continued to use the 7406 buffer. This was connected to the pins on the AIY circuit board as below.

7406    AIY PIN     LED

----    -------     ---   

1       gpio 26     Right 1

3       gpio 6      Right 3 (with light pipe)

5       gpio 13     Left 3 (with light pipe)

7       gnd

9       gpio 5      Left 2    

11      gpio 12     Right 2     

13      gpio 24     Left 1

This can be seen in the picture below

Upgrading the Reindeer to Google AIY and Raspberry Pi 3

I decided to use the new API which includes built-in voice control with OK Google activation. Unfortunately I can't find anyway to change it to respond to "OK Rudolph" at the moment, but it would be great if that can be added in future.

I added code to turn the LEDs on to show the status. This was done by first copying the supplied python file to and then editing that.

cd ~/AIY-voice-kit-python/src

I then added the following lines in the main code (after the imports):

from gpiozero import LED

led_l1 = LED(24)

led_l2 = LED(5)

led_l3 = LED(13)

led_r1 = LED(26)

led_r2 = LED(12)

led_r3 = LED(6)

Then at appropriate parts in the code (eg. where it prints "OK Google") use led_l1.on() or as appropriate.

This can be tested by using the Google AIY dev shell at ~/bin/ followed by src/ . It can be set to startup automatically using the code on the Google guide, but use instead of the demo filename.

There is a lot more that can be done using the Google API, but for now here is a quick demonstration of the Reindeer in action:

More information about the Raspberry Pi

See the guides and blog posts relating to the Raspberry Pi.

Previous Talking Reindeer
Talking Reindeer
Next RPi Robot
RPi Robot