Car GPS System

Posted on by Arthur Guy

My latest project is a GPS system for my car, thats so last you I hear you all saying, but wait its not a navigation system but a replacement for the speedometer and a tracking system.

I use a regular GPS system quite a lot and a while ago I noticed that the speed it was reporting was different to what my car was reporting, the difference was fairly big at high speeds, for example driving at 70 mph the car reports it as 76 mph. It was at that point I thought it would be a good idea to have a digital speedo which used a GPS system to calculate the speed. I looked around and found a system which offered this, it was a small box which sat on the dashboard and projected the speed onto the windshield as a head up display; I can’t remember the exact price but it was around £50, not to expensive but not worth it for something unimportant.

That was a year or two ago, recently I was looking at GPS modules online and decided it would be fun to make my own, with that in mind I devised the following system.
My GPS system would consist of 3 parts, the main GPS unit, a speed display and a tracking system.

Main GPS

The main unit would house a high sensitivity GPS unit (LS20031), a microcontroller (PIC 18F2620) and possibly a bluetooth module. The microcontroller would receive the GPS data and extract the important information, speed and location, it would then make this available in a simpler form over a serial link. I may also include a bluetooth module which would transmit the raw GPS signal, this could then be used by other devices such as a phone or computer.

Speed Display

The speed display would be just that, a 7 segment led display which would receive the simplified speed signal and display it.

Tracking System

The final module is the tracking system, this would receive the location information and using an inbuilt gsm module relay the data to a server which would store the information. I have had an interest in location systems for a while and since a personal GPS tracker is impracticable because of power consumption issues I can at least track my car, it could even be useful if it gets stolen.

I tend to loose interest in projects quite quickly, especially the more in depth ones which is why I decided on the modular approach, even if I only complete two or one of the parts it is still a usable system.

Progress to date

GPS Test System

GPS Test System

Over the past few days I have been playing around with an old bluetooth GPS and I have made a lot of progress on the first stage. The module I am using is quite old so internally it is fairly crude which is a bonus for me, it uses a prebuilt GPS module which is soldered to the main board so I have been able to tap into the GPS feed before it reaches the bluetooth module and divert it into a microcontroller.

Bluetooth module built into the GPS

Bluetooth module built into the GPS

I have now written a program which parses the data extracting all the information I would need and then outputting it over the bluetooth link, this is perfect for testing as I don’t need to have it physically connected to the PC.
None of these parts will be used in the final system, except maybe the bluetooth module if I can remove it from the circuit board, I am just using this setup for testing as I am currently waiting on a high performance GPS module to be delivered.

Locosys LS20031

Locosys LS20031

I decided on a Locosys LS20031, this is a small unit with built in antenna, it seems to be fairly sensitive and has a fast update frequency of 5Hz.

I will post further information as the project progresses


Changes

Posted on by Arthur Guy

Lately I have taken on a couple of freelance jobs, one electronic which involved designing and building a non contact counting system for exercise judging, the other project is web based, for this I have taken on the short and probably long term management of an activities website.

Working on these projects alongside my PhD work and other existing personal projects has made me realize how much I enjoy the verity freelance work brings. Because of this I have decided to try and pursue more freelance type jobs, so if anything comes up in the future either web or electronics based I will take it, providing I have time for it that is.

I have also decided to update this blog and my main website, I will combine them into a single wordpress site with a uniform branding under my newly created logo.
I have fancied creating a logo for some time, I have no real use for one but I though it would be cool none the less.

My new logo

ArthurGuy Logo

ArthurGuy Initials

ArthurGuy Initials

This site and the other main one will probably be a bit messed up for a week or two as I find time to make the changes.


Video Recording

Posted on by Arthur Guy

I have finally found the solution to my camera dilemma, the Canon EOS 500D.

Kodak Zi6 Pocket Video Camera

Kodak Zi6 Pocket Video Camera

For a while now I have been looking for something to record video, I was reluctant to go for a traditional camcorder as they are quite big, expensive and only do one thing. I had almost settled on one of the handheld video recording devices such as the Kodak Zi6, they can normally record HD video, there relatively cheap and portable.

