Introduction: Arduino Rocket Data Logger

Picture of Arduino Rocket Data Logger

This instructable will show you how to make a model rocket with a data logger payload.The data logger uses an Arduino Pro Mini and a GY-86 IMU (Inertial Measurement Unit - typically used in quad copters) to record altitude, temp, pressure and g force. The data is stored on an SD card and also broadcast via a Bluetooth module. The live data can be seen on your Android smart phone using an app called Talking Serial Monitor . This helps validate the code is working when the electronics are mounted in the rocket before launch. A small alarm has been built in to help you find the rocket if it gets lost! You can either build your own rocket or use a rocket kit. The data logger weighs 35 grams and will fit rockets with an inside diameter of 30mm or larger.

Building a rocket is fairly straight forward, requiring only basic tools. The data logger is a little more involved and may require some fiddly soldering (depending on your approach).

Disclaimer: The data gathered is approximate allowing you to visualise the rockets trajectory and see how high it actually went as well as the acceleration events and average speeds. More detailed info on model rocket physics may be found here.

Rocketry can be dangerous, make sure children are supervised and you launch in a remote area. Check the air laws concerning small rockets before launching in your area!




  • Estes BT55 Body Tube
  • Estes NC-55 Nose Cone
  • Estes BT 55 Body Tube Coupler
  • Estes D Engine Mount Kit
  • Estes D12-7 Motors
  • 5mm Balsa sheet
  • 5mm foam board
  • Launch pad
  • Electric igniter.
  • Parachute
  • Elastic cord
  • Recovery wadding


  • Hobby knife
  • FTDI - USB adapter
  • Glue gun
  • Wood glue
  • Soldering iron
  • Acrylic paint

Step 1: Rocket Design + Build

Picture of Rocket Design + Build


You may want to start by sketching the design of the rocket on paper or do a mock up model in Sketchup to check the data logger will fit.

You can optimise your design by downloading a free program called Open Rocket. This allows you to simulate your rocket design with different motors, body sizes, fin and nose cone shapes as well as payload weights. I have attached my open rocket design to get you started.


If you use Estes components as I did the actual build is relatively simple.

  1. Start by making the motor mount as detailed in the Estes instructions.
  2. Draw out your fin shape on paper, cut this out and transfer the outline to the balsa sheet.
  3. Cut the fins out using the hobby knife.
  4. Draw a circle on a piece of paper the same diameter as the body tube with lines at 120 degrees. Place the end of the body tube on the circle and align the fins using the guide. Use some glue to attach the fins.
  5. Cut the body tube and glue in the body coupler. This is the part that will separate when the rocket deploys the parachute. The lower portion will contain the motor and parachute. The upper portion contains the data logger and nose cone.
  6. Attach a shock cord between the two sections.
  7. Install a parachute, these can be made from a plastic bag or bought from Estes.
  8. Decorate the rocket as you like.

Step 2: Wiring Diagram

Picture of Wiring Diagram


Its best to build the circuit on a breadboard to test and refine the code to suit you before hard wiring things together. I used an arduino uno to test the components then hard wired an arduino mini. The pinouts are the same for both boards.


  • 5V
  • GND
  • CS - PIN 4
  • SCK - PIN13
  • MOSI - PIN 11
  • MISO - PIN 12


  • 5V
  • GND
  • SCL - PIN A5
  • SDA - PIN A4
  • INTA - PIN 2


  • 5V
  • GND
  • TX - RX
  • RX - TX


  • The balance connector that comes with the battery was replaced with a JST connector.

Once your happy with the logger you can solder the components together for a secure connection (see step 4).

Step 3: Data Logger Code

Picture of Data Logger Code

How it Works

The code operates by taking the data from the GY-86 and making a string that it prints to the SD card. The GY-86 has a 3 axis accelerometer, gyroscope and magnetometer built in as well as a barometric pressure sensor. It uses 3 chips, an MPU6050, HMC883L and an MS5611 to do this. For simplicity the code only uses the accelerometer readings in one orientation and the barometric data (i.e it only measures accel readings in the vertical orientation). If you want to carry out more complex analysis of the data you may want to add more data to the string by modifying the code.


