In February 2010 I was asked if I knew of a way to throw wet sponges at someone when they donated money on the internet… A few weeks later I found myself in the back garden of a house with a hand built catapult, lot of wires and enough wet sponges to make It’s a Knockout jealous. Here’s what happened and how I made it work…
The Brief
The original brief was set by Claire Thompson as a fund-raising idea for Twestival UK. I think she wanted a simple screen display that would show when someone donated or tweeted a donation so that a wet sponge could then be launched at her in some stocks while the whole things was streamed online. I of course ran with this idea and by the time she had finished talking had proposed a sponge throwing catapult and automated launch mechanism that would fire automatically when someone donated.
The Build – Catapult
The catapult itself wasn’t that hard to build. With a huge amount of help from my father and my parents garage we made it up as we went along.
Items Used
- 2 x 4m lengths of 25x50mm externally treated wood (cut into 4 x 2m lengths to fit in my car)
- A garden gate hinge
- Something heavy (we used a large block of aluminium that we’ve had in the garage for years)
- A 5 litre container cut open to hold the wet sponges
- 2 bolts to hold on the heavy block
- A pile of wood screws
Construction took us an afternoon. I knew that a trebuchet would throw the sponges further but that they are also harder to setup and fire accurately so we settled on a classic catapult design, it only needed to last one day. We built the square frame first, then the middle bar and swinging arm before adding legs and weight.
After a few test fires in the garden it worked straight away but was obvious that it would have to be pegged down to be used. We could have made the legs bigger but we wanted to be able to get it in the boot of my car without disassembly!
The Build – Firing Mechanism
As is always the way, the hardware is the easy part, the software is the hard part! Having recently discovered the Arduino and itching to play around with the concept I started coding up something that fitted the bill. I won’t bore you with all the dead ends I went down however I did need to adjust the initial brief a little.
Items Used
- Arduino Duemilanove
- Arduino Ethernet Shield
- Arduino ProtoShield Kit
- Arduino Double Tall Extender
- Serial Enabled 16×2 LCD
- Continuous Rotation Servo
- Lots of Cat5 cable
The idea was to make the Arduino completely self running and getting it updates via the Ethernet Shield. What is the point of having an Arduino connected to a computer, you may as well programme the computer to do the same job. Having said that, I was running out of time and I realised that some people had already donated money to the cause. People that had already donated were due a sponge throw so while the system had to be automated it needed a way of manually adding launches.
Getting the Arduino to connected to the internet wasn’t too hard however I would be using this in a strangers back garden with no way of knowing how they connected to the internet. I decided to use the excellent DHCP and DNS library’s from Georg Kaindl which once set up saved me huge amounts of time debugging problems.
I also wanted a way of thanking the users that donated so used a serial enabled LCD screen to display where the donation had come from. This also proved very useful when it came to debugging as the serial console takes a long time to start on my computer (damn you Java). Using the LCD screen meant I could display debug information about the DHCP lease or status of the program without having to connect a computer.
The final part of the puzzle was the release mechanism. I used the servo and some gate hooks/eyes to create a firing pin which you should be able to see on the video below.
The program was originally setup to search twitter for keywords and while I could make it work I couldn’t guarantee that tweets wouldn’t be missed. I wanted to tie it into PayPal or another payment system but time was running out and I didn’t have any of the charity account details. So, I decided to cheat :-p
So that I could control the catapult remotely I decided to use the excellent txtlocal service which gives a free API for incoming SMS (and very good rates on outgoing ones too). This meant that I could send a text message from my phone and fire the catapult while displaying any message I like on the LCD screen. This was also a hack so that I can rate limit the firing and not miss any donations but it worked well!
The Results
On the day there were a few problems. The catapult was connected to the internet and worked perfectly! We did loads of test fires and there was no problems at all. Then we launched Ustream, and everything stopped. Ustream worked fine, the catapult worked fine, but the two together wouldn’t work at all. My hunch is that Ustream data was flooding the Ethernet shield and blocked all communication. After much cobbling we got things working enough to throw wet sponges and much fun was had by all.
Final Notes
Seeing as this entire project was done in a few weeks in spare time I think it went quite well. I have missed out a lot of my trial and error but please feel free to post questions in the comments and I’ll attempt to answer.