The Arduino eco system
Last weekend I started a little side-project: I want to replace my aging GPS-Tracker that I use to record hikes and walks during my vacations; the device is now 15 years old and is beginning to show it’s age: The battery does not last a few days but at most a day. And the on/off switch is loose and the thing is prone to switching off.
In addition to recording the device also connects to my smartphone via bluetooth and provides a very accurate position information even in situations where the phones GPS receiver will not find satellites — having a dedicated antenna for the job is probably helpful.
So, my requirements:
- Bluetooth
- “Somehow” storing the tracks
- Battery operated
I refined 2. to mean:
- Store the tracks on an SD-Card, one per day
- Store the tracks in GPX-Format if feasible
- Should the platform I choose support WiFi, automatically upload tracks to some server (think about adding a hardware-switch to conserve battery?)
So I bought an ESP32 development board (€8), a GPS-Receiver (€10) and an SD-card break out board (€2).
Now I had to:
- Assemble everything on a breadboard
- Download and install the Development Kit
- Understand how the Development Kit is to be used
- Get some example to run on the microcontroller
I spent half an hour (I know that exactly, dinner was in the oven) to do the following:
- Plugging GPS and the ESP together
- Install the Arduino IDE
- Adding the ESP32-Boardfiles to Arduino
- Loading the BluetoothSerial example
- Click “upload”
And I had a proof of concept running. I was amazed.
During my career I have spent a few years responsible for the firmware of a piece of measurement equipment.
Getting everything to run on that platform initally took probably as many hours as it took me minutes to get the ESP32 running with Arduino. This is an incredible progress in the accessibility of embedded programming. Sure the binary my little test-program generates is larger than the flash of the litte ARM-Chip I was programming for work, but optimizing comes later. If at all: It fits on the microcontroller and I do not foresee so much feature-creep for my project that I will fill it up…
In the meantime I got GPS reception, NMEA-Parsing (there’s libraries that I could just click into the IDE) and GPX-generation going. The next step is the SD-Card. And then I have to find a battery-board. And then I have to think about designing my own base-board or if the dev-kits are all small enough.
If you have an idea that could be solved by having a small computer with a bit of RAM and WiFi and Bluetooth and a few Analog-to-Digital converters: Get an ESP32. Program it as an Arduino. You will probably be amazed how easy it is!