Instructables
Flying model rockets is fun, but there is always the question of how high did it go. Using a programmable micro-controller and some sensors, you can monitor the entire phase of flight and measure acceleration and altitude, among other things. With this project, I’ll show you how I did just that, using off-the-shelf open source hardware and software to build an Arduino compatible flight telemetry system.


Model rocketry telemetry is nothing new. Amateurs have been stuffing electronics in rockets since the beginning of the hobby. A programmable micro-controller coupled with a low-power radio, however, allows us to take the hobby to a whole new level. What makes this project notable is:
- Wireless data transmission allowing in-flight monitoring or post-flight data downloading without the need to physically access the on-board hardware.
- Constructed from easily available open source hardware and software, allowing anyone with modest soldering and programing skills to put together a configuration to acquire and record any data they desire. No custom PCBs, chip programmers, or toolchains to setup as in my last well received, but little followed Instructable (http://www.instructables.com/id/Buggy-A-Crafty-Programmable-LED-Creature/)!

If you haven't heard of Arduino yet, or if you are rolling your eyes at "yet another Arduino project", you should read Phillip Torrone's take on it and his prediction that "within the next 5 to 10 years, the Arduino will be used in every school to teach electronics and physical computing."


Details, in brief:
A 50 gram, on-board micro-controller collects pressure and acceleration data and then transmits it on 915 mHz using a Hope RM12 module at a rate of about 50 reading per second. A separate micro-controller connected to a laptop via USB receives the data and transfers it to a serial port. A software program running on the same computer graphically displays the data as it is collected, and also saves it to disk for further analysis. Piece of cake, right?
 
Remove these adsRemove these ads by Signing Up

Step 1: Hardware

The heart of this system is an Arduino compatible JeeNode micro-controller designed by Jean-Claude Wippler from the Netherlands (http://jeelabs.org/ ). It contains an Atmel Atmega 328P, which has more memory and runs faster than my first computer (a Sinclair ZX-81). The JeeNode has a significantly smaller footprint than a standard Arduino, similar to Lady Ada’s Boarduino, but also has an integrated Hope RM12B wireless module. Additionally, the JeeNode has the I/O pins grouped in to four “Ports” to facilitate standardizing sensor connections, and runs at 3.3V. JeeLabs has developed a number of sensor/breakout boards, called "Plugs" using the IC2 interface, meaning they can be piggybacked on to the same port, making the JeeNode extremely extendable. In addition to the hardware, JeeLabs provides a software library making the use of ports and assessing sensor data very easy.

I used the following hardware, available in the U.S. from Modern Device (http://shop.moderndevice.com/ ) or elsewhere from JeeLabs (http://jeelabs.com/ ).
  *JeeNode Kit ($22.50) (a.k.a. “Transmitter”)
  *JeeLink Module ($36.50, assembled) (a.k.a. “Receiver”)
  *JeeLabs Pressure Plug ($21.95) Bosch BMP085 barometric pressure and temperature sensor.
  *USB BUB Board Kit ($14.00) or FTDI programming cable
  Optional:
  *JeeLabs Gravity Plug ($20.00) BMA020 3-axis accelerometer sensor
  *JeeLabs Memory Plug ($9.50) (1 x 128KB STMicroelectronics M24M01 EEPROM)

For the full setup, you are in for about $125 + shipping. You could fly with just a Pressure Plug for altitude. You will also need batteries and a holder (I got mine at RadioShack). Consider this a small investment in your continuing Maker education. You only need one JeeLink and USB BUB. You can add or reuse as many JeeNodes as projects you dream up (or just type “Arduino” in the Instructables search box). The sensors and Port library can also be used with a standard Arduino with some effort.

Disclaimer:
I do not work for or have financial interest in JeeLabs. In fact, I would have a hard time pointing to the Netherlands on a map. I have, however, worked with Jean-Claude’s tech and find it well engineered, documented, and supported. Those are three requirements to get my hard earned money in my pursuit of hobby. I hope this sends more his way.


Makers Solder :
Each of the kits have instructions online and require some soldering. The sensors need headers soldered depending on how you position them. If you are unsure of your soldering skill, check out http://www.instructables.com/id/How-to-solder/ . If you want to see what building the kit involves, check out http://jeelabs.org/2010/09/26/assembling-the-jeenode-v5/ . Once you build this, you can definitely claim you can solder. Hacking is all about mad skills.

In my hardware configuration for the Transmitter, all the IC2 sensors are connected to Port 3, and I have a single LED and resistor hooked to the Port 4 digital & GND lines. Any variation from this layout can be easily accounted for in the Transmitter program by changing the Port numbers. I’m powering the JeeNode using 2 x AA in a plastic RadioShack battery holder. The flight assembly weighs in at about 50g, of which a little less than half is battery. A light-weight lithium ion battery would be ideal for this, but because of the near constant radio operation, it would take a bit more than a CR2032 coin cell (yes, I tried). 

Step 2: Software

If you are already an Arduinoist, you are probably already have the Arduino programming environment installed. If not, head over to their website to get and install the software at (http://arduino.cc/en/Main/Software ). I’m using Arduino version 21.

In addition to the Arduino software, you need the JeeLabs “RF12” library available at http://jeelabs.net/projects/cafe/wiki/Libraries . You will also need the JeeLabs Port library modified to get the +-8g accelerometer settings attached below. Put them in the “arduino-00xx/libraries/ ” folder of your Arduino installation before launching the software. These are required for the provided programs to compile correctly prior to uploading them, and will also give you access to the example programs if you want to try out sensors individually.

To graph and save the data on the computer, I’m using Processing. It is based on the same underlying software as Arduino, but is geared to graphical output. The language and syntax is very similar, and if you’ve done either, picking up the other is quick and easy. It also has a lot of interesting example programs installed. Download Processing from (http://processing.org/download/ ). I’m using Processing version 1.0.9.

The final piece you need is the three programs, or “sketches” I’ve written, “Transmit.pde” uploaded to the on-board JeeNode to transmit data, “Receiver.pde” uploaded to the JeeLink receiver, and finally, “Graphing.pde” running in Processing on the computer. If you have questions about uploading or running sketches, head on over to the “Getting Started” pages at http://arduino.cc/en/Guide/HomePage for Arduino, or http://www.processing.org/learning/gettingstarted/ for Processing.

But wait, one more hoop to jump. I had to modify the JeeLab Ports library in order to get the +-8g function on the accelerometer.

Step 3: Data Acquisition

Picture of Data Acquisition
serial.jpg
LAUNCH VEHICLE :
For this project, I’m using a water powered soda-bottle rocket from Make Volume 5 (http://makezine.com/05/rocket/ ). Don’t laugh. As you will see from the data, these have some remarkable thrust and speed while being safe enough to fly in the neighborhood park. And water is still pretty cheap around here at least, especially compared to pack of Estes motors and igniters. The rocket and launcher were easy to build, used commonly available materials, and have been robust in operation, all top Maker traits. This setup has served me well over several years, and I am a regular participant at a scout camp where I use them to sneak in some physics and math while having some fun. This year will add yet another level of interest!

DATA ACQUISITION:
Each of the uploaded Arduino sketches can be tested using the serial monitor for the port they are connected to (connect the Transmit JeeNode via the USB BUB or FTDI when uploading or testing). Use the same key commands for all three points (Transmitter, Receiver, and Processing):
“c” - clears the non-volatile data memory and zeros out the sensors. The rocket should be in the correct orientation for launch. Processing or Receiving should report “0, 0, 0” in the serial screen, where as Transmitter will display the information about the sensors. The Transmitter LED should flash once.
“w” - (as in “write”) starts or stops transmission and recording of data. The LED on the Transmitter will be lit when recording and a message indicating status displayed on the serial. Receiver and Processing will show a stream of data start on the serial and Processing will start to graph the data. Press “w” again to stop the data flow or it will just keep collecting until the memory is full (~2100 readings, or about 42 seconds).
“r” - (as in “replay”) plays back the recorded data from the non-volatile memory (if used). This will be essentially identical to the flight data, but will also contain any data that was lost in transmission if your rocket went out of range or experienced interference.

My launch sequence has been to do a clear, write, and read sequence prior to putting the rocket on the pad to make sure everything is powered and functional (see video). I then set up the rocket on the pad and pressurize it. With Processing running, send the clear signal “c”, followed by the write signal “w”. As soon as data starts coming in, start your count down! Processing is tracking the last 400 readings and will show the minimum and maximum acceleration, altitude, and speed. Once the rocket lands, hit “w” again to stop the data flow. If you think you lost data during the flight, bring the Transmitter near the Receiver and hit “r” to retransmit the data. The reading are saved to a comma separated values (.csv) file in the Processing sketch “Graphing/data ” folder with a time identifier in the file name. Lather, rinse, repeat. 

Step 4: Data Analysis

Picture of Data Analysis
data.png
flight4.gif
Now we've got some flight data, but is it accurate? From the read outs in the field, we see a quick (off scale) acceleration followed by an arcing altitude graph. The results are a bit higher than I would have guessed, but within reason.

One approach to validating the numbers is theoretical.  Dean Wheeler has put a water-rocket simulator on-line that accounts for everything down to air temperature. To put it to use, you need to know some key parameters. My total rocket (minus water) weighed 185 grams. I used 0.7 L of water pressurized to 60 p.s.i. (there I go mixing units again). Using Dean's suggested drag coefficient, which is the primary unknown in all this, the number fall short of measured (268 feet verses 176 feet). The calculated flight time and time to apogee are also shorter. So, what is a good scientist to do? Right, massage the data. Since the drag coeeficent is the primary unknown, and all the other data seem scaled low, I adjusted it until the maximum altitude matched. The time to apogee and the total flight time are pretty close!  (see the dotted lines in Figure 1)

There was a lucky accident here. Did you catch it? The theoretical model assumes the rocket has no parachute on its return to earth. My parachute failed to open, allowing us to directly compare the total flight time.

Of the four flights we made, only flights 1 and 4 provided data. The crash from the first flight fractured the battery holder so the micro-controller would loose power during the acceleration, leaving an eerie end to data transmission. The final flight, the parachute, making up for past transgressions, opened to early, leaving a flight in my estimate of half as high as the first.

Alas, nothing in science is as clear cut as you would like it to be. A measurement of the angle at apogee on the final flight put it's altitude at 60 feet, well below the indicated 120 feet.

Some final observations on the data. The calculated maximum Gs are ~60! That would kill a human, and explains why I have a hard time keeping fins attached to the rocket body. Also of interest is that the bottle empties of water in under 0.2 seconds, while the rocket is still just 10 feet off the ground! Some things to think about.

Step 5: Conventional Rocketry

Picture of Conventional Rocketry
IMG_3573.JPG
IMG_3584.JPG
Just by luck, we stumbled on to a Estes model rocket "starter kit" at Bi-Mart for $26. It had a large enough diameter to fit my electronics package, so it was purchased, built, and pressed in to service. I hadn't built or flown a traditional model rocket in fifteen years or so, and was pleasantly surprised how easy the kit was to put together. We went down to Alpine on President's Day and got off six flights (a $3 engine a pop) off. The first and last had the improved telemetry package (lighter battery and a high-range accelerometer), and the remainder with a cheapo spy camera .



In all, not too bad. I've got plans for a lighter, more powerful rocket so I can fly both the electronics and the video camera at the same time (we were over the recommended limit by a ways). Here are the two instrumented flights. Flight 6 was a bit lighter due to removing the helicopter recovery system, and thus went higher. It also descended slower on the parachute. Look at the "zero G" coasting after the engines shut off!

Step 6: Postmortem

So clearly, the acceleration was more than expected, and a high-G analog sensor is in order. Matching acceleration against theoretical values would give more confidence. According to the simulator, a smaller nozzle significantly reduces initial acceleration while having little effect on overall altitude (thrust time is proportionally longer).

The batteries are a problem. They are too heavy, while having more capacity than needed for a few minutes of flight. Their mass also causes problems during the occasional rapid decelerations experienced during chute malfunctions.

The radio range was far shorted than I expected. I imagine some research on antenna and positioning could improve that. I had to scratch the original title of this Instructable from "Real-time Model Rocket Telemetry ". As it was, it is certainly convenient to be able to query the controller on the pad to ensure it is functioning, and download the data after the flight without having to disassemble or connect anything.

If nothing else, I hope you've seen how easy and fun it is to incorporate an Arduino in to a hobby. If you want to see more of my craziness, check out my model train layout operated by, yes, you guessed it, an Arduino! It uses a Wii Nunchuk for input!

Now, go be a Maker!
kbckiwi5 months ago
You could try using an Xbee radio. There are plenty of versions available with different ranges from 100 meters up to 16km
halamka7 months ago

I wish the computer was a commodore or atari.

Lt. Rooney8 months ago
I know it's been a while, but I can't get any kind of response from the JeeLink when I upload Transmit. Is there some further change that I should make to get this to work? I know the included libraries needed to be updated before any of the codes would compile.
MakersBox (author)  Lt. Rooney8 months ago
When all else fails, fall back to the last working sketch. Have you been able to get the example Jeenode code for each of the sensors to work? What all have you got hooked up?
The RF12 demo works fine on the JeeLink and both the receive and transmit sketches compile. I have the Jeenode and plugs connected as you recommend in the instructable. But when I try to test it I get no response from the receiver.
MakersBox (author)  Lt. Rooney8 months ago
Sorry you are having trouble. I'll have to pull out my hardware and see if I can replicate the problem. What Arduino IDE are you using?
1:1.0.5, the most recent stable version.
jhunmar1002 years ago
Hey aspro648, how did you make the rocket??? can you gave me a steps in making your rocket...???

God Bless.
MakersBox (author)  jhunmar1002 years ago
Surely somebody has done a soda-rocket Instructable. I built mine based on an article in Make Vol. 5.
Wazzupdoc3 years ago
Great addition to the literature of Makeology. Always something to glean from other's projects. We all stand on the shoulders of giants and you've done some nice "up-stretching"! Thanks for a great 'ibble.
Tried your project, but the sketch doesn't compile. You made changes to the Ports library that are not part of the official version "setRange, getRange, setSettings, & getSettings. Could you tell us what they are?

Thanks
MakersBox (author)  grateful_dead3 years ago
Sorry! It turns out I modified the Ports library to get the accelerometer +-8g settings. I've uploaded the modified file to the instructable. Let me know how that works.
_Scratch_3 years ago
A water rocket can pull 8Gs?? Wow...
MakersBox (author)  _Scratch_3 years ago
8G was the limit on the accelerometer. The simulator calculated 60G. That's probably more than twice what a Estes rocket with a C motor would pull. I've got a 250G sensor now and just need some flight time!
again, wow. And i wouldn't be surprised if an Estes rocket with a c motor could pull 40-60Gs, those things are fast, if you use a d motor, you can barely see it leave the ground before its 700 feet in the air.
sbiltoft3 years ago
Could you put a small antenna with an amplifier on it and get a range of miles? Or would it be possible to use GPS. I'm wondering in hopes of doing a near space balloon project without having to use the SPOT GPS system that we have. I've done the project with the SPOT and a CBL with sensors but I thought it would be cooler to do the project more from scratch...
MakersBox (author)  sbiltoft3 years ago
If you are looking to extend range, I think an XBEE radio would be the way to go. They have a higher power transmitter and more antenna options.

For a balloon, I would definitely go GPS because you would want to track it's horizontal movement as well as altitude. I've seen a couple of balloon projects that return fantastic photos from 100k+ feet.
OK. We'll continue with using the SPOT GPS system then, tt worked well last time. Plus you can track it on the internet which makes it nice.
snooprob3 years ago
Great project, and i appreciate the video. Why do you need the wireless capabilities, when it seems you can download it via USB after the flight? Is it just for convenience?
MakersBox (author)  snooprob3 years ago
The original idea was to monitor it in-flight, but the range has been limited. It is nice to not have to hook it up to query it, and also, since the non-volatile memory is limited, it lets you start the read & record cycle right before launch.

I've got the radio range up to 300 feet now, and am working on a standard Estes rocket to try it out on.
ANDY!3 years ago
what's the range for the wireless transmission?
MakersBox (author)  ANDY!3 years ago
The way it was set up, only about 100 ft. I think I had a loose solder joint. I just put on 1/2 wave mono-pole wires (~6") on both the transmitter and receiver it was getting good reception at 300 feet (91 m). The transmit power is only 15 ma, so I guess we can hope for too much more than that.
CrLz3 years ago
This is an awesome build and a great Instructable! Thanks for sharing and the links.

Well Done!
bertus52x113 years ago
Great! I'm working on an I'ble involving shocks and I always wondered if the electronics would survive it.
You have answered my question!
That is awesome!
wizgirl3 years ago
thanks! i think i'll try this!
TSC3 years ago
sweet!