This funny little robot has eyes, eyebrows and a mouth and will verbally read your latest Twitter status to you. It uses an Arduino Decima to control the head actions and receives the latest Twitter status information over USB from a host computer.
For those who don’t know, Twitter is a micro blogging tool where users announce what they’re doing with 140 characters or less. (see Twitter in Plain English)
You can also send the robot something to say directly from the command line with a few Ganzbot moods to choose from. More information after the videos.
Steve’s Reaction
Background
A couple months ago a few people at LinkedIn decided to create a Twitter account called “Ganzbot”, named after Steve Ganz, as a joke. Then when Steve left to compete in the PDGA World Championships we decided to build a “real” Ganz Robot to occupy his cube when he returns.
How it works
At a high level, there is a Java program on the host computer which retrieves the latest Twitter status, passes facial and word data to the head and then speaks the Twitter status through the computer speakers using FreeTTS, an open source Java text-to-speech synthesis library. I would have liked to put a speech synthesis chip in the head instead, but didn’t have the time.
LED Lips — how to make them talk
Getting the LED lips to be synchronized with the words was a bit tricky. Unfortunately FreeTTS doesn’t implement 100% of the JSAPI, so when it’s speaking there is no way to know when one word ends and another begins. Instead, the Java program on the computer splits up the text into individual words, sets the volume to zero and speaks each one to figure out how long it takes to say. Then the program passes the word times to the head and starts speaking the entire sentence with the volume at the normal level. The lip synchronization isn’t perfect, but it’s pretty good.
Another option might be to light up the LED lips from an audio spectrum analyzer.
Circuit
To keep it simple I took a standard perf board from Radio Shack and added header pins to turn it into an Arduino shield. This makes it really easy to connect it to the Arduino and ensures all the pins are in the correct sockets. The circuit below was created to show the pins and voltage source as they appear on the board. More details on the circuit after the diagram.
Transistors
Unfortunately there wasn’t enough juice coming from the Arduino chip to power the LEDs very bright, so I had to use standard NPN transistors to feed the LEDs power directly from the board.
Lips and Eyes
I only included half of the lips and eyes in the circuit diagram since the other halves are simply connected in parallel and I didn’t want to clutter it up. I’m sure you can figure it out. If you have trouble, leave a comment below.
Eyes
The eyes are simple multi-color LEDs I picked up from Radio shack. They can output red, green and blue, but the Ganzbot only uses red and blue. The longest pin is positive and the color depends on which pin you put to ground. I suggest testing it on a breadboard before soldering it into place.
Software
On the host computer a Java program retrieves the Twitter information (or command line message) and sends the word times to Arduino over the USB cable. All the robot needs to know is the mood it should be in (neutral, sad, angry) and how many milliseconds each word takes the speech synthesis program to say. If the program is started in “-twitter” mode, it’ll continue checking Twitter for updates every 2 minutes until you stop it.
Download
Go to the download section.
Requirements
OS: Any
Java: version 1.5 or greater
I compiled the program using Java 1.5, so as long as you have version or greater you should be able to use it out of the box. If not, you can simply compile the app to your version Java (see the Build section below).
Libraries
The GanzBot program relies on the following libraries, which are all included in the download:
Build
To build the Ganzbot source code you first need to install the Apache Ant build tool. Then go into the “src” directory and simply run “ant”. It should take care of compiling both Ganzbot and JSON and placing their Jar files in the correct locations.
FreeTTS comes precompiled from Java 1.4. If you are using an older version of Java you’ll need to download their source code and build it manually. Once completed put the jar files it created in it’s lib directory in the Ganzbot lib directory.
RXTX is the same as FreeTTS and comes precompiled. To compile it to another OS or version of Java, follow the instructions on their wiki.
Installer
In the download I’ve included an “install.sh” script that will install the RXTX library and Mac USB drivers that are needed to communicate with the Arduino. The installer is specific to Apple and wont work on other operating systems. The simplest way to make it work on other systems is to install the Arduino software. Otherwise you can always install RXTX and the FTDI USB/Serial driver manually.
Running the Program
- To run the progam start by plugging in the Ganzbot and then open up a command line terminal.
- In the command line, go to the place you downloaded and extracted the program.
- For a simple “Hello World” test type
java -jar ganzbot.jar "Hello World"(be patient, It might take awhile to process)
If the program gave you an error, it’s likely because it doesn’t know which USB/Comm port that the Arduino is plugged into. It should list the available ports you can choose from in the error message. Then run the command again with the “-port” flag, like this:
java -jar ganzbot.jar -port '/dev/tty.usbserial-A6004oQf' "Hello World"
For windows you’ll probably use something like “COM1″ instead of the “/dev/tty…” string.
You can also type java -jar ganzbot.jar -help for more options.
Reading Twitter
To speak a Twitter status message enter a command like this (where jgillick is the twitter user) :
java -jar ganzbot.jar -twitter jgillick
Ganzbot wont read the same twitter message twice. The program saves the last tweet ID in a file called “.tweetid”, remove this file to have it say the last Twitter message again.
Moods
Ganzbot can be a bit moody sometimes. To define the mood he should speak in, add the mood text to the very beginning of the message. Here are a few examples:
- “[angry]I am very angry right now. Destroy, Destroy.”
- “[sad]When I’m sad I whine alot.”
- “I am not angry or sad, for I am a robot.”
Rails Application
For fun I also created a super simple rails application that let anyone queue up messages to be spoken instead of using Twitter. If the Ganzbot program is in Twitter mode it’ll automatically check that queue if there isn’t a new Twitter status message. The app is hardcoded to look at http://localhost:1024/ for the queue. You can change that in GanzBot.java if you need.
In order to run the web application you first need to make sure you have both Ruby and Ruby on Rails installed. Then download the package (see download section), extract it and run the following from the command line in the “GanzbotRails” directory.:
./script/server --port 1024
This will start the server and put your Ganzbot queue at http://localhost:1024.
Downloads
Add to: Del.icio.us | Digg it | Slashdot | Y! MyWeb