The only thing putting me off was the overall quality, yes they can record HD video but the optics are cheap and you can see this in the videos they capture.

Ideally I would like the Canon EOS 5D digital SLR with HD video recording function I wrote about last year but that camera is over £2000 so it’s not going to happen. Today I came across the 500D and the fact it records HD video as well, I had no idea that any of Canon’s other cameras in this range recorded video.

Canon EOS 500D

Canon EOS 500D

The 500D is expensive but it is much more affordable than the 5D, for example Amazon currently have it for just under £600.

The real benefit of a video camera like this over the Kodak or a traditional video camera are the lenses. You can easily switch between different lenses for example a zoom or a wide angle, the zoom is also manual for grater accuracy.

I am fairly set on this camera now, my current SLR is the 300D and is now getting on a bit so this camera while still a little pricy is a good upgrade.


Database Replication

Posted on by Arthur Guy

For the past few months I have been working on a multisite IT project, part of it involves keeping various databases synchronized between different sites. A single master database needs to be pushed out to all the remote clients and a local database on each of the remote machines needs to be backed up to the master.
I hadn’t attempted anything as complicated as this before so it was a daunting task.

The only type of database replication I was aware of was the standard replication feature built into MySQL, I had tried to use this previously but had a lot of trouble as I found the different machines easily came out of sync and wouldn’t recover without manual intervention. Despite the previous problems I set up replication on the master machine and configured each of the remote locations to replicate a copy of the main database, this took a bit of work to setup but one it was working it seemed to operate reliably. When I had set it up I could randomly turn on and off machines and they would start replicating from where they left off, that was until I moved the master to a different location, then they decided to stop working.

Because I couldn’t have each of the remote sites copying there local databases to the master through replication I decided to use mysql dump on a batch job, I was originally going to create a script to dump the database and FTP it to the master and then have another script on the master which would import the backups as they arrived. Thankfully I discovered a brilliant little feature of mysql dump which saved the day.

Mysql dump normally outputs the dump to a file but you can pipe it to a mysql instance connected to another machine, this meant I could copy the database from the remote site to the master in one line. Once I had set this up it worked brilliantly; very reliable and very simple to use.

mysqldump --opt --user USER --password=PASSWORD DB | mysql --host=IP --user USER --password=PASSWORD -C DB 

After the continuing problems with the built in replication feature I decided to turn off replication and use mysql dump to replicate the databases out to the remote sites.
This obviously isn’t an ideal solution because as as the databases grow the amount of data needing to be transfered will increase, I believe it also locks the database as it dumps it meaning people can’t use the system as this is happening. Despite these problems it works brilliantly for my needs.

Incase your wondering the remote sites connect to the master site using VPN connections so I don’t need to worry about sending data over an un-secure network.


The iPod Touch

Posted on by Arthur Guy

Last week I received an iPod touch, this is going to form part of my latest project so the University paid for it and I get to use it for a couple of months before the project goes live. I have never liked the iPod range and I was never the greatest fan of the iPhone, not because I thought they were bad devices but because Apple was and is so restrictive with everything, for example you can’t put your own videos or moves onto the devices.

When I received the iPod touch I was expecting to find it cool for a day or two before the novelty wore off but I was pleasantly surprised, the interface was far more intuitive that I expected and very responsive especially coming from a background in windows mobile devices. Connectivity was also my other concern, only having wireless an not mobile connectivity meant it was no more useful than my laptop as I could only get online at home or at work. Whilst this is a problem I find myself using the device a lot around the home, checking things online when before I might not have bothered simply because of the convenience, I even found myself watching a whole BBC program on iPlayer.

The device supports an Exchange connection so its brilliant for checking and replying to emails, the keyboard took a bit of getting use to but the auto correction software makes up for the inaccuracy of it, the only downside is the calendar software, even with the Microsoft Exchange link it leaves a lot to be desired.

I don’t think I would change my phone for an iPhone as I do prefer a proper qwerty keyboard but I can see myself having both devices. At the moment I am waiting for another Android phone to be released which will hopefully fix the flaws of the current one, namely no Exchange support and no support for bluetooth headphones, if this doesn’t come soon I may have to go for an iPhone.