Install the following libraries by going to Sketch > Import Library...>Add Library...

  • wire (should be included in the arduino IDE)
  • SPI (should be included in the arduino IDE)
  • SD (should be included in the arduino IDE)
  • MPU6050 - the file attached has been modified to allow the sensor to sense up to +-16G.
  • I2Cdev
  • MS5611

Upload the code to the arduino once the libraries are installed.

You should see a string being printed to the serial monitor like this


This string is split like this

  • First number = absolute altitude in meters
  • Second = temperature (this may over read initially, it should stabilise if left to run)
  • Third = pressure in pascals
  • Fourth = raw acceleration reading (divide by 2048 to get value in G)
  • Fifth = time in milliseconds since the code started running.

Test the acceleration reading is correct by holding the sensor in the X direction, the value should read around 2000. Dividing this number by 2048 will give you a "G" reading of around 1 which is 1 G which is 9.81m·s−2

You should be able to see a change in temp by holding the sensor. You should see a change in altitude by lifting the sensor up or down. The buzzer will only work if the SD card is inserted. I have indicated in the code what numbers to change to alter the buzzer time delay and tone. The buzzer isn't terribly loud but will help you locate the rocket in long grass etc.


Connection via an Android phone is straight forward using the Talking Serial Monitor app. Make sure your phones Bluetooth is on, turn on the arduino and click connect on the app. It may ask for a password which is probably 1234 or 0000. Once connected a solid blue light will light up on the Bluetooth module. The data that would normally be seen on the serial monitor will now be shown on the screen. This feature was included so that you can check the arduino is working correctly before launching.

Step 4: Building the Holder and Hard Wiring

Picture of Building the Holder and Hard Wiring


  • The holder was built from 5mm foamboard and can be modified to suit your rocket dimensions.
  • It is simply two disks that fit snugly inside the body tube with a flat piece connecting them.
  • Cut key ways in the disks and flat piece so that they fit together then secure them with hot glue.
  • Cut a small slot to allow wires to be routed from one side to another.
  • When mounting the electronics use a small piece of foam board to act as a standoff then glue the circuit to that.

Hard Wiring

  • It is important to mount the GY-86 correctly, mount it in the x direction ( x arrow pointing up towards the nose of the rocket).
  • If you hard wire your components the logger will be more compact and robust enough to withstand the forces associated with rocketry.
  • Hot glue can be used to make sure the connections are extra secure.
  • This job was fiddly, you could use short jumper wires here if you prefer not to solder, this will be a little more bulky and the connections less secure.
  • The Bluetooth module was glued on top of the battery to save space.
  • When mounting the SD card reader make sure there is space to allow the card to be inserted and removed. I had to cut a small slot in one of the end disks to allow for this.

Step 5: Launch and Data Processing

Picture of Launch and Data Processing

Before launching the rocket use the app to ensure the logger is working. Attach some tape round the nose cone to prevent it coming off during the parachute deployment. Launch the rocket in an open area!

Once you have completed your flights its time to get the data from the SD card. There will be a .txt file on your SD card. Open it on your computer and copy the data into excel or google sheets. Use the format (text to columns) option to split up the data. Plot the data as you like, more information on model rocket physics can be found here:

You can now experiment with different rocket shapes and sizes, compare your data with Open Rockets predictions or work out approximate speeds and accelerations of your flight. Happy rocketeering!


adityar114 (author)2017-09-28

Um, we were planning on trying this out. I have a doubt about the bluetooth module. Will it broadcast to the android smartphone even at high altitude, or is it simply for checking the functionality of the gy-86 before launch? Because I was thinking that the range wouldn't be enough to broadcast all the way from a thousand feet above.

ralfofzo1 (author)2017-09-18

Hey Calmac, I have a question. In my country its very hard to get the GY-86 IMU. Can I use the 10DOF 9-axes L3G4200D ADXL345 HMC5883L BMP085 module GY-80 ? Thanks for responding:)

ErikO6 (author)2016-10-04

Any thoughts on building an altimeter to deploy the recovery device(s)? I've been away from hobby rocketry for a while but I remember that the computers were VERY expensive.

