Ganzbot: A talking robot which reads Twitter
| Attachment | Size |
|---|---|
| Ganzbot.pde | 4.2 KB |
UPDATED:
I've added the video of Steve's reaction to the robot. Also, here are more details about the robot, construction and software:
http://blog.mozmonkey.com/2008/ganzbot-an-arduino-robot-who-reads-twitter/



This robot has eyes, eyebrows and a mouth and will verbally read the 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 it something to say directly from the command line with a few moods to choose from
Background
A couple months ago a few people at the office 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.
Downloads




@ Sat, 2008-08-16 08:40
Awesome!
I love it! Especially when it goes evil and wants to destroy us all :-)
Hope to see more if it!
@ Sat, 2008-08-16 23:50
Excellent!
@ Sun, 2008-08-17 02:17
Wow, works very well.
@ Sun, 2008-08-17 22:01
Inspiring!Sad to learn that
Inspiring!
Sad to learn that it was not "the bot" that was doing the speaking.. but in a way that was also inspiring :D
Cool!
@ Sun, 2008-08-17 23:08
Speech Chips
Agreed. I originally wanted to use a chip but didn't have time to wait for it to come in the mail. There are good chip options that aren't very expensive: http://www.speechchips.com/shop/
If you use one of those chips, you'd need to figure out another way to syn the lips to the audio because I doubt the chip will tell you much information about how the words are being spoken. Then again, I haven't looked at the datasheets yet. Has anybody done any work with audo spectrum analyzers? That seems like a pretty good way of doing it.
Sending the audio signal to an analog input should tell you the approximate voltage level being sent to the speaker, right? I believe you'd need a filter in there somewhere to remove most of the noise. Would you use a capacitor for that? Any thoughts?
@ Sun, 2008-08-17 23:10
Others?
@ Mon, 2008-08-18 23:16
Yeah :D And a note: do NOT
Yeah :D
And a note: do NOT purchase the soundgin chip!! The documentation & PC-program is not even online any more, and the forum is unsupported. Before it was crap, now it is deserted crap!
(And if you did it anyway I know it quite well - including all the beta / non working in it, I may be able to help)
@ Tue, 2008-08-19 19:25
Thanks for the advice. I
@ Thu, 2008-08-21 07:38
No, SpeakJEt is the same as
No, SpeakJEt is the same as Soundgin to my knowledge (Same chip 99%, and same crap). As far as I am concerned your only option is to buy a circuit dedicated.
Well you can go for something like WTS701 and waste your life trying to make it work, or you can go for something like this and waste your money ;)
There MAY be new options out, it is perhaps a year since I digged into this last time!
@ Tue, 2008-08-19 13:12
Just showed up on Make
This robot just showed up on the Make blog:
http://blog.makezine.com/archive/2008/08/ganzbot_an_arduino_robot.html
And for those who've not seen it yet, Make magazine is a great source of ideas and know-how for robot builders. They often feature robot projects on the main blog page.
@ Tue, 2008-08-19 19:25
Wow
@ Mon, 2008-09-01 09:02
this is great stuff!!
this is great stuff!! :D
@ Mon, 2008-12-22 09:43
I am very angry robot!
I am very angry robot! Destroy! Destroy!
Haha! Its great! :D