Thursday, August 9, 2007

Geotagging with Nikon D200

There are various techniques for associating a geographical location with a photograph. Nikon D200 has a 10 pin connector which can be connected to a compatible (explained below) GPS unit using a proprietory cable called Nikon MC-35 GPS Cord. The biggest problem with this connector is the price and the availibility. It is more than 3 weeks now I have asked my favourite dealer to procur this (Fototrade at Wallajah Road).

Why can't we connect a GPS receiver directly to the camera? Why is the above MC-35 cable needed?
Well the D200 requires TTL level signals for communication. TTL serial refers to serial communication using signals that range between 0 and 5 volts. Plenty of Chips, circuits nowdays output TTL and no voltage conversion circuitry is necessary. TTL serial only operates over short distances. RS-232 signals are signals that range between -10 and +10 volts, and therefore require voltage conversion circuitry. A chip like the Maxim MAX232 can be used to achieve this. You can see what is involved in making this here

So it should be simple connecting a GPS to D200? Isn't It?

When you start attempting this you will realize that for a successful connection to GPS the following is required (apart from having a camera and an Idiot who will press the camera shutter button)
  1. A GPS receiver which has a RS232 (serial) or TTL output. The GPS output should be in NMEA 0183 standard at 4800 baudrate speed. NMEA is a standard which has been defined by, and is controlled by, the US based National Marine Electronics Association. You can read more of this at Wikipedia. If your receiver does not support NMEA 0183, you cannot use it with D200. After lot of research (Garmin, Magellan, etc), I came across AyAY Ti-GPS. This unit uses SIRF Star III chip and has two mini usb ports. The first mini-usb can be connected to a USB port on any computer and can function as a normal GPS receiver with your computer. The receiver also takes power through this port. The second mini-USB port gives both TTL and RS232 output. This gives you the ability to connect the GPS receiver directly to D200 as well as through MC-35 GPS cable. As is my habit, I started playing with the GPS receiver using Sirfdemo. Made the chip inoperable by setting it into what is known as USER1 mode. I found that I am not the only one who has managed to do this. With the help of AyAy Engineers at their forum, I was able to make the receiver operational. The other advantage of this Ti-GPS receiver is that it runs on 5v which is standard USB power. Hence this unit can be connected to any externalUSB power supply. I connected this to JboxMini - Macally external Power Supply for Ipod
  2. TTL output so that the output can be fed directly to the camera. If your receiver outputs RS232 you will require a converter.
  3. Suitable cables/connectors which can connect to the GPS receiver at one end and the 10 pin nikon connector at the other end. Getting a 10 pin connector proved to be the most difficult part as the connector is a proprietory connector. Google proved to be a big help and I stumbled upon GND2 connector for $44.95 + $5 shipping at PCMobile.net. This cable is not needed if you have a GPS like the AyAy Ti-GPS which outputs TTL. However I ordered the cable just for the Nikon 10 pin connector. The GPS receiver along with the cables can prove a bit challenging in carrying it along with the camera and holding it. There are two solutions; fix it on the strap or fix it on the flash hot-shoe. I prefer it on the strap as I would sometimes use the flash. There are other solutions like have a bluetooth receiver and connecting a bluetooth-serial adaptor to the camera. This innovative solution uses the free2move adaptore. You can read this here.
Finally I have ended constructing few cables which allows me to connect AyAy Ti-GPS receiver to Nikon D200. The finished cables can be seen below

Fig 1 RS232 -> TTL Converter Cable
This is my assembled RS232-TTL Converter and is equivalent to Nikon's MC-35 Connector. It has a DB9 male at one end and a 2.5mm stereo socket at the other. A stereo socket/jack has three terminals. Remember that a converter like this draws power from the camera battery. In Nikon D200 which does not have a good battery life, I would rather use the TTL output from the GPS receiver and connect it directly to the camera.



Fig 2 Assembled RS232 Cable for AyAy Ti-GPS
Ti-GPS uses a Standard Mini USB connector for supplying both TTL output and RS232 output.

