Handheld GPS With EInk Display

by ben_crowell in Outside > Climbing

1855 Views, 7 Favorites, 0 Comments

Handheld GPS With EInk Display

on_climb.jpg

In this project I built a rugged handheld GPS unit. People take GPS for granted as a feature in cell phones, but for my application I had some different features I wanted. My main application for this gadget is to map out rock climbing routes. One problem with using a $500 phone for this is that it's really easy to drop your phone, which would be an expensive mistake when you're hundreds of feet above the ground and also potentially dangerous if you drop it on your climbing partner. So this unit comes with a carabiner, and the parts are a lot less expensive than a phone.

Also, when I tried using a standard consumer GPS on rock climbing routes, I found that it often couldn't get a fix because the view of the sky was limited. In this unit, I used a state of the art GPS receiver that can get signals from the newer European and Russian satellite constellations as well as the US's GPS satellites. This feature gives you a lot more satellites to choose from, and therefore a better chance of getting enough satellites to find your position, even when you're inside a gully. Multiconstellation support does not yet seem to be available in most consumer devices these days.

And finally, I had a really hard time reading most GPS units in the bright sun. My gadget uses eInk technology (like a Kindle) that shines by reflected light, so it's actually easier to see in the sun.

A secondary goal was to make sure that the unit had a cute personality. My family has a tradition of naming our computers after dogs. This one is named Brownie, after the rescue dog that Richard Nixon had after he resigned as president. Whatever you think of Nixon, Brownie seems to have been a cool dog. There are stories about him eating reporters' pens and other crazy stuff.

Supplies

Raspberry Pi-Zero W

Pimoroni Inky pHAT eInk Display

UbloX NEO-8M GPS board

micro-SD card

LiFePO4wered/Pi+ battery power supply

Power Supply and GPS

DSCF8478.JPG

The battery power supply seems very well designed and has excellent documentation. You stack it on top of the Raspberry Pi. The battery is a type that's intended to work well through many cycles of charging, unlike, for example, some phone or laptop batteries that eventually become unable to take a charge. Its capacity isn't huge, but the Pi-zero only draws 100 mA at 5 V when it's idling, so that's not a big issue. It has a bunch of features that are really useful in this type of application, such as gracefully shutting down the Pi when the battery is running low.

The GPS board needs four connections: ground, 3.3 V, and UART receive and transmit. I got access to the ground and 3.3 V connections straight from the power supply board. Because the GPIO headers will get covered up later by the eInk unit, I had to get access to the UART pins by soldering onto the bottom of the Pi. My daughter Irene gave me some help with the soldering, which I found nerve-wracking due to lack of experience and skill. Later, once I was sure that the unit was working properly, I ruggedized these four solder connections by covering them with clear epoxy. Before applying any epoxy over the connections, I tested it with an ohm-meter to make sure it was nonconductive. Some epoxies have conductive materials in them, but most clear epoxies don't.

The following ascii art chart summarizes the four connections that needed to be hand-soldered with wires:

GPIO header on Pi, pin 8 (UART tx), bottom of Pi ------------- GPS, UART rx
GPIO header on Pi, pin 10 (UART rx), bottom of Pi ------------ GPS, UART tx
VBSW output on p.s. (-) -------------------------------------- GPS, gnd
VBSW output on p.s. (+) -------------------------------------- GPS, VCC

EInk Display and Mechanical Support

DSCF8479.JPG

The eInk display stacks onto the 40-pin header sticking up out of the power supply, so connecting it was super easy. It talks to the Pi through the SPI interface, so there is no conflict with the GPS, which uses UART, or the power supply, which uses I2C.

Once I'd made sure that this setup was going to work, I strengthened the structure by adding nylon M2.5 spacers between the boards. The eInk display, unfortunately, does not have any screw holes, so the
spacers between it and the power supply board only work to keep them from getting mashed together, but don't supply any strength under tension. My hardware store sells nylon spacers, but not in sizes these small, so I ended up buying a box of 240 spacers on Amazon from a vendor called HVAZI for $11. In general, I had a lot of expenditures like this for small parts and tools on this project, which I'm hoping to amortize by using the leftovers on other projects. For a little additional strain relief, I anchored the four wires using zip ties attached to the spacers.

Case

In keeping with the doggie theme, I made a case out of a used plastic dog food container. I used an xacto knife to cut screw holes and connector ports in it, as well as a hole to make the eInk display visible. To protect the eInk, I added a windshield made of a piece of transparent plastic. A piece of nylon cord keeps the lid from getting separated from the tub, and also serves as a place to attach a carabiner.

Software

b.jpg

The eInk came with a sample application that was meant to make it into a name badge, so I played with that to get my text to display on the screen. Once it's displayed, it stays there, even if you power off the Pi.

The battery power supply came with some software that runs as a daemon and handles things like shutting down gracefully when the power is low.

There is an open-source daemon called gpsd that talks to the GPS board and does all the calculations. It exports data in JSON format, and I wrote some software that talks to the daemon through a telnet connection and writes the results to a log file. A separate script runs continuously and updates the display at set intervals. The README file for my software attempts to summarize all the software configuration steps for the Pi, which ended up being fairly complicated due to the use of three different interfaces for the three peripherals.

The software is a work in progress, but the photo shows the current version of its display, which updates once per minute. Here is some ascii art describing what the different fields in this version of the software represent:

UTM x (easting) coordinate, in meters                            onboard clock time
UTM y (northing) coordinate, in meters                           how stale the position is
elevation, in meters                                             estimated battery charge
UTM zone and coordinate system                                   # of satellites visible

Testing

DSCF8483.JPG

Once I got a basic version fo the software running, I took Brownie for a walk to the other end of my block, where you can see him in the photo next to the fire hydrant. He told me my position, so that if I was lost, I would know how to get home. Good dog!

Improvements: Better Case, Solar

improved.jpg

I took the original prototype climbing at Tahquitz Rock, and it worked pretty well. You can see it on the fifth belay of The Error in the first photo in this writeup. I found that I got about 7 hours of battery life, which wasn't quite enough, so I decided to add a 1 watt solar panel. I also wasn't completely confident in the strength of the container made out of the dog food case, so I built a new one out of a sturdy tupperware. The photo shows the new case and the solar panel in place. There is a piece of plastic in the middle to form a mechanical back-plane. The improved version will be complete when I receive the board to connect the solar panel to the p.s./battery unit.