This is Project Pluto: an Arduino-based battery-powered GPS data-logger with customizable settings and Bluetooth pairing to mobile phone or compatible DSLR.
The finished product is self-contained on a printed PCB in a 3D-printed enclosure, with majority of components plugged into headers to aid in possible future upgrades and enable repurposing of components.
I'm an active travel photographer, and use various hardware & software-based solutions to geo-tag my images on the fly. With no prior knowledge of Arduino development, CAD, electronics or circuit design, I wanted to see if I was able to build a portable geo-tagging solution to meet my own needs. And I did it. Kind of (see Disclaimer).
On a whim and for no particular reason, I've named it Project Pluto.
- Display of various parameters in real-time (co-ordinates, date & time, speed, altitude, heading and satellite count), with the ability to change measurement units where applicable (ie. feet or meters)
- Logging of co-ordinates to microSD card
- Bluetooth pairing with mobile phone or NMEA 0183-compatible DSLR (see Specifications and Requirements)
- LEDs to indicate satellite and Bluetooth fix, and microSD card activity
- Individual features (logging, Bluetooth, LEDs) may be toggled on or off, with settings retained across power-cycles
- Long-pressing of individual buttons to quickly toggle key settings (logging, Bluetooth or LED state)
- C++ source code for uploading to an Arduino or compatible clone
- EasyEDA project for modifying the PCB schematic
- Fritzing circuit diagram
- Gerber file for printing a PCB
- STL files for 3D-printing an enclosure
Project Pluto uses the following libraries:
I had to do the following to compile against the Arduino Nano Every, though these changes may no longer be required:
- NeoGPS: remove the
class Print
forward declarations from the following files:- DMS.h
- NeoTime.h
- SdFat: set
SPI_DRIVER_SELECT
to1
in SdFatConfig.h per greiman/SdFat-beta#42 - Change
#define F(str) (str)
in Arduino.h to#define F(str) (const __FlashStringHelper*)(str)
Due to the overlapping of the Arduino Nano Every and SPI microSD card adaptor on opposing sides of the PCB, I suggest building in the following sequence:
- Upload arduino-gps-logger.ino to Arduino Nano Every
- Print this repository's STL files; I forget settings used, but note the following:
- Wall thickness should be adjusted to accommodate heat-set inserts
- Supports are required only for Project-Pluto-enclosure-bottom.stl
- I've applied gluestick to the printer's bed
- Insert heat-set inserts to holes on printed Project-Pluto-enclosure-top.stl
- Print a PCB from this repository's Gerber file, with the following settings:
- 2 layers
- 1.6mm PCB thickness
- Solder 220Ω resistors, 2N2222 NPN transistor and 2-pin SPST rocker switch in their respective footprints on the PCB
- Solder all straight female headers from the Parts List to each component's respective footprint on the PCB, except for the microSD card adaptor and HC-05 Bluetooth module
- Solder right-angle female headers to the footprints of the HC-05 Bluetooth module and microSD card adaptor, slightly tilting back the latter to clear the Arduino Nano Every female header's solder joints
- Solder SMT AA battery holder, ensuring correct orientation of terminals according to footprint on PCB
- Trim legs of each LED so base rests flush with female headers
- Plug-in and screw-down (where required) remaining components:
- HC-05 Bluetooth module
- u-blox NEO-6M GPS module
- LLC
- Pololu 5V step-up voltage regulator
- Arduino Nano Every
- LEDs
- SSD1306 0.96" 128x64 I2C OLED display
- SPI microSD card adaptor
- 4-key button-board module
- Recess the completed unit into the front half of the enclosure, being careful to ensure the LEDs slip properly into their respective cavities
- Insert AA batteries
- Screw-down enclosure with 12mm M2 screws (and washers, to avoid fracturing the enclosure)
- u-blox NEO-6M GPS and HC-05 Bluetooth modules operate at 4800 baud, for Nikon DLSR-compatibility
- Pairs with any Bluetooth Serial Port Profile (SPP) NMEA 0183-compatible device with PIN/passkey 0000
- microSD card required for logging and waypoint-marking
- When enabled, logging of co-ordinates to microSD card at 2-second intervals
- Battery life is poor; expect 2 to 4 hours
- Any user-changed settings are restored from EEPROM
- If Waypoint-Marker button is held, reset baud rate of HC-05 Bluetooth module to 4800 (required for Nikon DSLR pairing using Bluetooth dongle)
- Initialize access to microSD card if one's inserted; else disable logging
- Set baud rate of u-blox NEO-6M GPS module to 4800 (required for Nikon DSLR pairing using Bluetooth dongle)
- Set compatibility mode on u-blox NEO-6M GPS module and co-ordinate-system to 4-decimal places (required for Nikon DSLR pairing using Bluetooth dongle)
- Up-and-running
- The main interface is comprised of individual screens that display different information:
- Date & Time (UTC)
- Speed
- Heading
- Altitude
- Satellite count
- The Settings screen displays the following user-configurable options:
- Logging: ON or OFF; remains OFF if microSD card not inserted at boot
- Bluetooth: ON or OFF
- (Screen) Timeout: 5-30 seconds
- LEDs: ON or OFF
- Reset to defaults: Logging and Bluetooth OFF; Timeout of 5 seconds; LEDs ON
- Done: Write settings to EEPROM for recalling across power-cycles
- See the Button Functions table regarding how to navigate the interface
Button | Short-Press | Long-Press (3-seconds) |
---|---|---|
Select (K1 on button-board; D5 on PCB) | - Change measurement units where applicable - Toggle or increment settings - Highlight on-screen elements requiring confirmation |
Toggle logging state on and off and write to EEPROM for recalling across power-cycles |
Next (K2 on button-board; D6 on PCB) | - Cycle through screens - Confirm highlighted selection |
Toggle Bluetooth state on and off and write to EEPROM for recalling across power-cycles |
Waypoint-Marker (K3 on button-board; D7 on PCB) | N/A | During normal use: - Record current co-ordinates in file on microSD card, regardless of logging state - Requires a satellite-fix and microSD card inserted at boot During startup: - Reset baud rate of HC-05 Bluetooth module to 4800 (required for Nikon DSLR pairing using Bluetooth dongle) |
LED State (K4 on button-board; D8 on PCB) | N/A | Toggle state of all LEDs on and off and write to EEPROM for recalling across power-cycles |
- GPS (left-most LED)
- Blink: No satellite-fix
- On: Satellite-fix
- Logging (middle LED)
- Blink: microSD card activity
- On: microSD card not inserted at boot or error writing to card
- Bluetooth (right-most LED)
- Blink: Searching
- On: Paired
- Off: Bluetooth is disabled
- Long-pressing a button to toggle settings on and off results in the respective LED being lit for 2-seconds to visually indicate state change
- When logging is on:
- File yymmdd_log_nn.txt is created in the root of the microSD card with a header row each time logging state is changed to ON and a date & time is acquired from the GPS (where yymmdd equals current UTC date, and nn equals incrementing number beginning with 00)
- Given a satellite-fix, the following comma-delimited fields are appended to the file at 2-second intervals
- Latitude
- Longitude
- Speed (km/h)
- Heading (degrees)
- Altitude (floating-point meters)
- Date and Time (UTC)
- Waypoint-markers are appended to file waypoints.txt in the same format as above, regardless of logging state
Build and use at your own risk. I am not an electrical engineer, nor a working C++ developer; this is a passion-project constructed in between diaper changes and one-too-many beers, and is likely replent with bugs. That said, it functions as intended, and has yet to blow up.