#makewithmaxim Model Rocket Data Acquisition and Telemetry

My entry for the #makewithmaxim contest is a data acquisition and telemetry payload for a model rocket, a base station and software to control the payload and analyze its data.

The project, although not entirely successful in its first flight was a lot of fun. Perhaps some aspects of it might be useful for other rocketeers.

The MAX32630FTHR board was mounted on a custom 3D printed base along with GPS and RFM95W featherwings from Adafruit, a MAX31865 amplifier/AD board and PT100 temperature sensor, a solid-state light sensor and a small LiPo battery. The RFM95W radio was chosen because it is capable of transmitting for reasonably long distances. My testing showed it was capable of several km range. The payload fits inside the nose cone of an Estes “Executioner” model rocket. Holes were drilled in the nose cone for mounting screws, for the light and temperature sensors and for the USB connector. The rocket body shock cord and parachute attached to the bottom of the 3D printed base. Firmware for the payload is written using the mbed online environment and makes heavy use of existing mbed libraries as well as several ported Arduino libraries from Adafruit and Radiohead. Two custom libraries were also written for a data fifo and software SPI. The payload collects data from five sensors.
  1. Built-in accelerometer : X, Y and Z acceleration forces at 100 samples/sec
  2. Battery voltage : Using the MON output on the MAX14690 PMIC. The firmware will also automatically power down on low battery detection. Battery voltage is sampled every 5 seconds.
  3. GPS : Fix status, latitude, longitude and altitude at 1 sample/sec
  4. Light level : The output of a Everlight ambient light sensor is recording using an analog input at 100 samples/sec. I added light level monitoring as a nod to very old model rocket telemetry system that used a photocell to control an oscillators frequency. The oscillator output was transmitted to ground using an analog radio and the rocket’s rotation could be determined by listening to the “warble” as the rocket rotated.
  5. Temperature : A PT100 RTD temperature sensor processed by a MAX31865 provides temperature data at 10 samples/sec.
The base station consists of another RFM95W radio module and a PJRC Teensy-LC micro-controller board. It presents itself as a USB serial device to a host computer. Data communication between the payload and host computer are simple ASCII carriage-return delimited lines of text. Firmware for the base station is a simple Arduino environment program using the Radiohead library and USB serial capability of the Teensy-LC.

The payload data interface carries both ASCII commands and data sentences. Data sentences are in a form inspired by NMEA protocol and include a checksum. The same data interface is available over the radio link and MAX32630FTHR DAPLINK debug serial interface. The command set includes:
  • status - Returns status including recording state, battery voltage and temperature as well as GPS fix status, coordinates and altitude
  • file - Allows setting the recording filename
  • dump - Allows dumping a file (either the current recording file or a specified filename) through the interface. This is very slow for large files and lossy without a more sophisticated protocol layered on top of the basic Radiohead broadcast mechanism.
  • dur - Allows setting the duration of a recording session (seconds).
  • msd - Enables USB mass storage device mode to access the micro-SD card. I made a small change in the mbed USBMS library to prevent it from attempting to connect when the C++ object was instantiated.
  • send - Enables telemetry of a selected sensor over the interface at a one sample per second rate. The main use of this feature is to transmit GPS coordinates during flight with the idea that a rocket that went out of sight. It is also useful during testing.
  • record - Triggers a recording session. Is used immediately before launch.
  • shutdown - Commands the PMIC to shutdown power to the payload. Useful because it was not possible to access the small button on the MAX32630FTHR board and I decided, after some experimentation, that an external switch presented a reliability issue.
  • help - Displays the commands and arguments.
A software application was developed using the Xojo cross-platform development environment. It provides a command interface (essentially a simple terminal), a mapping function that can take a GPS data sentence and provide its location, a graphing function for acceleration and rotation data and a list function for individual sensor data. The individual sensor data can be cut&pasted into other applications for further analysis. The GPS data can also be exported for further mapping. For example it can be fed to the gpsvisualizer.com website and the output from that website fed into the google earth application for plotting.

View attachment 188850

Flight Sequence
  1. Prepare rocket : Load engine, wadding and parachute.
  2. Setup base stations : Connect the base station to the computer and start the Rocket application. Connect to the base station radio and verify it identifies itself.
  3. Power-on payload : Use a USB cable to trigger the PMIC to power-on the system. Verify the base stations receives the “HELLO” message from the payload.
  4. Achieve GPS fix : Use the “status” command to tell when the GPS has a fix. The coin-cell battery (which is held in place with additional hot glue) makes repeated start-ups in a location much faster.
  5. Rocket on launchpad : Connect launch controller and verify continuity.
  6. Start GPS telemetry : Use the “send gps on” command to start transmitting GPS coordinates to the application
  7. Start recording : Use the “record on” command
  8. Launch!
  9. Track : Use the GPS telemetry to track the rocket after landing. The last GPS coordinates can be fed into the
  10. Shutdown : After the payload has been either located or recovered, use the “shutdown” command to power it off.
Flight Data Analysis
  1. Connect payload using USB
  2. Establish communication using Rocket application and base station
  3. Offload data : Enable mass storage mode with the “msd on” command and copy data to the personal computer once the payload appears as a USB storage device.
  4. Analyze data : Load the file into the Rocket application and press Analyze to process the individual sensor data. Acceleration and rotation sensor data is also graphed.

BOM & Schematics
The Schematics and BOM for the electronics (both payload and base station) are available on the DigiKey schemeit system. Most everything is orderable from DigiKey. I used a 100 uF/16v electrolytic capacitor I had laying around to provide burst energy for the base station transmitter since, according to spec, its power requirements exceed that of the Teensy's 3.3V regulator.

I chose the Estes "Executioner" rocket primarily because it was both available at a local hobby store and had a large enough nosecone. I'm sure there are other rockets that would work as well or better. The primary aspect will be the size of the nose cone and ability to carry a payload. Get the biggest engines you can!!! You'll also need a launch pad for your rocket.

An upgraded parachute is also necessary (as I found out!). I haven't sourced a new part yet but I see there are much sturdier parachutes available from the model rocket companies. I will probably go with something larger than 30 inches.

The design files for the 3D printed payload base are included in the attached CAD file. This should be printable on any type of printer.

Building this project requires several subassemblies. Each build will probably vary depending on the chosen rocket and other parts the builder has laying around.
  1. Rocket : I followed the Estes instructions
  2. Payload : The 3D printed base requires drilling several mounting holes. The payload was building using standoffs with direct board-to-board wiring. I like nylon wire because it is flexible and easy to solder. The parachute and rocket shock cord are mounted to a pair of screws on the underside of the base.
  3. Modified nose cone : The bottom of the base is removed and holes drilled to allow mounting the base. Additional holes are drilled for the light sensor, temperature sensor (which is pulled, using tweezers, just outside of the nose cone envelope prior to flight) and the USB connector.
  4. Base station : I just attached the two PCBs using think 3M double-sided tape and directly wired them together.

View attachment 188848

View attachment 188849

Source Code
The MAX32630FTHR firmware is available on the mbed website.

The attached code.zip file contains three things.
  1. Arduino Base Station Code: You'll also need the RadioHead library.
  2. Rocket Application: I've included the xojo source code, the dataplotclasses library and a pre-built executable for MacOS. The xojo development environment allows you to view and run the source code without requiring a license so you can edit and run this code for free.
  3. 3D printed payload base: The SCAD design, STL and gcode files I used to print the base. You'll want to create your own gcode file for your printer.

Blog entry information

Last update

More entries in General

More entries from djdesigns

Share this entry