30 Responses
Melissa Says:
August 18th, 2008 at 9:33 am
Jeremy, you are one damn funny guy. Come work here!!!
Scott Says:
August 18th, 2008 at 10:03 am
Well-done, I had forgotten (assuming you did tell me at some point) that you are/were from an electronics background.
steve Says:
August 18th, 2008 at 10:11 am
Best. Thing. Evar.
Steve Ganz Says:
August 18th, 2008 at 10:57 am
Definitely the best “welcome back” I’ve ever received!
Oh, and Melissa? Hands off!
tinker it now! » Blog Archive » Stuff and things Says:
August 18th, 2008 at 1:38 pm
[…] ++ Arduino bot that speaks your Twitter messages back to you. […]
Jonathan Says:
August 19th, 2008 at 1:23 am
You should sell this somewhere. I’ve got 1,000 Twitter followers and I’ll bet 5% of these lunatics, including me, would buy it.
Make More Money » Blog Archive » Ganzbot: An Arduino Robot That Twitters Says:
August 19th, 2008 at 1:52 am
[…] more about Ganzbot: An Arduino Robot That Twitters Read more | Permalink | Comments | Read more articles in Arduino | Digg […]
Ganzbot: An Arduino Robot That Twitters | Abiyaa Says:
August 19th, 2008 at 3:38 am
[…] more about Ganzbot: An Arduino Robot That Twitters Read more | Permalink | Comments […]
Jim Says:
August 19th, 2008 at 8:41 am
Jeremy, you are insane. I’m so glad you work here.
Melissa, if only you worked here, you’d work with Jeremy, too.
Just sayin’. =]
some guy Says:
August 19th, 2008 at 8:45 am
HI
Cool project. I noticed though that the transistors driving the multicolored lED are backwards. Reverse the E and C and they will work. Also, the transistors driving the other LEDs should have the LEDs on the collector side, so that the LED voltage drop does not interfere with the base bias. It’s standard practice to use a single resistor for each LED also
Keep up the good work.
Wild Bill Says:
August 19th, 2008 at 9:14 pm
Good to see a Mac based micro controller project.
Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate | PhetchIt - Only The Best of the Web. Says:
August 21st, 2008 at 3:42 am
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate | bitbucket.kylewelsh.com Says:
August 21st, 2008 at 3:44 am
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
ZEITGEIST / Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate Says:
August 21st, 2008 at 3:45 am
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate : rare online articles Says:
August 21st, 2008 at 3:45 am
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate | TECHTODAY GET LATEST NEWS OF MOBILES COMPUTERS EVERYTHING Says:
August 21st, 2008 at 3:46 am
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
Latesht .com » Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate Says:
August 21st, 2008 at 3:53 am
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
Would be Cool » Blog Archive » Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate Says:
August 21st, 2008 at 4:18 am
[…] jump.[Via MAKE]Continue reading Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rateRead | Permalink | Email […]
CrunchGear » Archive » The DIY Twitter-reading box robot Says:
August 21st, 2008 at 9:02 am
[…] odd fellow is an Arduino-based system for reading - and reacting to - incoming Twitter messages. While his […]
Petit bricolage de Geek, voici une tête de robot cartonnée capable de vous réciter les updates Twitter que vous récéptionnez. Sorte de Nabaztag du pauvre, Ganzbot parvient également à traduire quelques émotions en fronssant par exemple ses sourcil Says:
August 21st, 2008 at 10:06 am
[…] capable de vous réciter les updates Twitter que vous récéptionnez. Sorte de Nabaztag du pauvre, Ganzbot parvient également à traduire quelques émotions en fronssant par exemple ses […]
Ganzbot is a Twitter Reading Robot! | zedomax.com - Obsessively profiling DIYs, HOW-TO,Hacks, Gadgets, Tech, Web2.0,and beyond. Says:
August 21st, 2008 at 10:24 am
[…] make, mozmonkey A+Featured Gadgets, Consumer, Cool, Design, DoItYourself!, Educational, Entertainment, Gadgets, […]
Mac Evangelism » DIY Ganzbot talking head serenades you with Twitter updates Says:
August 21st, 2008 at 12:37 pm
[…] see, and it can read text from your computer to boot. Builder Jeremy Gillick and his crew over at The Mozmonkey Blog created the Ganzbot when friend Ganz left to compete in the PDGA World Championships, and had it […]
The Ganzbot - an automated robot that reads Twitter updates | Teknopsis Says:
August 21st, 2008 at 7:05 pm
[…] [Mozmonkey] […]
Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate | Iphone Portal Online Says:
August 21st, 2008 at 7:09 pm
[…] Read | Permalink | Email this | Comments […]
Video: Ganzbot reads Twitter feeds aloud, looks fashionably low-rate | Gadgetorium! Says:
August 21st, 2008 at 9:21 pm
[…] Read | Permalink | Email this | Comments […]
Twitterator: The GanzBot Chronicles | SuperBlog Says:
September 5th, 2008 at 8:58 am
[…] to make your own GanzBot? Check out step-by-step instructions here. For more on LinkedIn Culture - go […]
LinkedIn Engineering » Blog Archive JDBC Connection Pooling for Rails on Glassfish « Says:
October 20th, 2008 at 5:59 pm
[…] to make your own GanzBot? Check out step-by-step instructions here. For more on LinkedIn Culture - go […]
LinkedIn Engineering » Blog Archive Twitterator: The GanzBot Chronicles « Says:
October 20th, 2008 at 6:01 pm
[…] to make your own GanzBot? Check out step-by-step instructions here. For more on LinkedIn Culture - go here Possibly related posts: (automatically […]
Neat Feat: a Twitter Spitter | Suicide Bots Says:
November 8th, 2008 at 9:55 am
[…] alerts us to Ganzbot, a personable (robotable?) device that speaks and emotes. Ganzbot is designed to be hooked into […]
Ganzbot: An Arduino Robot That Twitters | thekevinpipe.com Says:
November 14th, 2008 at 1:28 pm
[…] more about Ganzbot: An Arduino Robot That Twitters Read more | Permalink | Comments | Read more articles in Arduino | Digg […]