Datalogger with GPS and temperature for a high altitude balloon

Hello, I am a high school student and this is my first ever Arduino project (aside from playing with LEDs). What I am attempting to do is create a data logger which records the location, altitude, speed and temperature. I might also include a pressure sensor. The datalogger will be placed in a payload box and is predicted to reach 30Km (~100,000ft) above sea level.

What I have with me right now is an adafruit datalogger shield on an Arduino UNO, the aadafruit ultimate GPS board, and a tmp36 temperature sensor. The problem I have is that I have no clue on how to integrate these together. If someone could help me with the code or guide me to resources where I can figure it out, I will then forever be indebted to you.

Interesting project and pretty ambitious for a first project. Start by Googling something like "Arduino weather balloon gps" or arduino high altitude balloon". It's been done before so you should find some useful ideas.

Plus Adafruit provide tutorials for both of those boards with even more ideas in them plus another one on using the temperature sensor.

When you've made a reasonable start on the code we can help you to get it working properly.

Steve

The NeoGPS library has an example for logging to the SD card. See NMEASDlog.ino.

NeoGPS is smaller, faster, more accurate and more reliable than all other GPS libraries. Even if you don't use it, there are lots of tips on the Troubleshooting page. Be sure to read about choosing a serial port for the GPS device. That's especially important.

NeoGPS is available from the Arduino IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries.

Logging the GPS to an SD card can be done very simply. Every character that comes in on the Serial port can be written to the SD card.

Then adding temperature or anything else to that requires two extra steps. Since the GPS data comes in as "sentences" like $GPRMC... then you can also record your temperature as a sentence. But you should not interrupt a sentence in the middle. That's when you need to recognise when a GPS sentence is complete and you can drop your own sentence onto the card.

You might struggle to fit all the code into a Arduino UNO, the SD card software takes a fair bit of program space and memory. Size and weight are unlikley to be critical, so perhaps start with an Arduino Mega, then if you need to add communications for real time tracking you will be able to do so.

Long range ommunications, ground to high altitude balloon are no longer a technical challenge, so there is no particular need for the payload itself to log data, you can do that on the ground.

I have written GPS tracking software for a high altitude balloon that will run on a humble Pro Mini. The ground based receiver does not need to run the GPS or sensor software so that can quite happily log all received data to SD card.

The NeoGPS logger fits quite well in an Uno. As I've said so many times, it has many optimizations and configurations, and it doesn't use the floating-point library.

Oh, I realise that, NeoGPS does compile down quite small.

However there is a tendancy for the 'requirements' of these projects to grow, as I have found out.

One point the OP ought to bear in mind also is that the GPS needs to be of the type that will work at high altitude; > 18000M. The UBLOXES do, if you put them in navigation model 6, but be careful, you need to check that when configured the GPS does actually go into model 6. I have come across cases where the change navigation model caommand is accepted and acknowledged but the configuration has not stuck which you only find out when you poll it back.

srnet:
be careful, you need to check that when configured the GPS does actually go into model 6. I have come across cases where the change navigation model caommand is accepted and acknowledged but the configuration has not stuck which you only find out when you poll it back.

:o

Do you do a periodic poll for the model and then resend the config command, or do you just send the config command periodically?

Do you also save/load it to FLASH?

Gah!

I was using the poll to check if the use of the software shutdown was working, Once navigation mode was set it did stick, so I doubt there is actually a need to constantly check it. However as the GPS would stop working at > 18000M, it could be a worthwhile check, just in case the GPS has somehow reset itself.

There is (in my software) a regular check for the GLONASS sentances, which crop up when the GPS is reset, so the GPS reset situation can be dealt with. There is a sequence of commands, that have to do with cyclic mode, whereby a MAX8Q will reset itself after 20 seconds or so, never did pin down the exact sequence of commnads that cause it.

The GPS software I wrote is designed to allow for use of the MAX8Q without the added external I2C FLASH.

Perhaps the GPS where the poll message was not correct was one of the UBLOX fakes, whether it actually stopped working at > 18000M, I dont know,

I’ve been trying using the NEOgps library but I’ve been getting this idea

Arduino: 1.8.3 (Windows 10), Board: “Arduino/Genuino Uno”

In file included from C:\Users\nikhil\Documents\Arduino\libraries\NeoGPS\examples\NMEASDlog\NMEASDlog.ino:40:0:

C:\Users\nikhil\Documents\Arduino\libraries\NeoGPS\src/GPSport.h:152:76: fatal error: NeoSWSerial.h: No such file or directory

#include <NeoSWSerial.h> // Any pins, only @ 9600, 19200 or 38400 baud

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

Anyone have any ideas?

Please do not double post.