본문 바로가기

Hacked Brain/hackgadget.com

GPS폰을 이용한 tracking. Interfacing an AVR controller to a GPS Mobile Phone

Update: Part II Using Google Maps with a Mobile GPS Tracker is online.

My goal is to build a kind of a mobile tracker. There are many different use cases you can think of but one of the obvious is a device, that is able to report where it is. This device can be put in your car and it could trigger an alarm, if the car got stolen. Actually it could tell you where it is.

source : http://tinkerlog.com/

There are already mobile tracking devices out there, but they seemed to be too expensive and too closed for my needs. Another option is one of these new Nokia N95 which have built-in GPS. They are really nice, but about 600€, which is not a bargain. So I decided to do my own.

사용자 삽입 이미지

Materials

So my first idea was to combine a microcontroller with a GSM and a GPS modul. There are a lot of these modules over at Sparkfun, for example. Looking through their shop I found the Telit GM862, which is a GSM modul with an built in GPS receiver. That is what I wanted. And they sell great break out boards to make it easier for hobbyist to access these modules.

Here are some of the features of this GSM-GPS module:

  • Quad band GSM
  • 17mA average stand-by, 3.5mA in low-power mode
  • 250mA average operating current
  • SiRF III GPS Receiver Built In
  • Data, Voice, SMS, and Fax
  • Data speeds up to 57.6kbps
  • Supply voltage : 3.4-4.2V
  • CMOS Camera Capable
  • Python Interpreter built-in

Voice means you are not limited to mobile tracker applications. You could attach a speaker and a microphone to build a complete mobile phone!

So here is a list of what I purchased to get the first integration done.

  • Telit GM862-GPS modul, roundsolutions: 126€, or Sparkfun: CEL-07917, $183.95
  • GM862 Evaluation Board, Sparkfun: CEL-00277, $29.95
  • Quad band antenna, Sparkfun: CEL-00675, $7.95
  • GPS antenna 3V, Sparkfun: GPS-00464, $14.95
  • 2 interface cables for antenna, Sparkfun: GPS-00285, $8.95
  • optional: PolymerLithium Ion Batteries, Sparkfun: PRT-00341, $7.95
  • optional: LiPoly Charger, Sparkfun: PRT-00726, $16.95
  • ATmega8 microcontroller, ca. 2€
  • Resistors: 100, 10k, 22k, 27k, 2 x 47k, 2 x 100k, ca. 1€
  • Capacitors: 2 x 22p, 100n, 10u, ca. 2€
  • LED, 0.10€
  • Transistor, BC337, 0.10€
  • Prototyping board, 3€
  • optional: bread board

Summing up you get all parts at about 220€ or $286. Ouch! Who said, that tinkering with electronics is a cheap passion? But again, if you go this way, you can implement anything you can think of.

Circuit

Looking at the specs for the GM862, you realize, that it is more complex as you might have thought. A problem for me, still a beginner in electronics, were the different voltages used for the module. The power supply has to be 3.4-4.2V. Thats ok as an AVR can run on that voltage. But the serial port requires lower levels, 2.8V (CMOS). That means, you can not connect the UART of the controller directly to the module. You have to do some level translation. Fortunately this has already been solved over at Trackbox2.

Another point to mention is the power supply itself. It requires at least 2A for peaks. I used a LiPoly rechargable battery, which perfectly fits my needs. If you have to use 5V supply, you will have to use a capable voltage regulator and you have to deal with the CMOS voltage level issue as well.

사용자 삽입 이미지

As you can see, there are very few connections really required to the GM862. You have to connect the following on the breakout board:

  • RX, seriell modem communication
  • TX, seriell modem communication
  • RTS to ground, no handshake is used.
  • Status LED
  • On/off to power on the module
  • VCC and GND

Please keep in mind, that this is not an enterprise grade and production like circuit, so read any spec and guide before you assemble your components. You have been warned.

Operation

For now I am able to switch the module on and off, send text SMS through the module and fetch GPS positions from it. Here is an example GPS response:

Request GPS
AT$GPSACP got
: AT$GPSACP
GPSACP
: 131924.999,5333.9291N,00954.8841E,2.6,34.0,3,29.78,0.32,0.17,130707,07
OK

So now you know where I am living ;)

Conclusion
That’s it so far. It cost me quite some energy and money but was worth it. Next time more on software and how to talk to the GSM module.

사용자 삽입 이미지

Links

Downloads