Firmware for the GPS tracking device
After some trouble with my SMS sending routine I am finally able to show some working code.
Features so far
- Displays menu via serial port if attached to PC
- Can run unattended or interactively for debugging
- Fetches GPS positions and sends them via SMS every two minutes
If the circuit is powered on, the following sequence will be executed:
- Boot up, switch on the GPS-GSM module
- Initialize the modem
- Fetch the GPS position, redo until position is fix
- Parse and format position
- Send formatted position as link to Google Maps as SMS
- Wait 120 seconds
- Goto 3
Rebuilding it
Well, now you have all information and sources to rebuild and program this device, at least you should. If not, please tell me, what is missing.
But I had some hints in the comments that this can be done easier with the built-in Python. There also other very promissing sources and that is definetely the next thing, that I want to try out. If that works fine, which is not really doubtful to me, I could drop nearly all the external components. That would make it cheaper, easier and smaller.
Nevertheless, the firmware can be useful, if you would like to see, which commands to use to talk to the Telit module.
Links
- Part I: Interfacing an AVR controller to a GPS Mobile Phone
- Part II: Using Google Maps with a mobile GPS tracker
Downloads
- Firmware:beacon-v0.03.zip

August 11th, 2007 at 20:26
Firmware for the GPS tracking device…
Great post. Thanks! I’ll add a link to your post….
September 26th, 2007 at 22:43
Hi Alex,
Great Post! The firmware makes use of PC5 but I don’t see it referenced in the schematic. Is PC5 in the firmware code PD4 in the schematic?
Regards,
Greg
September 27th, 2007 at 07:27
Hi Greg,
yes, that’s right, in the schematic, it’s PC4.
Cheers,
Alex
October 16th, 2007 at 13:01
newbie question.Is 4.096Mhz quartz is VERY important for device to work at all.What about if put a 4Mhz or 5Mhz ?
October 16th, 2007 at 23:27
Hi tano,
the crystal frequency is important for choosing the correct baud rate. Please have a look at http://www.atmel.com/dyn/resources/prod_documents/2486S.pdf at page 159. It lists error rates for given frequency and baud rates.
HTH.
Cheers,
Alex
October 24th, 2007 at 19:48
again stupid newbie.I did it like you say and put a 7.3728Mhz quartz and telit and atmega8 is talking to each other perfect.but now there is a problem with software uart a connected to my pc (in 9600 boud)- I see that bytes are sending over wire but they are unreadable.may be timer1 sync problem or ?
is there any fuses in atmega that migth be set?
thanks and cheers
tano
October 25th, 2007 at 18:00
hi again today i’ve made some kind of test of above problem described.I compile and run sample application that use software uart and print “Hallo Peter !\n\r” on terminal.It was compile for 4MHz ,8MHz Internal OSC and 7,3728 Mhz ext crystal.All results - I mean 4,8, and 7,3728 MHz was equal to “Ю=”!ї_55”.
In internet I’ve read about max232… Is it right way?
thanks and cheers
Tano
November 15th, 2007 at 09:11
Very informative article about GPS tracking. Loved it.
February 22nd, 2008 at 22:44
I´ll test gps track device with ADOBE FLEX COMPONENTS BELOW :
http://www.afcomponents.com/
I thing that firmware software can generate a XML file for integration with google maps ! This components are free ! Certainly alex can modify and
provided a professional solution for tracking.
March 18th, 2008 at 14:59
I think it’s expensive device ( price of SMS )
You can adding some additional function to your tracker:
it don’t send anything before recive phone cell ( or SMS ). After that it is starting to get position and send SMS ( it can be one SMS or series of SMS ). Or it can be drived by incoming SMS like this ( text os SMS ):
start [n] ( n - number of position messages, if 0 - continue )
stop ( stop sending SMS )
I am sorry for my English
March 18th, 2008 at 20:27
Hi Victor,
you are right, that can be done. You could even optimise it to send a new SMS only if the position has changes.
BTW, if the SMS costs too much, you can switch to the GPRS option. That would require a GPRS data plan, but that may be cheaper than sending multiple SMS.
http://tinkerlog.com/2007/09/23/using-twitter-and-twibble-for-mobile-tracking/
Cheers,
Alex
June 2nd, 2008 at 09:32
Hi Alex,
I am working on my senor project. And I saw your blog.
This is a newbee question but to receive the location of the device
you need a gsm module and sim card right?
I am working on how to call the device and find if from a different location.
I have not read all of ur but dose urs do that? if so can u give me some hints?