When I finally got around to playing Portal, I was a bit surprised at how much the Internet loved the companion cube. Sure, the cube is pretty great, but in my mind it pales in comparison to the turrets, the real scene-stealers of the game. In fact, they inspired a Veruca Salt-esque covetousness in me.
I wanted one.
And, of course, it just wouldn’t be the same if it didn’t talk…
With the excitement of Portal 2 coming out, and in collaboration with Leigh Nunan, I finally was able to get my turret. Or, rather, to make it.
We’ve named her Trudi. Judging by her head-to-body ratio, Trudi’s a baby turret.
- Authentic game dialogue
- Motion detector, so it knows when you’re there and when you’ve left
- Pressure sensor, so it knows when you’ve picked it up
- Tilt sensor, so it knows when you’ve knocked it over
- LED light-up eye
- Exaggerated features for extra adorableness
I can barely hem a pair of pants, so I’m certainly not skilled enough to design and make a plush toy. Fortunately, I was introduced to Leigh Nunan; amongst other things, Leigh has created an incredible giant squid plushie that’s about twice as large as I am. Leigh both designed the turret pattern and sewed it together (which, to me, is essentially magic).
Here’s the Terminator-esque skeleton of the electronics and supporting framework.
The structure is made from heavy-gauge copper wire, a laser-cut platform, and hot glue. It may not be pretty, but it gets the job done. Internally, the electronics are housed in a plastic cup to keep them separate from the stuffing (thanks for the suggestion, Adam Smith!).
As much as we’d love to make you one or sell you a kit, the last time I suggested doing something like that I was very quickly disuaded. So, if anyone from Valve sees this and wants to talk about giving us permission, or at least turning a blind eye, please get in touch! Otherwise, sorry: you’ll have to make your own. Information about the electronics are provided below. The pattern is still a work-in-progress, but once Leigh’s ready I’ll post that here, too.
The circuit is made of:
- Arduino to control it all
- Adafruit Wave Shield to play the sounds
- Passive Infrared sensor to detect motion
- Tilt ball switch to detect tipping
- Tiny tact switch to detect if it’s lifted
If I make more, I’ll use something like a BBB instead of an Arduino to keep costs down, but I used what I had handy.
The Passive Infrared sensor detects changes, so it can give a lot of false positives and false negatives; in the future I might try an IR rangefinder instead, but they come with their own problems.
I’m particularly proud of the “lift” sensor: it’s just a little button on the bottom of one of the legs. The weight of the plushie keeps it pressed when it’s standing up.
The LEDs are completely independent of the rest of the electronics. In a future version I’ll have them controlled by the Arduino, so I can fade them out when the plushie is knocked over.
If you’d like, you can download the code. I wrote a function to randomly play a sound file from a given directory, and then tied a directory to each event. It’s not quite as simple as “event triggers sound”: it only places a “tipped over” event if it’s also “lifted,” after being righted it plays an “activated” sound before resuming normal behaviour, etc. All it all, the interactivity works pretty well (if I say so myself).
There are, of course, many little improvements that both Leigh and I want to make to our respective parts of the design. There will be at least one more revision, because we both want to have one to keep, so we’ll have a chance to incorporate things we’ve learned from this first version.
As mentioned above, I’d like to have the LEDs controlled by the Arduino, so that they can fade out when the turret “shuts down.” I’d also like to add in an additional amplifiers, to allow a wider range of volumes, and make the controls a little more accessible: right now you need to reach inside the turret to turn it on and off, which, in additional to being inconvenient, feels a little wrong.
Over at Site 3, my friend Dana Sarafinchan is working on a life-sized Turret replica. I think once that’s done we’re going to work on making it fully functional: not just sensors and sounds, but opening side panels and perhaps even throwing some Nerf or Airsoft guns in there.
As always, if you’re interested in seeing what comes next, you can subscribe to my RSS feed.