The Green (Tx) & White (Rx) wires of the USB cable supply RS232 output. The shield and Black wire was soldered to pin 5 (Ground), green wire to pin2 and white to pin 3 of DB9 connector. This cable can be connected to the 2nd mini-USB socket of AyAy Ti-GPS to get RS232 output. The female DB9 connector can be connected to the RS232-TTL converter above in Fig1 or a MC-35 GPS cord.

Fig 3 Assembled TTL Cable for AyAy Ti-GPS
Here the Red & Black wires of the USB cable outputs TTL. These two wires were soldered to a 3.5mm stereo socket. Using a male to male stereo cable, you can connect this to the Nikon 10 pin connector cable in Fig 4. The mini-USB connector goes to AyAy Ti-GPS. This is my preferred method as it eliminiates the RS232-TTL converter and hence saves on the D200's battery power.



Fig 4 Assembled Nikon 10 pin connector
This connector requires TTL output on a 3.5mm stereo jack. It also supplies 5v regulated power supply on one terminal of the stereo socket. The power supply is needed in case you are going to connect a RS232->TTL converter as in Fig 1.

I use TTL cable in Fig 3 above and it eliminates the cable in Fig 1 and Fig 2 and makes the setup simpler.



Fig 5 Joining all cables


Finally with a stereo cable (male at both ends) you are done. Now you need to connect this to the camera. Switch off the camera while doing this just as a precaution.

Fig 6 5v Power Suply

You can use any power supply which supplies 5v to the Ti-GPS. I chose JboxMini as shown above. JboxMini is quite popularly used for powering ipod. So this also powers my ipod on long trips.

Fig 7 Connecting the GPS receiver to Camera


You can see the GPS receiver connected to the camera. The 5v power supply from Macally supplies power to the GPS receiver (through the white mini USB cable). Using 3M Dual Lock I am able to attach the 5v power supply securely to the GPS receiver. In addition to this, I used velcro to neatly and securely fix all the components to the camera strap.

Fig 8. Attaching GPS receiver to Camera Strap.
Using velcro, I am able to attach and detach the GPS receiver to the camera strap. There are ways you can attach the receiver to the camera hot shoe also. But I prefer this method as I would want to use my flash sometimes.







Fig 9 Getting GPS symbol on the camera's LCD screen.
If all goes well, you should see this GPS symbol on the screen. A flashing GPS symbol means that the GPS receiver has not yet got a lock with the satellites to get a fix on the postion. Once the GPS receiver is able to tell the position, the GPS symbol stops flashing.
You can take pictures regardless of the status of the GPS symbol. If the GPS symbol is steady, your photos exif information will contain the GPS latitude, GPS longitude, GPS height and compass information.



If you are also thinking for Geotagging, you can ask me for any assistance which I will be glad to provide.
This is a temple inside my Residential Complex. I uploaded it to flickr, but flickr was not initially showing the photos on the map. A call for help on Flickr Central told me that my Flickr settings were My First Geotagged Photonot set to automatically import geotags from the photo. You can see the same photo at flickr . Uploading to picasaweb through a beautiful program Picasa also puts the images on map. The new GPS information that I see in the exif is below
Latitude: N 12° 58.41' 0"
Longitude: E 80° 13.38' 0"
Altitude: 5
GPS Time (atomic clock): 12/1, 54/1, 1500/100
GPS Satellites used for Measurement: 06
GPS Date: 2007:08:12


You can look through the photos and instructions here.

Wireless ?
It would be fun if all these cables could be eliminated. My next project will be on connecting the GPS receiver wirelessly to the camera. Any help on doing this at a low cost will be appreciated. I have an idea of connecting this using two serial to bluetooth convertors from Digitech Engineers. They seem to have solutions for device networking. I have written to them on how to obtain Promi - SD 100 / 200 / Bluetooth Serial Adapter. They also have OEM Embedded Serial-Bluetooth Module which looks interesting. These devices are from Sena who seem to be doing pioneering work on connecting devices wirelessly. I think with a bit of work on their Bluetooth Wireless device, one should be able to replace Nikon's (>$600) WT-2A transmitter at a fraction of the cost. But that will be another project at another time.

Update on Wednesday, Aug 29 2007
The bluetooth devices arrived on day before yesterday (Aug 27). That was when I was in the office. Yesterday was a busy day for me and I couldn't put my hands on it.

