Actions

Sending location information from an Android phone to a Nikon camera

From Just in Time

On Hold
This project is not finished and is also not actively developed right now. We may return to this project at some later time.
Warning.png

This page describes my ongoing project that offers location data from an Android phone to a Nikon D7000 camera. Using the Android location information is especially convenient, because it gracefully switches from GPS information outdoors to Wifi and GSM station information if it can't receive any GPS signal, providing the camera with best-effort location estimates.

Of course, the fact that I already own an Android phone also means that the additional hardware cost of approximately $15 sets off nicely against the $200 Nikon GP-1 GPS module.

The sources for the Android app that I'm writing are available on GitHub. This application will connect to a previously paired device and will send NMEA sentences to that device. The "GPS" data is retrieved from whatever location provider is available on the phone.

Nikon D7000 camera being fed GPS NMEA sentences from an Android phone. To the left is a bluetooth serial module that receives data from the phone and feeds it to the D7000

History

I'd like to geotag the images I take using my D7000. For a while things went just fine using my Eye-Fi SD card. The Eye-Fi software on windows uses WiFi access point IDs to determine where pictures were taken. Unfortunately, I'm on linux and the Google API that I used in my own programs to do the access-point-to-location conversion is no longer available.

It became time to do the geotagging in-camera. Fortunately, the Nikon GP-1 GPS module–at $200–costs more than I'm willing to pay for this functionality, providing me with an excellent excuse to start building my own.

Operation

Nikon location diagram.png

And android phone receives location information from its GPS receiver, cell tower information or nearby wifi networks. A custom android app combines the data and generates standard NMEA RMC and GGA sentences and sends this via bluetooth to a paired bluetooth UART. The UART is connected to the camera, feeding the NMEA sentences via the gps/shutter connector.

The bluetooth UART is an inexpensive (€8,-) Bolutek module, connected to the gps/shutter connector on the camera. It is powered through the 5V pin of the camera connector. The plug for this connector was "engineered" from a cheap remote shutter release cord, bought for $2.89 via Ebay.

Pinout

Pinout of the D90/D7000 plug is described at pinoutsguide.com. For this project it is relevant to know that this connector has one input pin that accepts a 4800 bps serial datastream of standard NMEA gps sentences (pin 7).

Pinout of the plug is as follows (as seen "from the camera" with the notch at the top left).

1 - NC 2 - NC 3 - GND 4 - +5V
5 - Focus 6 - Shutter 7 - GPS 8 - NC

Road Map

Since the plug also allows control of the shutter, I'd like to add an attiny to the setup that should react on non-NMEA sentences like "+f", "+s", "-f", "-s" to emulate pressing and releasing the focus and shutter buttons. This would turn my phone into a remote control. And while I've got a microcontroller attached, I might as well add a remotely controlled interval timer.

I'd really like to get both the microcontroller and the bluetooth module in low-power mode if the camera is switched off. Unfortunately, the plug has no signal indicating whether the camera is switched on or not. There may be a way: apparently the GPS input is connected to a pull-up resistor or bridge that is only powered when the camera is switched on; I'm measuring approximately 2.5V on this line when the camera is on. It should be possible to amplify this "signal" enough to wake up the attiny.

GPS bearing is typically not useful if you're standing still. Using the compass bearing would be better. Reading and interpreting the magnetometer however, is interesting.

Notes

Comments? Questions?

nopreview
nopreview
13 January 2014 20:20:41
i'm running your app on a nexus 7 2012. after i pair the slave bluetooth module to my nexus, i get a message like " No GPS available" what i have to do?
false
343336663664366436353665373433613533363536653634363936653637323036633666363336313734363936663665323036393665363636663732366436313734363936663665323036363732366636643230363136653230343136653634373236663639363432303730363836663665363532303734366632303631323034653639366236663665323036333631366436353732363132303331333333383339333633343334333433343335333733393334
nopreview
14 January 2014 00:29:36
Sorry about that. That message is confusing. Despite the message, it should be sending the GPS data anyway. I've updated the sources in the GIT repository, so that it should show the last GPS sentence that it sent to the phone. Note though that the app is very rough around the edges still...
false
nopreview
14 January 2014 19:47:13
yes thanx! is sending GPS data but i didn't know that. I have run in circle around my nexus about 3 hour to understend why is giving No Gps available, and aftre that..."hmmm let's test, mabey is working" and it's working :))
what about GPS dat what is indicate altitude and heading? And another problem: the location is wrong with about 60KM. I will test with another android device, but for shure my gps reciever is fine. Thanx for your work. keep in touch!
false
nopreview
15 January 2014 10:40:54
can you show me your bluetooth module? i want to see another ideea about hardware realisation. thanx!
false
Attached article(s): Laurentiu
Laurentiu
343336663664366436353665373433613533363536653634363936653637323036633666363336313734363936663665323036393665363636663732366436313734363936663665323036363732366636643230363136653230343136653634373236663639363432303730363836663665363532303734366632303631323034653639366236663665323036333631366436353732363132303331333333383339333733383332333433343339333833323330
nopreview
15 January 2014 12:16:12
The bluetooth module I'm using is described in the attached article. It is visible in the picture above in the far left.
false
Bluetooth serial modules#Bolutek