I thought I'd make Furby a little less annoying and give him an upgrade with a real brain. Step aside, Scarecrow.
By combining a Raspberry Pi Zero W (a tiny computer), Amazon's (mostly) open-source Alexa Voice Service software, and a few other electrical components, I converted my normal Furby into an Amazon Echo.
I give you: Furlexa.
It is my hope that you can either use this guide as a fun read or to build your own Furby Echo -- I tried to write it in a style that any crowd would enjoy and I hope that I accomplished that goal.
I created a video that demonstrates Furlexa and briefly explains what I did -- the rest of the guide (below) contains more details on my build, so be sure to check out both. :)
As the prophecy prophesizes, first a completed photo! Here's Furby with his fur and carapace (bug-like exoskeleton) removed. Here you can see the Raspberry Pi Zero computer that makes Furlexa possible.
Furby is a pretty amazing piece of technology, especially considering it's nearly 20 years old -- and when I was a kid, it was a magical, mysterious thing. Furby was released by Tiger Electronics in 1998 and quickly became the toy of the holiday season, demanding insane prices on eBay and even being banned from NSA property over concerns that it could be used to spy on the United States.
".. less than a foot high, covered with red and orange fur, with watchful eyes and big ears." - NSA
In the NSA's words, the spy was described as being "less than a foot high, covered with red and orange fur, with watchful eyes and big ears". Of course, these concerns were unfounded since Furby has no ability to record anything, and its microphone is a piece of crap.
Anyways, in case you missed out on it due to age or interplanetary habitation, Furby could "learn" to speak English by being exposed to other Furbies as well as other noises (read: humans). It basically sits around and becomes extremely annoying, chiming in to distract you at every opportunity. It could "communicate" with other Furbies via an infrared sensor, which was pretty revolutionary at the time, and would "sleep" when its light sensor told it that it was dark. It also sang... So, yeah.
You can actually still find furbies for sale and they aren't too expensive. Though it's probably not the best time to buy them if you're looking for an investment—they aren't exactly the hottest toy of this year's holiday season.
Furby is comprised of a few primary components -- a microprocessor covered in black resin (to protect Tiger Electronics' intellectual property), infrared and light sensors, microphone, speaker, and -- most impressively -- a single motor that uses an elaborate system of gears and cams to drive Furby's ears, eyes, mouth and rocker. A cam position sensor (switch) tells the microprocessor what position the cam system is in. By driving the motor at varying speeds and directions and by tracking the cam position, the microprocessor can tell Furby to dance, sing, sleep, or whatever. Pretty cool.
This is what piqued my interest -- though the microprocessor isn't worth messing around with (especially when covered with the obfuscated blob of resin), it would be easy to install a small Raspberry Pi computer inside of Furby, use it to run Alexa, and then track Alexa's output to make Furby move.
The infrared and light sensors are an interesting development as well; I decided not to do anything with them for this project, but they're still there for enhancing Furlexa in the future. ;) For example, I could tell Alexa to turn my TV on, and use Furby's infrared emitter to send out the appropriate controller IR code. Anyways, I'm going to keep it simple for now.
For my Furby hacking project, I replaced the original CPU and related circuitry with a Raspberry Pi Zero W.
Speaker and microphone
I upgraded Furby's sound input and output (I/O) with a USB microphone and a small amplifier and speaker. To save space, I soldered the amplifier board directly to the Pi's GPIO (general-purpose input/output) pins. The new speaker lives where the original one did. The original speaker sucks.
A small motor control driver/board is connected to the Pi's GPIO pins and is used to control Furby's original DC motor and gearbox. When Alexa speaks, so does Furby! Since the Pi doesn't supply enough voltage or current to power the motor, the motor itself is powered by Furby's original battery pack.
Cost & complexity
I spent about $50 on the materials for this project, including Furby himself (about $15 on eBay). This guide is not overly complex -- all you need is some light soldering and the ability to Google things (like how to solder).
This was probably my longest-running project -- I worked on it on and off for a year, struggling through many setbacks (and Furbies). Furby's small size was the biggest limitation. I always knew I'd use a Raspberry Pi Zero but the Raspberry Pi Zero W (wireless) version didn't exist when I started -- and WiFi is needed for this project. Luckily, it was released midway, so this solved many, but not all, of the issues.
If I were to build Furlexa now, however, it would only take a few hours. :)
For obvious reasons, Furby's OEM processor isn't capable of running any version of Linux that I could use to integrate the Amazon Alexa Voice Service. Also, it's covered in a blob of black resin to make it harder to even identify.
There's not a lot of space in there. My original circuitry (pictured) took up a lot of space and I wanted Furby to look completely normal from the outside. This was what I originally needed to fit:
A Raspberry Pi Zero
A wifi dongle/USB hub (I found an all-in-one wifi dongle + USB hub)
A small audio circuit (amplifier + USB hub)
A DC motor driver to allow the Pi to power the motor
A USB audio adapter since the Pi Zero has no audio jack
A small microphone
Solution: Thankfully, midway through my project the wireless version of the Pi was released. Also, Pimoroni released the Speaker pHAT, a slim mono amplifier/speaker combo. This eliminated most of my original circuit. Honestly, HATs allow you to make some awesome things. Check out our list of the Best Hats for your next Pi project to give you some ideas.
NOTE: Pimoroni has discontinued this particular Speaker pHAT and has replaced it with the Pimoroni Pirate Audio Mini Speaker. This should work exactly the same throughout the setup process.
As you may have seen in my video, Furby's gearbox is pretty loud -- and it's hard to fit a tiny but super loud speaker in there. A single motor drives a series of gears and cams to operate every part of his body. That's a lot of plastic mashing around in there.
Solution: Lubricate his gearbox using nonconductive lubricant. Also, accepting the limitations of what I'm trying to do here. :)
Amazon AVS only officially supports sound output through the Raspberry Pi 3's 3.5mm audio jack or HDMI. I'm using an amplifier attached to the Pi's header instead. In fact, AVS doesn't officially support the tiny Raspberry Pi Zero at all.
Solution: Lots and lots of hacking. Also learning tons about Advanced Linux Sound Architecture (ALSA), which I would not recommend exploring recreationally. This led me to the following to get AVS working with the Speaker pHAT:
I got a little overzealous trimming things and accidentally clipped off a tiny lever that keeps the gearbox from committing suicide. I tried to fix it, but Furby's gearbox is comprised of a series of gears, cams, and levers. It was like trying to reassemble a clock.
Solution: Order a new Furby. Also, not do that thing I said.
Furlexa was complete. I ran my final test and the speaker started getting super hot. The amplifier board was shorting against the Pi somewhere. I tried desoldering the board but learned that desoldering 80 pins (40-pin header, both sides) is basically impossible. So I had to start over.
Solution: Order a replacement Pi and amplifier and use Kapton tape to insulate the amplifier and prevent shorts.
"Sometimes science is more art than science." - Rick, to Morty
Before I can build my Furby/Alexa cyborg and unleash this beast upon humanity, I'll need to perform some surgery. Since this isn't very exciting, I wrote a separate guide outlining the steps required to disassemble Furby, should you decide to build your own Furlexa.
Basically, Furby's skin is held on by a zip tie at its base; beneath the fur is a carapace, or exoskeleton, much like a large insect. Once you remove both of these things, Furby becomes alarmingly scary.
Space is at a premium here so we're going to remove some of the stuff we won't need. We need to make room for quite a few things:
I started by removing all of the connectors from the board. Then, I clipped off pretty much every other component that wasn't structural or related to the cam/sensor system. In the end, I ditched the original circuitboard entirely to save some vertical space.
This was the most challenging part of the project, other than fitting everything into Furby's carapace without shorting things together. I wrote a separate guide on driving DC motors using your Raspberry Pi that dives into this in greater detail. Basically, your Pi's GPIO pins send signals to a small DC motor driver board. This board receives power from a larger power supply (Furby's original AA battery pack) to power the motor. The board also receives power from the Pi's GPIO pins to power its own logic circuits.
A bit of software running on the Pi will tell the motor when and how to run (more on this later) by monitoring when audio is being output through the sound card. This is better than simply listening for microphone input as you don't want Furlexa animating when it hears a noise (though this might be interesting).
I created a Fritzing diagram outlining the schematic if you're into that sort of thing. :)
There are three key pieces of software that make Furlexa possible:
Amazon Alexa on the Raspberry Pi (more on that below)
A script to control Furby's motor
A script that detects when Alexa is speaking and calls the motor program
Amazon Alexa on the Raspberry Pi
Amazon open-sourced Alexa for the Raspberry Pi nearly a year ago. It wasn't until later when they added wake word support that people were truly able to build their own Echo devices. A wake word is essentially a word that the system is continuously listening for, hence these devices "always listening" to everything you say. Once the wake word engine detects the wake word -- "Alexa", "Echo", or "Amazon" -- depending on your settings, Alexa is activated and processes your request just like any Amazon Echo device would.
Getting it running is super simple -- just follow the instructions on their Github page.
To install this script into your own Furlexa, log into your Pi and create the file, furby.py:
sudo nano ~/furby/furby.py
Paste the following into that file and change soundcard_status_file to point to the status file for your particular sound card. For help determining which status file is in use, see here.
Finally, save and exit.
#!/usr/bin/env python
# Import required modules
import time
import RPi.GPIO as GPIO
# Declare the GPIO settings
GPIO.setmode(GPIO.BOARD)
# Set the filename and path for the sound card in use (See: https://howchoo.com/g/mmnhmti2zjz/how-to-detect-that-audio-is-currently-being-output-in-linux-and-use-it-to-call-a-program#create-an-audio-output-monitor-script)
soundcard_status_file = '/your/sound/card/path/and/filename' # e.g. '/proc/asound/card0/pcm0p/sub0/status'
# Turn off GPIO warnings caused by us declaring our pins outside of the start_furby and stop_furby functions
GPIO.setwarnings(False)
def start_furby():
# Drive the motor clockwise
GPIO.output(16, GPIO.HIGH) # Set AIN1
GPIO.output(11, GPIO.LOW) # Set AIN2
# Set the motor speed
GPIO.output(7, GPIO.HIGH) # Set PWMA
# Disable STBY (standby)
GPIO.output(13, GPIO.HIGH)
def stop_furby():
# Reset all the GPIO pins by setting them to LOW
GPIO.output(16, GPIO.LOW) # Set AIN1
GPIO.output(11, GPIO.LOW) # Set AIN2
GPIO.output(7, GPIO.LOW) # Set PWMA
GPIO.output(13, GPIO.LOW) # Set STBY
def main():
# Set up GPIO pins
GPIO.setup(7, GPIO.OUT) # Connected to PWMA
GPIO.setup(11, GPIO.OUT) # Connected to AIN2
GPIO.setup(16, GPIO.OUT) # Connected to AIN1
GPIO.setup(13, GPIO.OUT) # Connected to STBY
# Open file and check contents
with open(soundcard_status_file, 'r') as fh:
value = fh.read()
if value == 'RUNNING':
start_furby()
else:
stop_furby()
if __name__ == '__main__':
main()
Detect when Alexa is speaking
There's a Linux file whose contents change when audio is being output; this is how we're going to detect when Alexa is speaking -- by monitoring the contents of this file. I wrote a separate guide for driving a DC motor based on Linux sound output since there are several steps here, and not many exciting ones. :)
After assembling the Pi, amplifier, speaker, and DC motor driver, I tested everything thoroughly.
Now for the hard part: fitting everything in place. Because I soldered the wires directly to my Pi's GPIO to save room, I left some slack in each wire. The speaker wires ended up being a tad short but nothing terrible. I secured everything in place with foam tape, ensuring not to short anything to the original Furby circuitry.
I originally wanted to install a lithium polymer (LiPo) battery to power Furby but since most of the small LiPos are 3.3V I would've needed to use a voltage booster to make it work. Unfortunately, there was no space left in Furby for either of these things, so I opted to simply run a cable out of Furby's back for an AC adapter instead.
Finally, I reassembled Furby's carapace and then he grew some fur remarkably fast. The attached image shows the final assembly after carefully, but lovingly, jamming everything into Furby.
Maybe! Just kidding, though I thought about this a lot. Electronics can get hot.
First, I needed to find out how flammable Furby was so I unscientifically lit one on fire in my DIY fire pit. After much observation, I concluded that it was mildly interesting.
I also concluded that because the Pi will never get hot enough to melt through Furby's carapace, and his electronics will never be in direct contact with his fur or skin, he will probably not self-immolate. The Pi may stop working, but we'll see. It's been running continuously for days and so far so good. Still, if you build your own Furlexa, it's better to play it safe and take proper precautions.
If you're daring enough to build your own Furlexa or would like to install Alexa for Pi into another enclosure, post in the comments section below. I'd love to hear from you and help you out wherever possible.
If you'd like to get started by building a simpler Raspberry Pi Echo using a Raspberry Pi 3 (without a Furby), we have a guide for that too!