Skip to main content

Building a GPS device for Navigation, Tracking and Metrics


The Implemented GPS device for speed, odometer, etc


Building a Tracking and Metrics device using a GPS Module

  • GPS (Global positioning system) modules are commonly used now a days for various tasks: navigation for maps, tracking speed, Geo-location etc. A couple of decades ago around 2002-3 they were not as common and there was need to use such a module for the Railways for tracking speed, odometer, maintenance information, etc.
  • One recent usage of such a device can be found here on my blog: Prototype Bangla Rail Remote Fuel Monitoring


  • The above was the device that was built for the Railways. It had 2 parts to it, a front end part that implemented the UI and a back end part that would take the GPS module readings, analyse and store information, etc
  • As this had to be a tiny system, a Linux SBC was chosen and in those days a tiny Linux distribution called CRUX was used. It could work off 16MB RAM and some 128MB flash and had support for USB flash for data storage.
  • It was indeed fun to write an NMEA 0183 parser from scratch and making sense of the various GPS statements returned and their implications. GPS modules return statements like GPRMC, GPGGA, GPGSV, etc that provide highly accurate date and time information, satellites in view, the number of satellites used for calculation, the latitude and longitude information, etc. Using this one can implement many use-cases, say for showing track information on a map, traffic information, etc
  • The backend CRUX system was implemented by me and would interact with the microcontroller at the frontend for user inputs.
  • A few numbers were tested for a period of time for the Railways. 

GPS integrated with display and uC



  • To relive the nostalgia of having built such a system years ago, and also to track various every day activities (trips, walks, etc) decided to build a current age device, given the maturity of GPS and its usage.
  • Implementing this with the usual suspects: ESP/Arduino, an OLED 1.3 inch display and also an NEO 6M GPS Module for 200 Rs. 
  • The GPS price for too good to be true. So immediately bought one. But it was kept in cold storage because of the numerous things to parallely do and trying the same chip after say a month or so, it was found to be non-functional. Tried various things and in frustration ripped off the GPS label. Turns out there was another older label inside the new one.🤣 So these local hobby parts vendor might have got cheap refurbished ones and selling them here in Bangalore. Scam !!
The old gps chip with double labels sold on Online stores


  • A New slightly more expensive gps chip was bought for 500 Rs and it had external antenna. The external antenna helps getting GPS fix faster. Else in some cases, one needs to wait a long time
  • This also had it problems (I think old devices are being sold off)  but luckily got a replacement.
  • The berg wire connection was made with the controller and using the standard GPS libraries: TinyGPS, GPSplus, etc a quick frontend for the Oled display was built. The earlier device had taken a month or so to build, now this one took just a couple of days.
  • This device now shows the speed of travel, the direction, date and the time (which really is in GMT and needs to be converted to local time) and using the latitude and longitude readings, the odometer (distance) calculation can be done.
  • Also a kind soul Mr. SG helped me assemble this circuit on a generic PCB. 
  • Made this device portable with a Lithium Ion battery, LiOn battery charger/booster circuit, switches, etc. Most important part of the assembly was the use of a local sweet vendor's plastic box. It was the right fit and of course the sweets are tasty too. 
  • Below is the video showing off the capabilities and being used in the car

  • As can be seen, shows the right date/time and shows speed and does the odometer calculation and displays it.
  • This works well with an error of around 3-5% in a car. On person carrying of this box is not reliable as the GPS antenna moves too much. Maybe will build a GPS antenna holder that can fit on my bag while walking.
  • Also next need to interface an SD CARD and store the GPS information and do interesting things.




Comments

Popular posts from this blog

Game for the blind

Have been thinking about writing a game for the blind since a long time Got an opportunity when a couple of High School Kids came up with the requirement Many options were experimented on: Scratch, Unity, etc It was decided to Keep it Simple and modding an existing game What other better than to implement in python and use python games Used an example from here  PyGame Pythonprogramming.net example   This is a car game where one has to avoid blocks in its path or falling on it To make it suitable for blind playing, visual representation of a block falling on the car or not and the speed of it falling were alerted to the user by means of different sounds; one tone for block not being in line with the car, one tone for slow rate of drop on the car and one tone for rapid rate of drop on the car. So hearing these sound clues, one can use the cursor keys to escape the falling blocks. This can be seen in the video. One can also play comfortably with their eyes closed. It can be impr...

Leg Brake for a Bicycle

Leg Brake on a Bicycle  Growing up, there was a need to learn how to drive a geared motor cycle and also get a driver's license. There are two categories of two wheeler licenses: one for geared vehicles usually with leg brakes and one for auto/non-geared vehicles where the braking happens by hand and are simpler to operate. Driving license had already been acquired for the non-geared vehicle but due to lack of availability of a geared vehicle for practice, the acquiring of this license was taking quite some time. The main problem was adapting to braking a vehicle using the leg where one to respond differently and the conditioning takes some time. Unfortunately could not manage to get anybody/s vehicle for learning after many attempts. And at that time (1995 or so) bicycles were rather common and used for transport. So an idea was: why not add such a feature to a bicycle. A Hercules Town and Trek was also available. After some visits to the local bicycle shop and a used vehicle part...

RGB Dot Matrix Display as Multi-Function Panel Display

PxMatrix on ESP8266 connected to an 32x16 RGB DOT MATRIX 1/8 SCAN Panel It was always wonderful to see the numerous colour displays that display messages and animations on Dot Matrix Displays (DMD) in the commercial places. One useful thing would be to take an Off-the-Shelf Display and run fully controllable custom software rather than rely on some external products to do. Luckily found a display vendor who offered to give me some DMD as samples for experimentation. I was given a P10 32x16 pixel color DMD panel. I have experimented with Monochrome DMDs (maybe blog about this later) but the RGB display is another world all together. The Monochrome world does not have lot of open source software, the RGB world has PxMatrix, RGBMatrix and SmartMatrix. As I wanted the controlling entity to be super cheap which meant use of an 8266 I had to start with PxMatrix. Though there are better options than PxMatrix, the others use a more expensive controller. Its better to start with the lowest cost...