Friday, September 26, 2008

Upgrades to the home-made GPS

I've been back in Ireland for just over a week and have had a chance to try out the GPS interface that I wrote about last time. Also, my dad gave me an amazing USB oscilloscope as a gift for starting my new job (and life!) in Paris. It is great for testing out the GPS interface circuit before it is ever connected to the camera, and I'll have some suggestions for using one to debug the datastream in the next post.

I used the GPS with my D300 at the weekend and I'm pretty happy with it. When I power up my camera with the GPS connected, it quickly starts to receive the NMEA datastream and the GPS light flashes. After about a minute the GPS locks on to its position and the GPS light turns solid. Photos then have the position and UTC time from the receiver embedded in their EXIF data. The photo sharing site Picasa recognises this information and put the photo onto a map automatically, which is nice.

I have a few reservations with the GPS engine and with the interface circuit:
  1. The combination of the D300 and GPS uses a lot of current, and runs down the battery very quickly. This happens because you really have to set the D300 so that it keeps the power on all the time when the GPS is connected, otherwise you will have to let the GPS power down between shots and it will take a long time to reacquire its position. When the power is on the D300's meter is also on, and between them they draw a lot of current. I measured the GPS at 80mA (at least during the period that it is acquiring the satellite lock). The D300 battery is 1500mAhr, which means that it should be able to power the GPS constantly for about 18 hours. It seems that you get more like 3-5 hours (I didn't measure it exactly), so I guess that having all of the camera electronics on must draw a lot of current also. You can obviously turn the camera off when you are not using it and save power, if you don't mind waiting for the GPS to reacquire its fix.
  2. The switch in the circuit doesn't allow the camera to power down as intended. Obviously it disconnects the +5V line from the interface board (by design) but somehow the circuit still keeps the camera awake even though there is no GPS data stream. Best that I can figure, the camera monitors the serial RX line for a transition from +5V to ground (i.e. it looks for the RS232 start bit).. and somehow it detects this when it is powering down and then comes back to life again. When you flip the switch on the GPS off you can see the meter turn off and immediately back on again over and over again.
  3. The GPS engine took a long time to lock on the first time it is turned on in a while... and occasionally won't lock on at all. Initially I though there was a problem with its backup battery.. but it turns out that it is not a battery at all but a 0.22F "supercap".
The first two problems can be solved by changing the way that the GPS is powered, either by powering from the VBATT (brown) line from the camera or from an external battery pack. With this change there is no need to leave the camera meter on permanently, i.e. you can enable "Auto Meter Off" mode again and the camera will shut down its internal electronics after a short time of inactivity. Since the GPS engine (BR-355) specs call for a maximum of 6.5V, and the Li-Ion battery in the camera is 7.4V, a +5V regulator should be used to reduce the supply voltage, as shown below. I used a TS7805 which is all that I could find in Maplin in Dublin over the weekend. This 1A regulator is really overkill, and also requires a 2V clearance, meaning it will only deliver +5V while the battery voltage is >7V. A smaller (100mA) regulator would be better, but they were out of stock.
This circuit fixes the first two problems perfectly. The switch on the GPS now controls the power to the GPS engine. When it is on the engine draws power from the camera battery directly, irrespective of whether the camera switch is on. You can leave it on when out shooting and the GPS will stay locked on. The two interface transistors are powered from the camera +5V regulated supply and are only powered when the camera is on. When the camera meter comes on the D300 recognises the GPS stream within about a second, so there is very little shooting delay.

It also seems that the cause of the third problem may have been that I had routed the wires to the switch right over the antenna of the GPS and these were then interfering with the reception of the very weak satellite signals. Moving the wires to the side of the box seems to allow it to lock on much more quickly. I haven't had time to test this rigorously yet though, or to measure how long the GPS will run when powered from the camera battery.

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.