Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: KermMartian on February 04, 2014, 03:49:39 pm
-
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.
Along the way, the two major technical challenges I faced were building a serial library and powering the module from the calculator. Once I succeeded in building functioning hardware and software, and eventually got a video of the GPS device operating normally, I documented the project in the writeup, video, and pictures linked below. Enjoy, and I challenge you to try building this project as well!
More Information
(http://www.cemetech.net/img/icon/dl.gif) GPS for graphing calculators documentation (http://www.cemetech.net/projects/item.php?id=51)
(http://www.cemetech.net/img/icon/dl.gif) Video of TI-84+SE receiving GPS data (http://www.youtube.com/watch?v=u_kLtYNJOqA)
(http://www.cemetech.net/img/icon/dl.gif) GPS driver for TI-84+/SE (http://www.cemetech.net/programs/index.php?mode=file&id=1032)
(http://www.cemetech.net/img/projects/ee/calcgps/gpsfix.jpg)
Cross-posted from this Cemetech topic (http://www.cemetech.net/forum/viewtopic.php?t=9983)
-
Wow, this is just insane, you've done some great job Kerm!
Now you only have to add some navigation software :P/me hides
-
Soon, we will be able to use our calculator to track down our lost phones :P
Nice job Kerm :D
-
I already worked with a GPS and parsed its raw data, so I know it's possible. The hardest thing must be to wire a serial-to-TTL converter so the calc gets the GPS's data via serial port, once you got that the raw data is rather easy to parse by the calc.
Anyway, great job Kerm ^_^
-
Wow, I expected this to be a joke post. O.O That's pretty awesome Kerm! :D
-
Is this going to be built in in the next Ultimate Calculator?
-
I wonder if primitive navigation software could be loaded into the chip via Linux to generate B&W maps with the right screen size...
-
This is very awesome!
Maybe the next thing is Wifi for calcs :D
-
This is very awesome!
Maybe the next thing is Wifi for calcs :D
You'd just have to write the drivers, i mean, hooking up a wifi usb thingy is easy :P
-
I'll give you an award if you make your calc loading m.facebook.com :D (The version for old browsers hasn't got any JavaScript)
-
>Enjoy, and I challenge you to try building this project as well!
Challenge accepted! (nice work btw)
(http://s7.postimg.org/50795gka3/Screen_Shot_2014_02_05_at_8_27_52_AM.png)
(http://s11.postimg.org/72t4wkzub/Screen_Shot_2014_02_05_at_8_28_07_AM.png)
Mine can stream <1cm resolution survey grade GPS data at up to 60-120 readings a second from 3 separate devices, has up to two internal 1km range Bluetooth radios, runs off 4 external AA batteries, can be run over by a truck without damage, has a screen that withstood the impact from a .22cal hollowpoint without damage, and is waterproof for 30 minutes at a 3 meter depth. :-)
Of course, it also retailed for ~1500$US.
http://www.amerisurv.com/PDF/TheAmericanSurveyor_Pepling-DC50_April2007.pdf
-
If TI themselves ever decided to make a TI-84 Plus C Silver Edition GPS add-on, they would probably charge $3000 for it no matter if it's good or not. :P
Nice btw Tim :D
-
Maybe the next thing is Wifi for calcs :D
I think this has already been done for the Nspire with the Linux port.
-
Maybe the next thing is Wifi for calcs :D
I think this has already been done for the Nspire with the Linux port.
Indeed. You could attach a wi-fi dongle with an USB adapter or something. I am betting this could be possible with gCn too, but I don't know if it would be hard to pull off.
-
And doesn't the official Nspire wireless adapter use wifi?
-
Yes, but it costs as much as a NASA mission to Mars.
-
Yes, but it costs as much as a NASA mission to Mars.
Sounds expensive :D
-
so... funny enough - two weeks before Kerm posted this - I ordered GPS module from a Chinese ebay shop. Well, after the three weeks of shipping to Europe, I could play around a bit with it and decided to do the same (sort-of) myself.
However, I don't have a 84+ where this works, neither the program nor the USB power supply. Having no idea how Kerm pulled it off to make the serial interface that good, I started from scratch, using my TI-83+ and Axe. I faced several problems though, mostly with syncing the GPS module to the calc to do not miss the start of the protocol on the one hand, and keeping both serial interfaces in sync on the other hand - which turned out to be way more difficult than I expected for such long protocols (just less than a kB for my module). I guess it is easier on a 15 MHz calc where you have fast enough interrupts to handle it. The 500 Hz interrupt just isn't sufficient for a 9600 baud port.
Keep both devices in sync is a different problem. These are four ways I could think of:
- 1. Check the port in the main loop -> Bad for adding further functionality later
- 2. Check the port in an interrupt -> interrupts are also to slow for this (catching the start bit)
- 3. Request data when you need it -> I don't have a datasheet of the module so I don't know if this is possible at all
- 4. Use a hardware asynchronous serial interface with a buffer -> I'm quite sure the TI-83+ does not have such a thing.
Eventually, I used the two latter solutions, inserting an ATtiny2313 in the serial line. It features a hardware serial port and is pretty idle so it can watch it all the time. What I did:
- The AVR listens for any incoming GPS data on the asynchronous port and buffers the RMC string -> The data is stored so it can be called at any time
- At any time, the calc can pull the signal lines low to request the buffered data -> The calc knows where the packet starts
- The AVR transmits the RMC string using a synchronous (that means using two lines - clock and data - instead of one) interface -> save transmission
- The calc only manipulates the ASCII string and displays it -> it has plenty of time to do other stuff
Furthermore, I used a Nokia battery to power it (you probably know that one - I use it in plenty of my projects). That is in a manner useful since the module draws with ~80 mA at 3.7 V quite a lot of power and would suck the calc batteries empty in no time - having it to be rechargeable is a nice feature I guess.
Some drawbacks I will fix later:
- The AVR has only 128 bytes (!) of RAM, so it can only buffer the RMC string, not other information (such as altitude or # of satellites)
- The code is pretty messy at the moment - I'm too ashamed to upload it ;)
The direction data only works when the ground speed is high enough.
(http://img.ourl.ca/gps83%2B-3.jpg)