The general aim of this project was to find a relatively cheap and reliable altitude remote datalogging system for a model rocket.
The system that I came up with is outlined below along with photographs. At the bottom you can find the complete circuit schematics for the transmitter and receiver, along with the corresponding PICAXE code for the two parts.
I decided to go for the altitude sensor approach, largely because it’s cheaper than using an accelerometer. And whilst it required more time to get it working as it should and getting a useable signal from it, that was half the challenge. The sensor I picked was the Motorola MPX4115A.
This sensor is used for pressures between 0 – 115 kPa. Bearing in mind mean atmospheric pressure at sea level is 101kPa, and drops to about 84kPa at around 5000 feet, we need to narrow the range down considerably. I chose 5000feet as the maximum for this project, as it gives me a reasonable range (not that a rocket is ever going to reach 5000feet) whilst giving me a resolution of about 5 feet. A differential amplifier using the MAX494 quad rail-to-rail op-amp was used for this.
The signal, after conditioning, is fed into a PICAXE 18X microcontroller which reads the analogue signal into a 10bit ADC. The value is then transmitted back to the receiver station over a 433mHz RF link.
In addition, the 18X does other things:
· After every single reading, it checks to see if this reading is the new peak altitude (ADC value lower than previous – as voltage falls with increasing altitude). It logs the peak altitude in its internal EEPROM.
· It records a “zero” value at the beginning of each flight. When transferred to a computer, this “zero” value can be taken away from subsequent readings. As such, it eliminates the problem of changing atmospheric pressure between flights.
· One in every 10 or 20 (depending on log time) readings is logged to internal EEPROM as well as being sent over RF. This is so that, in the event of the receiver failing, huge amounts of interference, etc, some data from the flight is still available from the onboard device.
A cheap (£10) 433mHz pair of RF modules were used for this. There’s not much to say – they work perfectly sending serial data directly through them. I found N1200 was the fastest baud I could use whilst getting nearly perfect signal over around 80-90m range. At N2400 baud, the range decreased to around 50m – the time saving of doubling the baud was not worth the loss in range.
Note: I used a full wavelength whip antenna at the time for this project. I later discovered 5/8 wavelength whip is far better. If this is too long, a 1/4 wavelength whip will still give better results than a full wavelength one.
The receiver is not very interesting – at least not as much as the transmitter. When switched on, it waits for a “start logging” command from the transmitter. Once received, it waits for the beginning of the data stream. It takes each reading, makes sure it is 1023 or below (because it is only 10bit ADC, any higher values MUST be interference). There is no parity or CRC, as this technique of “1023 or less” catches 99% of errors, after extensive testing! The data is then logged to a 24LC256 EEPROM. When required, the data can be read back to a computer; either in plain text, or in SelmaDAQ mode. This puts the data directly into Microsoft Excel so a graph can be plotted, and other calculations performed on the raw results.
The transmitter is simply powered by two 3V lithium coin cells, providing 6V to the MAX883 regulator. When switched on, the PICAXE takes control of the “shutdown” pin on the regulator, keeping it high. This keeps the regulator running and supplying power to the PICAXE and the rest of the components. When finished logging (or its current task) the PICAXE sends the leg low, shutting off the circuit completely. As such, should the rocket land on a roof, or in a tree, the batteries will not run themselves down. Standby current is around 7 microamps. Idle current is 10mA, and transmitting data (ie. Peak power usage) is 17mA. As such, around 6 hours TOTAL run time can be expected from the two coin cells.
This screenshot shows data from a full rocket launch. The pressure was set at 2.5Bar. By taking away the “peak” value from the “zero” value and multiplying by the resolution in feet, the peak height can be determined (66 feet in this flight). The flight itself can be clearly discerned from the graph.
This screenshot was the data from a 35 second “flight”. I actually threw the module into the air three times during these 35 seconds. Looking at the graph, you can see this clearly. Please ignore the spike at the very end.
Jon Sowman 2008