Fig 10 Parani SD100 Bluetooth Module
The parani SD100 module has dip switches for various settings. By using these switches, the module can be set up without using a computer. This is a cool device to help you connect two RS232 devices together. The device can be powered through pin 9 on the DB9 socket or a power socket.

I did a minor surgery on the Macally power supply to power one module along with the GPS receiver.


Fig 11 GPS receiver connected to Parani SD100
Connecting the GPS receiver to the camera was a trivial affair. Involved setting up the bluetooth device to 4800 baud using dip switches and pairing them together by pressing the pairing button. On the camera side, I was confused for a day on how to power the SD100 module. Choice was either through the camera's power supply or another 5v supply (Macally or something else). Since the SD100 module can run on power with voltage from 5v to 12v, I dug up an old battery pack (accomodates 4 AA batteries) and wired a USB female socket as in Fig 12.


Fig 12 Power Pack (4AA battery)









Fig 13 Final Configuration on the D200 camera (Wireless)











Now my Nikon D200 is proudly and wirelessly connected to the GPS receiver.




While doing all this, I came across a useful tool for diagnosizing GPS output.

Fig 14 GPS Diag showing 6 locked satellites


















Cost ($196.18 /
INR Rs 8043)

  • GPS Receiver - $110
  • Li-Ion Battery - $31.18
  • Nikon 10 pin connector - $50
  • Misc (Stereo connectors, cable, etc) - $5
Commercial Solutions

References

24 comments:

Cprogrammer said...

Sent the following mail to digitech engineers. Will wait for their reply

Manvendra Bhangui
to digitech engineers.
Aug 22, 2007 1:44 PM
Sir,

I want to buy Promi-SD100, Promi-SD200 and Parani-ESD210. I want to buy this in retail. Let me know if this is available anywhere in Chennai or Pune. If it is possible to buy this online I can do that too.

I am a photography enthusiast and am constructing a GPS receiver which can wirelessly feed gps coordinates to camera. This device will help me achieve this wirelessly. You can read my blog at http://my-equipments.blogspot.com/. I also plan to write about your device in my site.

Regards

Cprogrammer said...

Just receieved the following reply from Digitech Engineers
on Aug 22, 2007 6:15 PM
I am wondering if they will show interest in selling 1 or 2 quantities? Let us see how this progresses.

Sub: Re: Regarding Sena Bluetooth Products
Dear Sir,

Thank you very much for your interest in SENA.
We are the business Partner of SENA in India.

SD-100 devices are in stock.
Other modules are to be arranged.
Please let me know the quantity you are looking for.

I can arrange to send to Chennai by courier within 10 working days, after
you place the order with advance.

To give you a quote, let me know the numbers you want buy in a single lot.

Regards,

Deepak Bodhani

Cprogrammer said...

I just got a mail from Deepak Bodhani who is a Managing Partner of Digitech Engineers. I am happy that they have the SD-100 in stock. I will be soon ordering it.

Dear Manvendra,

I just read about your work & also saw our reference

along with SENA on your site. Thank you.

Let me salute you for the work you have been doing.

I am a techno-crat person, & hence appreciate this work.



My suggestion is as under –



Step-1 : I will give you a paired device of SD-100 with baud rate setting as 4800. You should be able to use it as it is. The other settings will be ASCII data, 8 bit & No parity. Once you are OK with this, then go for ESD110.

Step-2 : ESD110 has in-built antenna. The performance is same as SD100. But the price is much lower. It will cost you appx. Rs. 3,600=00 Plus 4 % + Courier. Another advantage is it has TTL level signals. The size is smaller. Takes low power.

Once this is through, I can forsee some good numbers for SENA products
for such application. I will give you better pricing for the quantity 25 Nos & above.

With Regards,

Deepak Bodhani

Managing Partner

Cprogrammer said...

Have just placed the order with Digitech Engineers for 2 Nos of Sena Bluetooth SD-100 and Sena Bluetooth ESD-110 adaptors.

Once it arrives, the next project will be connecting the camera and the GPS unit wirelessly. The SD-100 unit can go upto 1KM. I am excited.

