With the inexpensive cost of electronic components online, I am amassing quite a library of modules and parts to build whatever little contraption my silly little brain dreams up. Lately I've been working on a portable GPS unit using an ESP32, with an off the shelf GPS module and 1" OLED screen.
Quite often I'm in the woods and I know where I am, but I don't know where I want to go. Thus, navigating back home safely is important if I feel like simply walking into the forest alone. I wanted a simple GPS unit where I could calculate distances and display a map of my location, with beacons displaying waypoints and markers.
Over the last month or so, I have a fully-featured unit that can display the current longitude, latitude and latitude, calculate distances between two points, displays a vector map, and a settings menu allowing the user to enter low power mode and change display settings.
The ESP32, 240mhz max clock running at 120mhz, with 520KB of RAM and 4MB flash runs MicroPython and reads the GPS data from the knockoff uBlox Neo7M module via UART. The total cost so far is approximately $20 CAD, and again, using off the shelf components I purchased from Aliexpress (hate it or love it, shit is cheap on there).
To make this device actually useful, I implemented a simple vector mapping display. Given an input GeoJSON file, MicroPython draws the required lines and polygons to render the map. Then with the users current lat and long, the boundary box is calculated to make sure the user's current location is centred and the viewport is then rendered.
With Canada Post currently on strike, all parcels have been delayed across Canada. I have on order an e-ink display, which is larger than the current above display and will use less power as well.
The goal is also to run this off either a single or dual 18650 battery, chargeable by USB or solar power. The device will go into an idle state, which reduces GPS polling to every 30 seconds and turns the display off. I've also implemented a deep sleep function (4th button from the left) which puts the ESP32 into deep sleep entirely. I still have some work to do as even in idle mode after 30 seconds, and then deep sleep 10 minutes after, the single 18650 battery runs out.
While I live in the middle of nowhere, getting a GPS lock can take a few minutes which wastes precious battery power. I've added some...makeshift RF shielding with aluminum tape which seems to have helped. Increasing the distance of the GPS antenna from the breadboard itself has improved the GPS lock times.
Past battery power and an e-ink display, the step after would be to 3D print a case to make this a true handheld. Just recently was black Friday, and the Bambu A1 is on sale so I might pick one of those up. It would be fantastic to print enclosures for all my ESP8266/ESP32 projects, rather than using Lego.
Anyway, all the code for the project is here: https://github.com/snacsnoc/pocket-esp32-gps/
The code is all in Python, using MicroPython of course, but would require little modification for other people than myself to get this running on their own board.