The Yorick Project

I like to decorate for Halloween, including various talking skeletons that I’ve set up over the years. For Christmas 2015, my wife gave me a great 3 axis talking skull with moving eyes so I could upgrade one of the skeletons from just a moving jaw skull. Then a friend suggested that there had to be other applications for the rest of the year. This got me thinking, and when I saw the Alexa Billy Bass I knew what I had to do, and the Yorick project was born. I’m pretty happy with the result:

Now, if you put this project together from scratch, it’s pretty expensive, due to the cost of the 3-axis talking skull, but if you are looking to re-purpose one you have, or a similar device, then you may want to develop a similar project. The key elements are the talking skull, a Raspberry Pi and the AlexaPi software for turning the Pi into an Alexa client device, the audio servo controller for turning the output sound into servo commands for the jaw, and the servo controller for controlling the nod, turn, tilt, and eye servos of the skull.

Block diagram for Yorick

Bench testing the set-up

The AlexaPi software provides output to two GPIO pins, intended to light up LEDs as the Pi hears the wakeup word, listens to the input, gets the response from the Amazon Alexa service, and then speaks the response. All the directions for AlexaPi are on the creator’s GitHub site. For this project, we also linked the same pins to input pins on the Maestro servocontroller. The Maestro I used allows pins to be used as output (primarily for servos, but also for other purposes) or as analog inputs. Other models also have digital input pins. By reading the status of the input pins, we know which state to be in, as there is a separate routine of head motions for inactive, wake, listen, get response, and speak response.

The servo sequences are developed using the GUI-based controller software provided by Pololu, and then custom control commands are added using their stack-based scripting language. The partial script is included at the end of the article. The short first section that is provided is the control code I wrote, the rest (not shown) are the automatically generated subroutines based on the sequences I defined using their GUI driven software.