Steven said...

I need help. I am using a globalsat 353 gps puck. It is nema 0183 with TTL output 2.84v. I have wired it directly to a 10 pin connector and can get it to power up and lock, but the nikon d200 does not seem to recognise it. Does the output voltage need boosted to 5v? what is the easiest way to do this?
Thanks in advance!

Cprogrammer said...

Steven, If i am not mistaken, Globalsat 353 is a USB GPS receiver. The USB version cannot be directly used. I believe there is a PS/2 version too. For the PS/2 version you can follow the steps here
http://www.stockholmviews.com/diyphotogear/nikon_mc-35.html

Steven said...

Well I went and bought an AyAy for nikon "with" bluetooth capability. It also comes with a nikon 10pin to usb B cable. New question is:
Would a USB bluetooth reciever running at 5v draw output 5v for the camera? A simple adapter to attach the reciever to the USB-B end of the cable would be simple. Actually I have a 10 pin cable I could modify for this purpose.

Cprogrammer said...

AyAy has two USB ports (USB A & USB B)
USB A is a normal USB port. It can be connected to a computer and 5v power can be given to pin 1 & 4 of USB A

USB B is not exactly a USB port. Pin 1 is TTL (Tx), Pin 2 is RS232 Rx, pin 3 is RS232 Tx, Pin 4 is ground.

So yes you can with the following steps.
Pin 2 of 10-pin connect to Pin 1 of USB A
Pin 7 of 10-pin connect to Pin 4 of USB A
IMHO battery life of D200 sucks

Pin 1 of 10-pin connect to Pin 1 of USB B
pin 6 of 10-pin connect to Pin 4 of USB B

But since your Receiver is bluetooth, you can also wirelessly connect your GPS to Nikon D200 with a Serial to Bluetooth adaptor (e.g. from www.sena.com). That will eliminate lot of wires and your GPS receiver can remain in your backpack.

You can also look at pictures at
http://picasaweb.google.com/mbhangui/NikonGPS

I have a doc with all diagrams, which I can email you. I email is mbhangui at gmail.com

Cprogrammer said...

I had mentioned how tough it is to get the MC-35 GPS adaptor in India. In fact, it is very difficult getting any accessory for Nikon in India. Nikon's dealers (Prerna & Interfoto) are pathetic. They never respond.
Nikon has just set up its own office in Gurgaon. I have just emailed them
(nindsupport@nikonoa.net) for help in getting MC-35 GPS adaptor. Let me see if they respond

Cprogrammer said...

I have just had a pleasant experience with the newly setup Nikon's office in India. They have promised me that they will get me a Nikon MC-35 GPS adaptor. This will come in the next shipment from Japan and will have the distributor in Chennai arrange for the deliver.

I am experiencing Customer Delight and am happy that I have gone with Nikon. This is the mail which I got

"Dear Manavendra,

I have requested to our sales department to order 1 piece MC 35 for you. This order will be included with this month order so you can get it with next shipment to us. I like to know which area in India you are living so I will ask our distributor to handle the case( don’t worry i will make sure ). We are not making any direct sale so this is the procedure.

Any question regarding this matter please feel free to write.

NIND SUPPORT"

Anonymous said...

Hello From Spain
My english it's not so well to explain my question.

Your assembly , only works with the RS232 signal from the GPS, in a mini USB connector ???.

I want put a mini-usb GPS in my Nikon , via serial or the mC module.

Is possible can do that ?
Juanjo

Cprogrammer said...

Juanjo,

