Off-The-Shelf Hacker: Hedley The Robotic Skull Gets A Partial Maxillectomy
After what feels like forever, my latest project, Hedley the robotic skull, finally has a speaker mounted in the roof of his mouth. I’ve had trouble finding one that was small enough to fit while still being able to handle a couple of Watts of audio power. Now say, “aaaahhh!”
It turns out that a local surplus electronics store had exactly what was needed.
After putting Hedley under the knife (actually, the Dremel) for his maxillectomy, I played the Rolling Stones’ “Sympathy For The Devil” through the skull, and it sounded pretty good emanating from Hedley’s gaping yap trap. Seemed like an appropriate, comprehensive first test.
This week, I’ll cover how I put the speaker in Hedley’s noggin and the details of getting sound to come out with a tiny audio amplifier board. A future story will tie the whole flapping-jaw/voice effect together along with the Processing program that does the speech-to-audio analysis.
Why The Surgery?
When Hedley and I gave our tech talk at the recent Embedded Systems Conference, in Minneapolis, his jaw moved while the HDMI port on his onboard Raspberry Pi 3 delivered the audio to the house sound system. It worked great. He’d utter a phrase and it kind of looked like he was talking.
What I really want is for Hedley to talk into a microphone. I want to put a floor mike in front of him and have him speak into it like a normal person. He’ll also pan and tilt his head during a show which will change the sound as he moves around in the microphone pickup pattern. Put that together with the finely synchronized jaw movement and audience members may be able to briefly suspend their belief that Hedley… is a robot.
Actual installation of the speaker wasn’t nearly as hard as I had anticipated.
When I first built Hedley, I cut up his skull in a modular way. There’s a front section with the forehead, eye sockets, nose and top teeth. The back half of his skull is hinged to the front section in a wraparound fashion, that bolts and pins together on the right side. The cap covers everything on top and is secured with screws and several leather straps. The jaw is standalone and is attached to the jaw pivot tube. An internal frame supports the whole works, including the pan pivot bearing, on the inside.
I had to remove the cap and the JeVois smart sensor from his right eye socket before disassembling the front/back skull section. The sensor mount uses three pins to locate the device in the proper position and a set of rubber bands to hold it against the pins. Pull the rubber bands out of the way, disconnect the USB and serial cables and the sensor comes straight out.
Hedley also has the three-color LED eyeball that is a press fit in his left eye socket. It stays with the front skull section. I notched the back part of the front skull section to clip onto the internal jaw pivot bearing tubes. The tubes are at the base of his skull, where the backbone starts and are part of the internal brass tubing framework supporting the jaw servo, jaw servo lever, JeVois sensor mount and the Arduino board used for the pan servo. The little notches just snap over the tubes and hold the skull in place on the internal frame. It’s pretty solid.
Always try to make your gadgets (especially prototypes) modular so they are easy to take apart and modify. Modular packaging is an art in itself and perhaps a topic for another story.
Next, I unbolted the front and back skull sections at the hinge, so as to just have to work with the front part. I didn’t even unhook the LED eyeball from the Raspberry Pi, since the leads are pretty long and there was enough slack to do Hedley’s surgery, on my desk. I guess we could call it an outpatient procedure as opposed to being in the operating room, otherwise known as the garage workbench. That would be inpatient. Go figure.
The speaker can handle about two Watts and is roughly a 1.5-inch cube.
Better still, they were only $1.50 each. I simply held the cube, speaker cone down against the roof of Hedley’s mouth and marked the outline with a pen. The “bone” was then removed with a cutoff wheel on the Dremel and a utility knife. I left corner “tabs” as attachment points.
After cleaning up the edges I positioned the speaker inside the skull and hot glued it in place on the corner tabs. There is a bit of mass to the speaker, so I used additional hot glue around the back and sides to solidly anchor the speaker to the inside of the skull.
Give Him Some Volume
A while back I picked up five 5-Watt, mono-channel audio amplifiers for a little over $3. How could you go wrong for that price, right?
Amazingly, the audio amp measures only about 1/2″ X 3/4″ in size. You could put these things anywhere in your project.
I built a two-wire extension cable using a pair of 0.1 mm pins that plugged into the speaker connector at one end and the breadboard, at the other. Later I’ll solder the leads for a more permanent setup.
The audio input arrives over a pirated audio cable that plugs into the phone connector on Hedley’s Raspberry Pi, at one end and another dual 0.1 mm pin connector on the breadboard side. The outside cable braid went to ground and the internal lead went to the amp’s audio input pin.
Power is supplied by a hacked USB cable with a pair of 0.1 mm pins soldered to the positive and negative leads, breadboard side.
I should mention that while the USB cable can plug right into the Raspberry Pi and supply power to the amp, there is probably a “ground current” issue, judging from the distortion in the speaker. I was able to get clean distortionless sound by hooking the amp up to a totally separate 5-Volt cell phone power pack. Ideally, we’ll want to run the amp from a common USB power connector block, particularly in portable mode. I’m on the trail of finding and fixing the root cause(s).
Hurry Up Halloween
The speaker works great in Hedley’s mouth. The audio amplifier has plenty of power to drive the speaker at high volume. It is certainly loud enough to hear from across the room. Once the power/distortion is sorted out and everything is running smoothly, I look forward to dazzling audiences with scripted shows using Hedley as my vocal, human-like assistant.
And, now that I have a supplier for plastic skull-sized speakers, I think it will be fun to make other similar talking robotic creations using the matching minuscule audio amps, Raspberry Pi clones, jaw servos and perhaps Arduino Nano clones.
How fun would it be to build a talking dog skull? Or, a pile of books that talk to each other? Do you think the postman would be surprised if the mailbox lid suddenly talked to them as they came up the steps?
Only problem now is that Halloween is seven months away. I doubt I’ll see any interesting plastic animal, bird or human skulls on the Target shelves until then.
Catch Dr. Torq’s Off-The-Shelf Hacker column each week, exclusively on The New Stack.