The skull motions for each state are predefined and fixed (the routines are looped as needed for the typically longer lasting states (get response and speak response). The one key tip is to slow down the servos in order to look more realistic. The Maestro controller software lets you limit the speed and acceleration of each servo, and with the exception of the jaw servo, which had to have quick response to changing audio, I set both the speed and acceleration values to 20.

The audio servo driver board converts the audio put out by the Pi into servo commands for the jaw, while also passing the audio through to the powered speakers. Others have developed their own software do drive motor (rather than servo) based devices such as Billy Bass and Teddy Ruxpin, based on the amplitude of the sound. I’m sure the same could be done to drive the jaw servo by extracting the volume of the sound, but I already had an audio servo driver board that is otherwise unused except for Halloween, so I used that. (Update: I’ve since developed my own Raspberry Pi based audio servo controller and there’s also the Jawsduino project that uses an Arduino.)

3-axis talking skull with moving eyes

Raspberry Pi with Kinobo USB microphone

Audio servo controller board

Mini Maestro Servo Controller board

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I put it all in a project box, and covered the threaded rod supporting the skull with a short length of PVC pipe, painted black, to produce the final result:

Rather messy (mainly with the 5 servo cables), but it all fits in the box.

Hardware Components

  • 3-axis talking skull with moving eyes. Mine is from audioservocontroller.com
  • Powered speakers – The Raspberry Pi puts out very little volume from the audio jack, so you want amplified speakers, whether battery powered or from line current. I used an old pair of inexpensive computer speakers
  • Raspberry Pi 3 – Other models with WiFi should also work
  • Kinobo – USB 2.0 Mini Microphone – You need a microphone for input, and I was quite happy with the performance of this one, considering it only cost $5.25!
  • Pololu Mini Maestro Servo Controller – I used the 12 channel version, larger versions should also work.
  • Audio servo driver board – I used an ST-200 board from Cowlacious that I had for a Halloween project. That model has been replaced by the newer and improved ST-400 model, which should work fine. audioservocontroller.com also sells a similar board
  • Misc., including project box, LEDs (optional), resistors (optional, if LEDs used), breadboard (optional, if LEDs used), PVC pipe, and jumper wires.

Software Components

  • AlexaPi open source client software for Amazon’s Alexa service
  • Pololu’s Maestro Controller Software – I used the Windows version, but they have versions for Linux as well.
  • Custom script for the Maestro servo controller to control the skull. An excerpt to give you a feel for the scripting language is posted below. The full script I used is posted as a gist on Git Hub: https://gist.github.com/ViennaMike/b714fc2c9b7eaaaaff952175536a4942

 

begin     # Loop until input 9 goes high
  9 get_position # get the value of the red trigger, 0-255
  155 greater_than # test whether it is greater than 155 
  if      # Wakeup word detected, run wake movement sequence
    wake     
    750 delay
    1 # flag for getting out of loop
    begin
      dup
      while
      9 get_position
      10 get_position
      plus
      300 greater_than
      if     # If after wake, both inputs high, then getting reply
        think
      else
        9 get_position
        155 greater_than
        if     # if just input on 9 high, then speaking reply
          answer
        else
          10 get_position
          155 greater_than
          if   # if just input on 10 high, then listening to query
            listen
          else     # when both inputs at zero, back to rest mode
	    Rest
            1 minus
          endif
        endif
      endif 
    repeat
  endif
repeat

### Sequence subroutines: ###
# Sequence subroutines removed not included for brevity

47 thoughts on “The Yorick Project

  1. Pingback: Fear Alexa with this macabre talking skull voice assistant - CNET - Black Crow Advertising

  2. Pingback: Fear Alexa with this macabre talking skull voice assistant – CNET – G Email News

  3. Pingback: Fear Alexa with this macabre talking skull voice assistant – CNET | Tech Camp

  4. Pingback: Fear Alexa with this macabre talking skull voice assistant – CNET – Trending News

  5. Pingback: Fear Alexa with this macabre talking skull voice assistant – CNET

  6. This would be much better if you could silence the motors.

    Ideas:

    1. Wrap the motors in melamine foam (generic “Magic Erasers”). See “pro” version here:
    http://www.acousticalsurfaces.com/foam_stop/mel_comp.htm

    2. Noise cancellation (maybe impossible):
    https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=8766

    3. Quieter servos:
    http://forum.arduino.cc/index.php?topic=15296.0

    4. Isolate servos from skull to reduce skull vibration:
    http://www.societyofrobots.com/robotforum/index.php?topic=12565.0

  7. Pingback: Alexa Combined With an Animatronic Skull Is a Very Creepy Hack | completenews

  8. Pingback: Alexa Combined With an Animatronic Skull Is a Very Creepy Hack – Adventures Gate

  9. Pingback: Alexa Combined With an Animatronic Skull Is a Very Creepy Hack – Flash Jungle

  10. Pingback: Alexa Combined With an Animatronic Skull Is a Very Creepy Hack – VIPortal Tech

  11. Pingback: Alexa Combined With An Animatronic Skull Is A Very Creepy Hack | Gizmodo Australia

  12. Pingback: Alexa-enabled Robotic Skull Totally Reminds Us Of Crypt Keeper. Nice... - MIKESHOUTS

  13. Pingback: Alexa Combined With an Animatronic Skull Is a Very Creepy Hack - Alex Poucher

  14. Pingback: Video: Robottiharrastaja askarteli pääkallosta kaikkien aikojen aavemaisimman kotiapulaisen | LifeOfMen.org

  15. Pingback: Amazons Alexa mit Totenkopfschädel | Das Kraftfuttermischwerk

  16. Pingback: Alexa and Raspberry Pi power this talking skull assistant of nightmares – Emergenturd

  17. Pingback: Project Yorick: Ausgefallene Alexa-Version im Eigenbau

  18. Pingback: Amazon Alexa Dresses as Talking Skull for Halloween – Geek.com – What Happened Today?!?

  19. Pingback: Project Yorick « Fribliss

  20. Pingback: Life-Hack des Tages: Alexa durch einen Totenkopf sprechen lassen – LIMIT。FM

  21. Pingback: Project Yorick » KATHING

  22. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares | invtrade.net

  23. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares – Who Knew News

  24. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares - Bonjournal-best Hub of News

  25. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares - IT AND US

  26. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares

  27. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares - NewsFlog

  28. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares | Real News

  29. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares | Real News

  30. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares - News

  31. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares | NewsFo

  32. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares | The Real News

  33. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares | News.Rizlys

  34. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares - News

  35. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares – Hardcore Comedy Ent.

  36. Pingback: Man Turned An Alexa Into A Speaking Cranium That Is The Stuff Of Nightmares | firstlookathere.net

  37. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares | 7newz

  38. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares – Startling Imbecile

  39. Pingback: Animatronic Skull Brought to Life with Alexa, Amazon's Personal Assistant - RealClearLife

  40. Pingback: Man Turned An Alexa Into A Talking Skull That Is The Stuff Of Nightmares - AltoSkyAltoSky

  41. Pingback: Alexa mal etwas kreativer - Totenkopf antwortet brav auf Ansagen - Studiblog

  42. Pingback: AmazonのAIアシスタントAlexa、しゃべる頭蓋骨になる | NewsHub

  43. Pingback: Yorick 2.0: The Personality Split | The Aspiring Roboticist

  44. Pingback: ¡Ay, Pobre Yorick! Él No Ha De Amazon Prime – High Tech Newz

  45. Pingback: Yorick Becomes a Mimic: Wireless 3-Axis Skull Control via Motion Capture | The Aspiring Roboticist

Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 512 MB. You can upload: image, audio, video, document, spreadsheet, text. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop files here