As long as the GPS device outputs either TTL or RS 232 (NMEA 0183, will work.

If it is TTL, you need to connect the output of GPS device directly to the Rx pin of the 10 pin connector

If it is RS232, you can use MC-35 to convert the RS232 signal to TTL level.

So if you could tell me which GPS device you plan to use, I will try to help.

Mnorri said...

According to US Globalsat, their EM406a is a TTL level setup with an output voltage of 0-2.85 V, and is 4800 bps, NMEA 0183. But this posting Digital Photography Reveiw claims that the 2.85 V is too low to be understood by the D200. What kind of voltages is your setup communicating with?

I wouldn't be as worried, but I just ordered the EM406a before I ran across that setup. Am I stuck?

Cprogrammer said...

Mnorri, The solution is in the link you have provided

"Use a pull-up resistor; if only the GPS outputs need conversion. Here is a data sheet:"
http://www.fairchildsemi.com/an/AN/AN-314.pdf

Anonymous said...

Red Hen Systems sells a Blue2CAN which plugs into the 10-pin connector without the use of wires. Has anyone used it? Is this something worth purchasing. It is $279 which is pretty hefty, but worth it if it works well.
www.redhensystems.com

Blue2CAN is an integrated solution for GeoTagging digital still images with GPS data. Using a BlueTooth enabled GPS unit and industry leading Nikon D200, D2X, D2Xs, D2Hs, D3 and D300 product lines. Blue2CAN allows users to directly capture geospatially referenced images in the easiest, most reliable collection method today. Geo-spatial information (Lat, Lon, UTC etc.) collected from the GPS receiver is encapsulated in metadata tags of every image taken. For JPG files the geo-spatial data is contained in the industry standard EXIF tags, for RAW files the metadata is maintained by RAW image workflows and is put in EXIF tags when RAW files are converted to JPG.

Blue2CAN plugs directly into the 10 pin connector on the front of the camera without the use of cables. It uses a small amount of power from the camera to operate it's BlueTooth radio and connects automatically to any BlueTooth enabled GPS receiver in near proximity. There is "zero configuration" required, just plug it in, turn on your GPS receiver and start shooting, not buttons to push except the shutter!

Anonymous said...

do you think if it works on nikon D3?

Cprogrammer said...

Nikon has not changed the 10 pin interface in D3. So any GPS which works in D200 will work on D3 also.

Thakur Dalip Singh said...

I read ur article with great interest. I have a different question : pl reply.
I have 2 Nikon Cameras- D2X and D700. I have a Garmin 60CSX GPS with MC35 cable and serial cable from Garmin. I want to use my GPS with both cameras at a time so that GPS data is recorded in both cameras' exif data simaltaneously. I know if I buy a separate GPS I can record data in second camera. But I want to use only one GPS with both cameras , Pl tell how it can be done? my email:
thakurdalipsingh@gmail.com

Cveto said...

Please, can you tell me how I can connect my GPS logger BT-Q1200, which has USB connector, to Nikon D300 camera for writing the log data to photos EXIF when shooter is released? Is the special connector on the market or some adapter to mini RS 232 or to Nikon D300 pin connector? How and where can I get it in Europe state Slovenia or in Italy, in Austria?

Who can make it for me? How much it cost ?

Sorry, my English speaking is not well. I hope you will understand me.


florijan.poljsak@siol.com

Cprogrammer said...

Thakur Dalip Singh,

You can use 10 pin Y splitter from
http://www.solmeta.com/en/products_detail.asp?id=11

Cprogrammer said...

cveto, you can use any bluetooth to serial adaptor.

As mentioned above in my blog, I am using Parani SD-100 bluetooth to serial adaptor from http://www.sena.com. The device can be purchased online at http://www.buysena.com

Gregmaz said...

sorry to change subject, couldn't find direct email.

Using d200 with proper cable and foretrex 101, I began geotagging thanks from advance on this site.

I updated the firmware of the d200 to 2.00 and the gps function disappeared.

gps set to nmea as usual. Any change in the settings of the d200 needed? I am on hold ith nikon, will post if able to fix.

Cprogrammer said...

There are no settings to be done on Nikon. The settings on GPS should be NMEA and 4800 baud. Any other baudrate does not work.

Steve Evans said...

I'm very interested in geotagging my pictures on my D300...
After a little research I found the leadtek LR9552, which seems to come in two versions, RS232 and TTL for about GBP 30. Default baud 4800, and NMEA-0183.
Main power input 3.3 ~ 5.0 V DC.
Supply Current ≈55 mA (at 5V).
Backup Power 1.65 ~ 5.0 V DC.
Which to me looks absolutely perfect!
Just add a plastic box, and a 10 pin connector (I have a couple of cheap cable remote releases on order to see if any have a full 10 pin), and I think I might have it all done!
Or have I missed something?