|Category:||EE & Hardware (back to list)|
|Project Page:||GPS for Graphing Calculators project page|
|Summary:||Global Position System (GPS) capabilities have long been a feature of high-end smartphones as well as dedicated GPS units. Given that graphing calculators are powerful pocket computers, it seemed clear that a calculator could be use to receive and decode GPS information. While this turned out to be the case, several technical challenges had to be solved first. A serial library was created despite missing timing features in the hardware, and a poorly-document USB OTG IP was hacked to provide 5V at 50mA to operate the device.|
|Begin:||January 8, 2014|
|Completed:||February 4, 2014|
Graphing calculators are nothing less than powerful pocket computers, capable of doing many of the same things as smartphones, desktops, and laptops. Given that they have reasonably fast processors, a display, memory, and ports to interface with the outside world, I set out to making graphing calculators capable of determining their location using standard GPS hardware. I started with the TI-84 Plus / Silver Edition series of graphing calculators, which have a 15MHz processor, a 96x64-pixel monochrome screen, rudimentary timers (as well as one 32KHz crystal timer), and perhaps most importantly, two ports to interface with the outside world. One is a USB OTG port, a mini-USB port capable of acting as either a host or device, and therefore capable of producing 5V for peripherals. The other is a "serial" I/O port with two bidirectional TTL-level data lines. For my project, I chose to use the USB port for power, and the I/O port to communicate with a TTL serial GPS module. I created both the hardware and software necessary to make the project a reality, then suffered through two weeks of trying to get a GPS fix amid the metal canyons of a major US city.
I created a short video of the TI-84+SE pulling data from the GPS module, dumping the raw NMEA sentences at the top of the screen and decoding the sentences at the bottom. You can see that demonstration in the following video.
The figure in the previous section showed the module (with its plastic cover removed) successfully connected to 8 GPS satellites, sending time, date, and location information to the graphing calculator for display. The following two figures show two more views of the modules, one with it disconnected, the other connected and active but with no GPS fix. Note that in these photos an external GPS antenna is not connected, so the GPS module uses its built-in antenna.
Minimal extra hardware is required to connect the GPS module to the graphing calculator. The prototype uses a SiRFStar III GPS module with internal antenna attached to perfboard. It has an on-board power indicator LED, and connects to both the calculator's I/O port and USB port. You can directly control the two bidirectional data lines in the I/O port from the calculator's CPU via z80 assembly, so the I/O port is used for serial communication with the GPS module. The USB port is used as a simple 5V source to power the module.
The software side uses a 2KB z80 assembly program to communicate with the module. An interrupt running at roughly 4800Hz is used to implement serial communication, transferring data between the I/O port and a pair of buffers. The program verifies the integrity of each NMEA sentence received using its checksum, and if it's valid, parses GPGGA, GPRMC, and GPGSA sentences. From these sentences, it extracts information about the time, date, type of fix, latitude, longitude, altitude, and number of connected satellites. Finally, this information is displayed on the screen. Although it would be possible to create vector maps that could be stored in the calculator's memory and overlaid with the user's position on the map, unless there turn out to be practical applications of this that smartphones and GPS devices doesn't cover, I have no plans to add that feature.
GPS for Graphing Calculators software driver