Developing GPS Logger with SD Card Slot

Nov. 16, 2017 | tags: GPS

Parts Selection

Keeping all points mentioned in the previous article with my mind, I looked for parts to use.

It took a few weeks to examine many possible combinations of GPS receiver module and CPU module. I finally picked the combination of Adafruit Ultimate GPS FeatherWing and Adafruit Feather M0 Adalogger

The reasons behind this decision are:

  • It is ready-to-use; it has embedded patch antenna and coin battery holder.
  • It has microSD holder.
  • It can run with LiPo battery.
  • It supports QZSS.
  • Both modules are designed to work together. (This was important because I was quite new to current microcontroller development, though I have some experience more than a decade ago.)

Also, don't forget to buy female stacking pins.

Development

First GPS logger developed by me

Hardware development was quite straight forward thanks to Adafruit Feather's stacking architecture. As you can see in the photo, I put the CPU board on breadboard. Later, I added a toggle switch between EN pin and GND to power on / off the logger without disturbing charging from USB.

Software development was also easy thanks to Arduino IDE. I was really impressed how easy compared to my decade old experience. A decade ago (well, a little more than a decade), it took about 5 business days to make simple LED blink sample work on newly arrived hardware; which serial cable (straight / cross) to use was often unclear, compiling process was often not fully integrated (I had to execute linker manually with quite complicated options), writing compiled program to on-board ROM often failed for unclear reasons, and so on.

Actual code is available at GitHub. https://github.com/takyanagida/raw_nmea_logger

Some notes on the code:

  • SD card flush is called not for every line of log to save battery consumption, but for every second to minimize data loss against empty battery.
  • Battery alert threshold is determined as described in my Adafruit forum post.

Also, see README.md in the repository.

Second Variant

Flat GPS logger in case

After some field testing of my first logger, I noticed that the stacked structure hides SD card LED and power LED. Also, I couldn't find a good case to put the logger into with the battery. So, I made the second one in flat structure.

Since CPU and GPS are connected through UART, only 4 wires (3V, GND, TX, RX) are required. Also, EN and GND are connected to a toggle switch same as the first one.

The green case is a cheap pill case found at a dollar store.

In the next articles, I will compare these two loggers' signal reception in different configurations (case, bag, pocket, etc.)

social