justinianoo (author)ErikO62017-08-02

Are you worked on deploy recovery device?...i just going to start build this data logger, but i want to include an a deploy recovery device in this code.

DavidR885 (author)justinianoo2017-09-03

I can help with that if you like. Do you just want the code?

justinianoo (author)DavidR8852017-09-10

David thanks!!! Yes, but in my country i can't find the gy-86, can i use the gy 30, 68 or 521?... maybe the 85?, thanks!!!

DavidR885 (author)justinianoo2017-09-10

Check whether they have the barometric pressure sensor. I am only using barometric pressure and acceleration. Barometric pressure gives me altitude. You will have to check the specs on the 30, 68, 521 and 85.

justinianoo (author)DavidR8852017-09-17

David, i have an important question jajaja... can i use the MS5611 and a MPU6050 in separated circuits board?, i mean the gy-63 have a MS5611 and the gy-521 have a MPU6050.

DavidR885 (author)justinianoo2017-09-17

I have not tried it, but I can't see why that would be a problem. It would mean running another VCC and GND. You would also have one extra device to read in the code.

DavidR885 (author)2017-09-03

I did not include the bluetooth (yet), but I did include a parachute deployment system. It has an apogee option and a time of flight option. The apogee option works on barometric pressure. I used a pro mini, but a nano would make it easier for programming because the nano has a USB port. The next step is to design a way to mark each flight on the SD card so they don't get mixed up when doing experiments. Bluetooth might allow me to send data to the arduino which it then saves on the SD card. Bluetooth module arrives soon.....

justinianoo (author)DavidR8852017-09-10

Nice!!! I just going to use nano too, I'm having problems to find the gy86 in my country

정명규 (author)2017-04-19


sjors_02 (author)2017-02-22

I made it for a school project, but it doesn't upload anything to the sd, but I get the serial on my phone.... Any idea how I can fix this?

sjors_02 (author)sjors_022017-02-22

I've built it around a arduino uno, just to test it, the arduino pro mini still hasn't arrived yet, but maybe that is the problem, or am I supposed to format it to somesortof format?

calmac_projects (author)sjors_022017-02-22

Hmm I know the sd card hast to formatted to the fat32 type. Try inserting it into your computer and formatting it there , make sure to select fat32.

sjors_02 (author)calmac_projects2017-02-22

I formatted it to fat32, still doesn't work... is there a special way to pull it out, and i use a different micro sd reader, would that make any difference?

sjors_02 (author)sjors_022017-02-22

Found the problem, I connected the cs pin to pin 3 instead of 4..... Anyway, Thanks for your help, and the project ofcourse!

jorritd (author)2017-01-20

Can i use a gy 87 for the gy 86, because i can't find a gy 86 that is shipping in less than 2 weeks and i need it for a school project, so can i replace by simething else?

calmac_projects (author)jorritd2017-01-20

The Gy87 has a different pressure sensor so you may need to modify the code. The accelerometer and magnetometer are exactly the same as the Gy 86.

DylanB66 (author)2017-01-19

Why is there suppose ot be a piezo buzzer?

spenproject (author)2016-11-20

does the battery have to bo 7.4 volts?

legitscoper (author)2016-09-19

I reccomend to start in CanSat competition

ИгорьА1 (author)2016-08-18

Nice project ! Very interesting for develop a ballistics. I will be happy to follow you.

Amazing,its amazing dude

DylanD581 (author)2016-08-10

Awesome rocket project. I have a altimeter with otherror sensors built in, but it is nothing like this! Does this fit in standard-sized Estes rockets?

Thank you, the widest component is the SD card reader at 2,5cm. I think you would struggle to get it into a slimmer tube than 2.5cm (diameter).

seamster (author)2016-08-10

Very nicely done. I've have a little purchased altimeter I use in my rockets, but Wow! I really appreciate all the work and thought you put into this. Thanks for sharing the details!

About This Instructable




More by calmac_projects:Arduino Powered HeaddressArduino Rocket Data LoggerSteam Punk Ammo Tin Nixie Clock
Add instructable to: