Isn’t it amazing how expressive R2-D2 is with such a limited vocabulary of beeps, whistle and chirps? I’ve had this idea for a while: Adding voice controlled to my R2-D2. It would be too dangerous to control R2’s motor functions via voice, but I thought triggering specific sounds on command could be fun. I’ve had multiple requests for specific sounds in the past, but unable to make it work on command since my current control system just performs a random sound from the library of 50+ I loaded onto the sound chip inside R2.
My idea was to embed this control into the X-Wing Pilot helmet that I wear so it would not look too obvious that I was giving voice commands. The helmet has a fake microphone on it, so I thought it would be easy enough to replace it with a real microphone. The mohawk of the helmet is also a good place to cram on-board electronics, so I wouldn’t have any wires between the helmet and the rest of my X-Wing Pilot costume.
Most Voice Recognition (VR) today is done by using a Speech-to-Text cloud service like Amazon’s Alexa or Google Home, or any of the others. It’s getting really good and generally doesn’t require any training to understand the speaker. I couldn’t be sure I would have Internet access when I trooped, so I was searching for a solution that did not require Internet access. I stumbled across the Easy VR Shield 3.0 at Sparkfun and thought this could meet my needs. I didn’t have enough room to fit an Arduino Uno + shield into the helmet, but I did have room for a smaller board. I found that the Easy VR board detaches from the Shield, so I thought I could use the board alone without the shield.
After some reading and fiddling, I found that the Easy VR module would meet my needs nicely. The main drawback is that it requires me to train the system with my voice, so it would only work for me [note, it has other capabilities, but requires licensing 3rd party software which is not cheap]. In a nutshell, it takes my speech and save it as a file, then compares it with other saved speech files on board from my training. If it finds a match, it makes a beep to confirm and sends a serial port signal indicating which item in the list was a match. If it does not find a match, it continues to listen. This has pros and cons, but ultimately, I couldn’t find anything better so I decided to move forward. The downside to not using the shield is that it requires a special programming cable to set it up which was an unexpected cost.
X-Wing Pilot Helmet
My helmet is great, and I’ve enjoyed wearing it on many occasions where I trooped. Lately, I’ve been wanting to paint one in the style of Luke Skywalker since everyone assumes that I’m cosplaying him anyway. Retrofitting the necessary VR electronics into the existing helmet would be a challenge, and it would be a lot easier to build another. Also, the helmet I have is not my best work – my skills have improved significantly since I attempted that helmet. So, I went back to Darth Hair and bought a second X-Wing Pilot helmet that I could customize it to meet my need. I was really happy with the quality of his helmet the first time I bought, so I did not hesitate to buy from him again.
I applied all my improved skills and technique to make the new helmet look as screen-accurate as possible. I found a great site that has detailed images of the helmet from the movie so I could match the design. Darth Hair’s helmet comes with a few vinyl decals that I wanted to use, but the colours were a bit different than the ones on the movie helmet – the red was closer to a crimson. So, I adjusted the choice of paint to match the decals.
This time, I relied heavily on vinyl pinstriping tape instead of attempting to paint the fine lines. Also, I used spray paint for the base instead of hand painting to avoid the appearance of brush strokes. Finally, I applied the vinyl decals properly by peeling both the top and bottom layers off (unlike last time). I gave all the edge a coat of clear nail polish and hit it with a couple clear coats to lock everything down permanently. Overall, I’m really happy with the results.
To make the system work, I needed a micro-controller on each end, and a pair of radio modules to send/receive the signals. For this, I turned to the Arduino Fio v3 and Xbee Series 1 radios. I’ve used these many, many times and have found them to be very reliable, small, and take a low power draw – very good for wearable tech.
For the helmet electronics: I connected the Easy VR board to the Arduino Fio v3 board and mounted the Xbee onto the Fio. I added connectors for the external speaker and microphone on the Easy VR board so they could be embedded in the helmet.
For the R2-D2-mounted electronics: I connected the Arduio Fio v3 + Xbee to an Adafruit Mini Audio FX Board (16MB) to enable playback of .WAV files. I connected the Audio FX board outputs to the existing amplifier inside R2.
I purchased an inexpensive condenser mic headset, and then cut away the headset to leave the flexible mic arm and a wire with a 2.5mm jack. During the build of the helmet, I mounted the mic inside the helmet and hid the wire. I used some nice Hammond project boxes to protect the circuit boards inside the helmet. I bought a USB Micro panel mount connector and cut a hole in the helmet so I could connect a USB wire and recharge the battery without having to pull everything out. I also added a small slider switch to control the power to the boards and mounted that at the back, bottom of the helmet – out of site and easy to reach. I found a 2Ah Lipo battery at Sparkfun that exactly fit inside the mohawk (2″ wide). The boards pull low power (about 100mA), so I’m hopeful I can go a full day at a con without needing a recharge.
Source Code for the Arduinos can be found here.
Total build time was done over 3 weekends. Most of the time in between was spent waiting for parts to arrive. I’ve had to re-train the Easy VR module several times since it is very sensitive to changes of location of the microphone and mounting it inside the helmet gave some unique audio characteristics. I’m a bit concerned about if/how this will work on the con floor since it is very loud.