Feeling the need to create something needlessly complicated to short a battery across the ignitor of the chemical rocket motor I turned to my Arduino Mega.
I already have a dot matrix display for my Arduino and have been using it to scroll the word ‘NortHACKTon’ when we go to the NortHACKton pub meets so that those people looking for geeks in a pub know who we are ”(cos we would’t stand out enough without it )”. I figured the dot matrix could be used to provide a visual countdown and the Arduino could activate a relay which connects the 9V supply directly to the rocket and then whoosh off it goes.
It’s a very simple little board, consisting of a driver chip and a relay and the connection to the dot matrix display. I chose to use the ULN2003 to switch the relay primarily because the package already contains a freewheeling diode and can be directly driven from the arduino and secondly because I have 3 tubes of them in the shed already due to a misorder on a previous project. The dot matrix was also used on the same project. It is the 0832 from sure electronics and can be brought pretty cheaply on ebay, for only £7 inc P&P.
Being an arduino most of the code is already written in other projects, (that is after all why we use arduinos isn’t it?). The program needs to read in the input from the micro switch to determine when the countdown should be running, it should only count down while the switch is depressed. When the countdown reaches zero the arduino should trigger the relay should be activated. Both of these functions are standard IO type code using digitalRead and digitalWrite. The DotMatrix is driven by the “Matrix Display” Library. The display is initialised when the program starts and images displayed by turning single pixels on and off.
I modified the Font.h file slightly to incorporate more of the ascii characters so I have included my version of the Matrix display library in the source code attachment. If someone were to be really keen I would suggest moving the character mapping function into the header too and creating the rest of the ASCII characters for the display. It’s on my list of things to do along with a variable width font, but that list is already pretty large so this won’t be done for some time.
The scrolling display displaying the NortHACKton url is created using the drawString functions provided as part of the library. The rocket and abort animations are defined as byte arrays at the top of the code and drawImage function simply calculates the visible part of the array and writes that data to the display.
Steve setting up the rocket
The arduino rocket launcher ready for action
More photos of the rocketry day can be found here