GPS Logger Arduino OLed SD
GPS logger to display your current and average speed and to track your routes. Average speed is for areas with a trajectory speed control.
The Arduino has some nice features you can copy:
- The coordinates are stored in a daily file, filename is based on the date.
- The screen is only updated when needed (screen is quite slow).
- For a minimal program size, the icons are programmed byte by byte.
The logger was inspired by a video of LogMaker360 and another Instructable. However, some adjustments were made to enable the screen and to get the 1.3" screen working. The mostly used SSD library uses too much memory and the memory of an Arduino Pro Mini is limited. Therefor I used a text based library from Github.
The heart is a Arduino Pro Mini Atmega328, 3.3 V. I used this Arduino because it has maximum memory, needed for the libraries and 3.3 V for easy communication with the GPS receiver and the SD card.
On one side are two switches:
- switch mode (normal and display average speed)
- reset
On the other side the logger has a connection for a UART connector for uploading new firmware
Components
The components are readily available at Aliexpress.
Arduino Pro Mini: https://www.aliexpress.com/item/New-Pro-Mini-atmeg...
GPS receiver: https://www.aliexpress.com/item/Free-Shipping-1PC-...
1.3 inch Oled: https://www.aliexpress.com/item/1PCS-1-3-OLED-modu...
SD card adapter: https://www.aliexpress.com/item/5Pcs-Pack-Micro-SD...
Level shifter: https://www.aliexpress.com/item/IIC-I2C-Logic-Leve...
Resistors and buttons
Connections
The system is powered by 5V from a car phonecharger.
5V input to:
- Arduino RAW power
- VCC (VDD) of screen
- HV of logic level shifter
VCC (3.3V) of Arduino to:
- VCC of SD card
- VCC of GPS receicver
- LV of logic level shifter
Other Arduino connections:
pin A4 > SDA of OLed (via level shifter)
pin A5 > SCK of OLed (via level shifter)
pin 3 > RX of GPS receiver
pin 4 > TX of GPS receiver
pin 10 > CS of SD card
pin 11 > MOSI of SD card
pin 12 > MISO of SD card
pin 13 > CLK of SD card
Switches:
Mode switch:
- Arduino pin 2 (interrupt) (10k pull up to VCC)
- GND
Reset switch:
- Arduino RST (10k pull up to VCC)
- GND
Program
The program was made in and uploaded via Arduino IDE. The libraries needed some adjustment to work woth the 1.3" screen. The adjusted libraries are added.
The program uses about the maximum amount of memory available, if the programs uses more memory, I found out that the Arduino was not stable anymore.
The icons are programmed by calculating the byte to send to the screen. I made an Excel sheet to calculate the binary numbers.
The coordinates are stored in a daily file, filename is based on the date (inspired by Arduino forum) .
The screen is only updated when needed, I found this very usefull, because the screen is quite slow.
The files are also on my Github
Case
The case was designed in 123D from Autodesk and 3D printed in black ABS. STL-files of the case and the clip are attached.
Assemling
First solder everything together on a PCB. For the SD card adapter, I first soldered header pins to the adapter, then soldered it to the PCB.
Glue the switches in the case.
Glue the GPS antenna at the base
Slide in the assembled GPS logger.
Screw on the top and click in the clip to mount the logger on a ventilation grille.
Using the Logger
The logger creates a new *.csv file every day, the filename is composed off the date.
Via the 'mode switch' you can change the mode of the logger: displaying only the current speed of displaying the current and average (avg) speed. The logging on the SD card is unaltered. If you start the 'average speed mode', the average speed is resetted.
The coordinates are logged every 10 seconds. The files are very small, a micro SD card of a few GB never gets full.
You can see your route by uploading the csv file to http://www.gpsvisualizer.com/