Thursday, December 14, 2006

Some stressing, a few all-nighters, and a dream...

Against all odds, the iGPS came together in time for its demonstration. A source position is set using the clickwheel, and three display options, distance to source (m), time of trip, and velocity (m/s) are selected by turning the clickwheel. Cardinal directions to the source location are given by the four red LEDS between the display and the clickwheel, and the led to the right indicates whether or not the GPS device has a satellite fix.

The project is based around the Freescale 9S12C microcontroller. All coding was written in assembly using ASMIDE.

The weekend before the demo, we were walking through Target looking for an appropriately sized box to house our future project. Tupperware containers, tissue boxes, all considered, until we stumbled upon the iLamp. Apparently, this is an iPod integrated lamp, which we figured was just about the dumbest thing we've ever heard in our lives.

Naturally, we had to run with it.

We hit up Radio Shack and bought a project case with a metal grounding plate which we used as te project's actual back plate for that iPod feel. We painted the case white, drilled some holes for indicator lights and mounted a light dimmer switch 'clickwheel.' The dimmer was gutted for independent potentiometer and pushbutton functions.

The Lassen iQ GPS module from sparkfun.com arrived just before Thanksgiving weekend, giving us enough time to figure out the protocols before the real work began. The unit provides two serial outputs, with two choices of proprietary Lassen protocols on one port and NMEA on the other. NMEA requires no configuration and is the standard protocol for nearly all GPS hardware, so we went with it. GPS data is transmitted as a comma delimited ASCII string with coordinates as DDMM.mmmm.


In the meantime, Eric was hard at work on the SPI display. This proved to be little challenge and was integrated into the project with very little difficulty. We had a few large 7-segment displays laying around which we thought would work well, although soldering all... like... 39 pins turned out to be just about the biggest hassle in Ian's life. We're making the claim that this is the only GPS device ever built sporting 7-segment displays.

The most challenging problems we encountered were the conversions from hex to decimal and decimal to hex. This seems like it should be a relatively simple switch, but it took nearly a day to figure out. The GPS receiver transmitted data as ASCII strings, which were stored in memory as packed BCD numbers. Without a conversion, the squaring and square roots required to calculate distance and division to calculate velocity would be impossible. In the end, it all started working.

The last night of the project was a long one. Shown to the right is the first working prototype of the iGPS in a much larger housing. The space required by the microcontroller, PLDs, and SPI required three separate breadboards.








Testing the iGPS on a really cold December night.












The complete circuit












The SPI, bound in electrical tape.












No comments: