The FT Xmas Tree

Last month, for our company Christmas card at Fantastic Thinking, we decided to have a go at tapping into the emerging realm of ‘the internet of things’.
The basic premise was to invite people to open a physical, internet connected present to the tune of a traditional Christmas song, sung by one of a select group of people in the agency, via the power of the internet. The project was a team effort, with the website being designed by Digital Designer, Dave Williams, and developed by Front End Developers, Declan Smith and Phil Larner. My role within the project was to design, build and programme the physical aspect of the experience.

Here’s what we came up with: http://fantasticthinking.com/ftxmastree/, and here’s how it was built…

The Mechanics:

There were essentially three mechanical elements to the box; the lid mechanism, the rising platform – made possible using a scissor jack mechanic and the rotating turntable on which the tree is fixed.

The build began with the main structure of the box. I built a strip wood frame approximately 3ft cubed with a slightly higher rear section to incorporate a pulley system which could be used to raise and lower a scissor jack mechanism inside the box. The second main task within the build was to create the actual scissor jack mech complete with a platform on top of which a small 2ft Christmas Tree would sit on a turntable. Finally two lid sections, hinged from either side of the box and raised rack and pinion style lever, were added to the top.

This slideshow requires JavaScript.

The Electronics:

Driving the three basic mechanisms within the box; the lid, the platform, and the turntable, were three independently controlled motors operated via a sketch running on an Arduino Uno. Both of the heavy lifting mechs: the lid, and the platform, were powered by Technic Power Functions XL motors, wired via separate H-Bridge Integrated Circuits (IC) which allow each motor to drive in both directions at controllable speed. The turntable was powered by a Technic Power Functions M Motor which was simply wired via transistor as less precise control was required here. All of the motors in the box were powered by a 9v power adapter running through the Arduino board.

The Code:

Driving the whole box was an Arduino sketch which contained a series of functions to articulate different states of the box, i.e. lid open, lid closed, platform up, platform down, rotate tree, and finally, a function which combined all of those actions to perform the completed sequence. I then developed a Processing app with a basic user interface which ran on a computer connected to the box, to allow it to be triggered by tweets and be operated on demand from within the office.

The Twitter search functionality was made possible using the Twitter4J library and the Twitter API. I experimented with trying to get the Twitter stream API working within Twitter4J but struggled a bit, and with time being tight, I decided to set the app to check twitter every 5 mins and respond to the most recent tweet with a box opening. This way, there would be no problems with queuing an unknown amount of tweet requests or overloading the twitter API request rate.

With the box built and operating, we then set it up in it’s own area within the office to record sequence that would be played back to those who tweeted it through the website.

The Box in situ.

One of the biggest challenges on this project, was creating a stable enough platform that could be raised and lowered. I experimented with various combinations of pulley system as they can be a really effective method of lifting a load. The most useful technique I found was the block and tackle method, whereby the physical force required to lift a specific load can be reduced by spreading the weight across a number of pulleys. The only downside that I found of using a higher ratio pulley system was that I needed a longer length of cord to pull the weight which also meant reeling in a greater amount. This unfortunately caused the spindles on the mechanism to slip apart which caused stress on the motor as the spindle tried to push apart the frame it was mounted in.

As such I used a very basic top down pulley which just about worked. If I had to build this sort of scissor mechanism again though – I think a better of doing it would be to use a threaded dowel attached to the fixed end of the platform which could be driven along by a block attached to the free end of the scissor mech – a method very similar to that used on car jacks which operate by turning a handle to raise or lower the height.  This would provided and great deal more stability and mechanical advantage to the platform.

We left it running live in the office for a couple of weeks in the lead up to Christmas and had it responding to tweets it received off the back of promotion via Twitter and an e-mail to our clients. We also had some really good feedback from clients and staff alike, so on the whole I think the project went really well.

And finally props to these resources for handy advice and examples that made certain elements of the project a little easier 🙂

Processing:     http://processing.org/ | http://processing.org/reference/ | http://forum.processing.org/
H-Bridge setup:     http://itp.nyu.edu/physcomp/Labs/DCMotorControl
Twitter4J:         http://twitter4j.org/en/index.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s