An awful lot of people share with each other on social media services. From Facebook to Twitter, Pinterest to Vine, people carry on all sorts of online discussions.
One thing missing from all this exchange, though, is a direct connection back to the physical world. The subject of the conversation often comes from the real world, but once you post it, all your interaction with that content is virtual. Whether it’s on your desk or in your pocket, your window into the dialog is limited to whatever can be displayed on your screen.
Enter Arduino, an open source platform for building electronics projects. Arduino is relatively inexpensive and simple enough that nearly anyone can have a go at making robots. With a little programming and a whole lot of experimentation, the online interaction of social media can be expressed in the physical world.
We wanted to build something for the Seattle Mariners, Copacino+Fujikado’s oldest client, to celebrate the release of this year’s Mariners TV commercials. And what says “baseball” more than a bobblehead figure? In this case, it’s a bobblehead that bobs whenever someone tweets about the new Mariners commercials. Here’s a quick guide to what makes our little robot tick:
- Adorable Mariners bobblehead. Robots often lack the human touch, and the whole point here is to connect with people. Besides, how can you resist those dimples?
- Dead batteries. We killed a few of these before finding out that a WiFi board listening constantly for input draws a lot of power. Just idling, the bot drains a 9V battery in just under an hour and a half. A direct USB connection or an AC adapter is required to keep the little guy happy. We found a discarded adapter in the server room that provides 12V at 800mA, which is perfect.
- Tension spring. This keeps the bobblehead level when the bot is inactive. The platform is hinged at the front. A servo pulls the back of the platform down, and the spring returns it to level again. Other things we tried (unsuccessfully): rubber bands, chewing gum, happy thoughts.
- Arduino Uno. The brain of the bot is the Arduino board’s ATmega328 microcontroller. The tiny program (less than 28 KB) stored in the chip’s flash memory detects signals from a connected WiFi adapter, and on receiving appropriate instructions, activates a servo motor to pull the platform down.
- Servo connection. These wires provide signal (yellow), power (red), and ground (black) connections between the Arduino board and the servo.
- Blinky light. When glowing steadily, this LED indicates that everything is connected and running smoothly. When blinking erratically or completely unlit, this LED indicates that I’m spewing profanity at some bit of code that isn’t working properly.
- RN-XV WiFi adapter. Once hooked up to a WiFi network, the adapter makes a connection to Pusher, a service that sends messages between web apps. I wrote a tiny Ruby app that runs on Heroku and constantly scans Twitter’s stream for keywords, then sends a message to Pusher when it finds a match. When someone tweets the phrase “Mariners commercials”, the Ruby code sends a message to Pusher, which then passes it along to the Arduino board for action.
- Erector set chassis. Better known as Meccano on the other side of the Atlantic, Erector provides the perfect medium for mechanical prototyping. We tried a few different designs before settling on the frame pictured here.
- Servo motor. The bot’s muscle is provided by a small servo motor. We were initially worried that the servo wouldn’t be powerful enough to pull against the spring; the bobblehead is heavy, and the spring requires a fair bit of tension to keep the platform level. We needn’t have worried. Before bolting the bobblehead and servo into place, I made a test run, holding everything in place by hand. The servo nearly jerked the whole assembly out of my hands. I have a new respect for the physical power of our future robotic overlords.
- Lovingly hand-crafted servo linkage. The Erector set didn’t have a part that would work, but we had a lot of 22-gauge copper wire hanging around. Strip off the insulation and perform a little surgery with pliers and it serves as an attractive connection between the servo and the bobblehead platform.
And what does this delightful contraption look like when it’s running?
We’ve also helped other social media escape the confines of the internet and join us out in the real world. The flashing musical extravaganza on the left was built for Visit Seattle in connection with the 2 Days In Seattle campaign. It responds to tweets with the hashtag #2DaysInSeattle. The terrifying construct on the right took part in Copacino + Fujikado’s 15th anniversary celebration, swinging its mighty tweethammer at a piñata when people tweeted party pics with a #CF15 tag. It was a Mexican-theme party, so the piñata made sense, I promise.
Where else can we go with Arduino? The flow of information can also go the other direction, so switches, buttons, or sensors connected to Arduino can control web apps through direct physical input. This two-way communication adds an important tactile dimension to online interaction. Engaging the sense of touch, even in a limited way, adds a lot to a medium that traditionally caters only to vision and hearing.
We’re looking to build more complex projects, expanding on these early efforts to make more compelling connections between the physical and online worlds. Hooking up the internet to real-world objects has potential to attract, engage, delight, and inform. And really, who wouldn’t want to build an army of robot minions to do their bidding?