Yesterday I headed over to a local trotting track with Thomas to meet up with Marc Alexander, Rohan Fernando, and their kids to do a couple of launches with Marco Ostini's class-C rocket fitted with an Arduino telemetry payload. Rohan brought a video camera and Marc brought a still camera, and it was a beautiful day so we got some really good coverage. This was a triple-purpose trip: Arduino development for Practical Arduino, rocketry education for Lunar Numbat, and an excuse to have some fun.
Because class-C rockets are so small and light they can't lift much of a payload and I had to keep the mass of the electronics as small as possible. You can get a sense of scale from this photo which shows a small white bundle in the bottom of the nosecone. Inside that bundle is an Arduino Pro Mini 5V/16Mhz, a 433Mhz transmitter module, and a Lilypad 3-axis accelerometer:
The Arduino runs some code that reads the accelerometer values, pokes them out the transmitter using Mike McCauley's VirtualWire library and waits for the message to go out, then loops back to the start. The result is a stream of values that is pretty much rate-limited by the 2Kbps transmission rate.
On the ground I had my laptop connected to an Arduino Duemilanove with a 433MHz receiver module:
Running on the laptop was a little piece of code that read values coming from the USB port and displayed them on screen while also writing them to a logfile. This shot shows the values scrolling on the screen while I'm holding the rocket and giving it a bit of a shake:
The launches worked really well, but in the end I don't think the accelerometer data is going to mean anything much at all. I learned a very important lesson: always, always, always put an absolute timestamp in with the data, even if there's a relative one in there! The values came out looking like this:
where the columns are:
1: Time in milliseconds since the Arduino booted
2: X force
3: Y force
4: Z force
That data segment is from around the time of the second launch with the Z value stable at around 394 while the rocket was stationary then jumping to 604 and falling to 500 over the next 800ms.
Which brings me to the second lesson learned: comms failed right at that point, less than 1 second after launch. So the el cheapo 433MHz modules from Jaycar just didn't manage to do the job.
I have a pair of 60mW XBee modules from SparkFun that are a lot bigger than the 433MHz modules but should be good for 1Km+ range, so for next time the 433 modules are out and XBee is in.
One of the launches captured at just the right moment by Marc, with Thomas holding the launch controller and my arm around him:
The extra mass in the nosecone didn't seem to hinder the launches at all, but because I used C6-7 motors with a 2 second separation delay there was a heart-stopping moment when it reached apogee, turned over, and started coming straight down *really* fast before the charge fired and the chute deployed. On the second launch I thought the separation had failed because it descended a very long way before it fired, so the final lesson for the day was to use motors with a smaller separation delay when working with a larger payload mass.
(Photos in this post copyright 2009 Marc Alexander, all rights reserved, used with permission)
With too many things going on at the moment it's nice sometimes when one project fulfills multiple requirements. Lunar Numbat is about playing around with rockets. Practical Arduino is about playing around with Arduino. Put them together and you get:
Which is (obviously!) an Arduino-based rocket flight recorder.
The bottom board is an Arduino Pro Mini 5V/16MHz from Sparkfun. Sitting on top of it is a 433MHz transmitter module from Jaycar, and the circular PCB to the right is a Lilypad 3-axis accelerometer breakout board. To give some sense of scale the entire assembly is about the same dimensions as a 9V battery, so it's very small and light. You're looking at it lying on its "back": the plan is that it will mount vertically in the nosecone of the class-C rocket that Marco provided so that we can log accelerometer data from a launch. When fitted into the rocket the round accelerometer board sits flat in the bottom of the nosecone so the Z-axis reading will align perfectly with the direction of flight.
I have a 5Hz GPS module in-transit from Sparkfun at the moment too, so if that arrives in time I'll up the ante and try to get the system transmitting x/y/z force plus lat/lon/altitude every 200ms. If everything works out well we may even get a nice flight track from the location points.
My family and I spent the Easter long weekend at the in-laws place in Stawell. I happened to have a little hobby rocket with me (supplied by Marco Ostini so Andy and I could do some preliminary avionics testing for Lunar Numbat) and while sitting on the veranda munching on Easter eggs it suddenly seemed like a good idea to combine the two.
Or view directly at:
At least now I know we can put 27 grams of extra mass in the nosecone when it comes to sticking an Arduino in there with an accelerometer.
Do you know of anyone with a large property near Melbourne's East who wouldn't mind a couple of model rockets being fired up into the sky? By "large property" I don't just mean a big backyard: I'm talking more like 20+ acres. Andy Gelme and I need somewhere to launch a class-C rocket so we can test an Arduino-based avionics / telemetry system we're working on for Lunar Numbat. If you know somewhere suitable please drop me an email or give me a call on 04 3851 6600.