LS20031 GPS Module

GPS is something I’ve wanted to play with for a long time, but the cost of GPS modules has always put them way out of reach for just for the sake of having a new toy to play with.

At the moment, however, the good folks over at Cool Components are running a January clearance sale, and this is one of the products in that sale.

There are a couple of other GPS modules included in the sale, but with a massive reduction from £50 to £12, ordering the LS20031 GPS module (10Hz version) was really no choice at all.


I haven’t actually used my Arduino for a good few months, and I don’t think I’ve even reinstalled the software since I rebuilt my main PC a couple of months ago, but I think it’s time to pull the Uno out of its box and start having a play.

I do plan to give it a try with the Raspberry Pi and CubieBoard, too, even if just to learn how to work with their respective GPIO connectors, but ultimately I’ll make my own PCB for this to go on, along with an ATMega or ATTiny chip.

I also have an SD card breakout board laying around somewhere, which resolves the issue of data logging – although I’m also thinking of breaking out the SPI or I2C bus from the Arduino, allowing me to connect the it up to the Pi and maybe tie it in with the Pi’s camera to geotag photos & video.

Sure, I could just use an Arduino Uno with a WiFi shield, and use the shield’s built in MicroSD slot for datalogging, it’d save me a lot of hassle, but where’s the fun in that?  Also, WiFi isn’t really a major need for this project.

Making my own PCB with just the chip, GPS unit, SD card reader and minimal required components also has the advantage that the unit as a whole is drawing less power and extending battery life for as long as possible.

If I’m out trekking around the Lake District for a couple of days, this means I can (hopefully) leave it on from the minute I step out of my front door, until I finally arrive back home to put the kettle on and transfer the data from the SD card to my PC.

I haven’t decided yet exactly what I’m going to do with the data.

I think a Google Maps/Earth overlay would be nice – especially if there’s a way I can timestamp everything and tie it all in with GPS tagged photos from my iPhone.

Google’s KML files are really just plain old regular XML files, so it shouldn’t be that difficult to generate them somewhere along the line.

It may, however, end up being too painful to try and write KML files directly from the Arduino.  I mean, there’s no graceful way to tell it to write out the closing tags before shutting itself off – unless I add a bunch of buttons and extra code.  Even then, if the battery dies mid-trek and the power is cut, the file structure remains unclosed.

But, I can still write a PHP script that reads in the file I feed it in whatever format I choose to have the Arduino write (probably just a plain old CSV), and give me back a nicely formatted KML that I can then send up to Google.

Perhaps if I do implement some type of I2C or SPI connectivity between the Arduino and the Pi, I can just have the Pi submit all the data to its own MariaDB database, and have it generate the KML files dynamically based on that stored data.

Anyway, so that I have it handy and don’t have to go hunting for it whenever I get around to finding my Arduino, here’s a copy of the LS20031 datasheet, courtesy of SparkFun.