I feel like I am never working on with my Arduino or writing in this blog, but over the past two weekends, I built a GPS, temperature and pressure logger.
I ordered my stuff from Adafruit.com. They sell a large range of microcontroller parts and goodies and as a bonus have a great forum and an excellent learning site that provides you with information on wiring your sensor to your Arduino, and even example code and project ideas.
I ordered an Adafruit Ultimate GPS Breakout Board (v3), an Adafruit MicroSD breakout board and an Bosch BMP085 breakout board, and all this for $40, $15 and $20, respectively. I also ordered an external antenna for the GPS unit, you don't really need this but I thought that for $12, why not.
Skipping over many details, I wired the three boards up to my Arduino pretty quickly and then had to write the code to do the measurements, parse the data and write it to the SD card. Luckily there are some great libraries out there and I ended up using the Adafruit BMP085 library and the TinyGPS library.
I made a few modifications to the TinyGPS library to parse the geoid height (height of the gravitational potential surface) above the ellipsoid. After alot of trial and error I finally got the GPS unit to spit out data each 0.5 seconds when it has a new position, and then also to record the temperature and pressure from the BMP085 sensor.
On the left is the breadboard with the BMP085 on the top, the GPS sensor in the middle and the MicroSD card on the bottom. My Arduino Uno R3 is shown on the right. |
A close up of the BMP085 (top), GPS (middle) and MicroSD card (bottom) breakout boards |
Since taking these pictures I have also added a button and an LED that I use to stop writing data to the card, and properly closing the file on the card so that there are no issues when I then unplug the power and try to look at the data. I lost one SD card because the files were open while I removed the card and the card was switch to a read only mode, and could not be changed back to read/write mode no matter what I tried.
Sample GPS track. Produced using GPSVisualizer.com. |
Close up of GPS track. Performance is okay not perfect but well within what you would expect from a single frequency handheld GPS receiver. |
Cool, well that is a brief summary. Next I might try to add a thermistor circuit for a temperature measurement over a larger temperature range and with better accuracy and precision. I may try to add a serial enabled character LCD to print out the location to, and then put the entire thing in an enclosure of some kind.
The next use for it will hopefully be for the course for which I am a teaching assistant. We hope to launch a high altitude balloon up to 25+km and record some data on my Arduino, as well as take some cool pictures.
If you have any questions about the setup, my code, or otherwise, don't hesitate to comment below.