Just wanting all to say “Hello Box Head” – literally that is – to, well “Box Head”. Just like many of my builds, this one began as a discarded item – old old GoPro II display case. I saved it from certain destruction and dumped it into the “why not keep” pile for some future, unknown, possible use. I originally had thought of mounting some motors on it and making it yet another little mobile robot but other projects received attention first.
After watching what Chickenparmi did with Processing, a webcam, and an Arduino I thought that would be something cool to try. (BTW that STILL doesn’t work for me but it’s my limited capability I imagine) BUT instead of going the normal route and popping a cam on a couple servos I wanted it to have more personality. Something that would feel kind of cool if “IT” watched YOU, or you could talk to it, etc. Of course I’m still working on that watching you part but maybe soon.
The BoxHead Solution…
I took the easiest route to animation, two servos for movement, NeckRoate and NeckTilt. In fact one of the existing servos was from an old pan/tilt setup I have on my home security cams that can be moved around via the web with a servo controller board, thus the extra servo horn glued to the side. A Baby Orangutan from another project is currently running the motion side but I have a Pro Mini clone I am building to make it a more permanent install. The Arduino just reads the serial commands from the VB.net app and does movements, reads sonar, etc. There is a LOT more work to be done on both sides of the solution to develop a more fluid Box Head but the basics are working right now.
The Voice and Ears.. err, Ear
The VB.Net app is based on the Microsoft Speech Recognition engine and the Text To Speech solution. It’s very simple to use, and free, which is always good. In my case I have the 5.1 Speech SDK installed on a very old XP laptop and am using Visual Basic Express 2008 as the IDE. To make the Speech recognition and Text to Speech work required only a few lines of code from samples found online and adding the system references to the Box Head project. I’ve used the MS Text to Speech API before with VB 6 and wrote a small “SayIt” program (http://protowrxs.com/files/) that I still use today in our Home Automation systems so it wasn’t all foreign to me. But it’s still pretty easy to do with the sample code that is out there.
Once you get the hardware configured the Arduino code is similar to the rest of my robots. The only exception is that the commands are, for the most part, taken from the serial port as to what to do. I do have some things on the Arduino that the VB app never knows about such as looking away if you get too close to the sonar sensor. I would like to have the VB app aware of that action but haven’t added that yet. I have re-used my stepping code from TED the BiPed (http://letsmakerobots.com/node/35632) to allow a bit more fluid head movement for most routines which has turned out rather well in my opinion. He slowly moves from position to position actually slowing down as he approaches the final requested point. The only exception to that is the “find closest object” routine that drives the servos directly as he searches for what he thinks is the thing closest to him. Some noise and bugs there but the core function works.
Otherwise it’s just pretty fun interacting with Box Head. Sure the actual command and control is being run by the PC and he is tethered but with that connection comes lots of options for speech. For example Box Head can read the latest news headlines through an RSS read subroutine, can get the weather by running my home automation weather speaking VBScript routine, and in the long term I hope can decipher some search data and give me the results. THAT however requires a big step beyond the limited recognition setup currently being used and turns into the dictation functions which appear to be more complicated to me.
Of course as with any current, and especially free, voice recognition solution, you have to know what to say and have to say it pretty specifically. “Tell me the weather forecast” works, “What is the weather forecast” doesn’t. But since I wrote the code I remember most of the commands for now at least.
With my home automation system and my online house code I’ve developed over the years, I can have Box Head tell me if the garage door is open, tell him to turn certain lights on and off and have him turn the coffee pot on or off as well. This is only limited by how much time I want to spend adding the commands and responses to the special link that he talks through.
Right now I have Box Head listen all the time once I have work him up with “Hello BoxHead”. Sometimes it’s funny just letting him sit there and listen to what’s going on and respond randomly, sometimes correctly, sometimes completely off the wall.
Long term I would like to have more flexibility with the commands and recognition and make it a little more friendly to other speakers but that may be difficult with the current setup I am using. I’ve also been eying my LTBotV2 platform (http://letsmakerobots.com/node/34323) that has a netbook running on it already and would make an excellent mobile base for Box Head to get around on. I even have the motor controllers and needed hardware to make that work and the motors have some pretty good encoders on them. Maybe Box Head won’t be “Stuck here on my base” for too much longer if I stick with it.
I’m already looking for a smaller but similar “box” from something to make a mini-box head with some 9g servos. Thinking I’ll use the female voice and call her “Boxy”. 😉 Update 02/08/2013
BoxHead has a base, Mouth and Tweets
Finally finished up a basic base for Box Head – he used to have his guts all hanging out all over the place but now has a workable place for them. Nothing fancy but functional. Inside his base is where the Arduino Pro Mini clone is, the speaker up front for his speech, power regulator, and a four port USB hub for the camera, two USB to TTL converters and the power run for the little speaker. The goal of the base was to cover everything up and I believe that goal is accomplished. Additionally I wanted to end up with only a power wire, USB, and speaker connection which the hub allows.
Since the original concept of Box Head was some way to play with Face Tracking I figured I needed to get it working somehow. I ended up using RobotSee from the RobotVision Tool Kit and am quite happy with results. The down side is I have to use another serial connection to the Arduino / PC in addition to the one for the VB.net app but it is simple and effective. After saying Hello Box Head he initially turns on FaceTracking mode which is just another mode he can run in. The PC .see script runs sending UP/Down/Left/Right commands as needed to stay centered. Watch for a separate write up of how it works as well as hopefully an AtTiny85 version as well..
The goal from the start was to give Box Head some type of LED mouth moving from the center out and after watching people playing with LED VU meters like hoff’s VU Meter Robot Face (http://letsmakerobots.com/node/36063) I decided to give it a go. However I didn’t want to make the main Arduino try to do that along with movements, etc so I drug out one of my ATTiny85 chips and changed the code they used to only drive three outputs and then wired up the mouth with five total LEDs. One green on in the middle, two yellow outside of that tied together, and two reds on the outside tied together. The then basically light up from the inside out. With only that many it’s a little hard to see the actual movement but better than nothing to me. A serial connection between the main Arduino and the ATTiny85 is setup with my goal for future abilities of the VB.net App, RobotSee, or just the Arduino having the ability to send a command to the ATTiny to change mouth “modes” or whatever.
Chatting on the LMR Shout Box about things with others about Twitter reminded me about my NolenHouse account and how my house tweets activity. At first I wanted to setup a completely different BoxHeadRobot Twitter account for Box Head but with the need for the account, a proxy or email proxy account to post, etc I decided to just let Box Head talk through the Nolen House account. You can see any possible tweets here http://www.Twitter.com/NolenHouse He’s part of the house anyhow and adds some traffic to the account. I’ve kept the Tweets pretty minimal: startup, goodby, what’s his age, etc for now but may add more over time as he learns new things and has new responses.
- $ 0.00 – Plastic Box
- $ 7.00 – Pro Mini Clone
- $15.00- Cheap webcam on sale
- $ 2.10- HC-SR04
- $10.00- PIR Sensor (Way overpaid at RS)
- $ 0.00- Junk servos – need replaced eventually
- $10.00- Portable speaker
- $ 7.00- Four Port USB hub
- $ 2.00- LEDs for mouth
- $ 2.00- ATTiny85 CPU
- $ 2.00- Power regulator
- $ 0.00- VB.Net and RobotVisionToolKit
Misc other: Old plastic from dog door, switch from junk, alumn from scrap, etc Of course you have to have a computer for this but I think we all do already
Original Testing Videos…