Vintage Pi Recipe
Using the techniques provided here, you can control a film SLR camera and a USB GPS receiver with a Raspberry Pi.
Using Raspberry Pi to control motors, LEDs, digital cameras, and other sorts of modern peripherals is nothing new. However, you can also make the tiny computer work with the technology of yesteryear. My recent Raspberry Pi-related project is a case in point.
Although I have a decent DSLR camera, I shoot film most of the time. One of my favorite film SLR cameras is an almost 30-year-old Nikon F-501 that I bought cheaply on the web. In addition to the kit lens, the camera included an MC-12B remote trigger. Out of curiosity, I disassembled the trigger and found it to be a rather simple device that simply closes the circuit between two pins in the camera's remote trigger connector. Rummaging through a box of old computery stuff, I also discovered an old USB GPS receiver, so I thought it would be fun to spend a weekend on a project that makes Raspberry Pi trigger the Nikon F-501 SLR camera and record geographic coordinates to a file.
Although this project might seem somewhat limited in scope (after all, probably not very many Raspberry Pi users shoot with film SLR cameras), it demonstrates a number of useful techniques. Among other things, it shows how to create a simple transistor switch and use Python scripts to control it. You'll also learn how to make a USB GPS receiver work with Raspberry Pi, as well as acquire geographic coordinates and save them in a text file.
For this project, I used a Nikon F-501, but any SLR camera with a remote trigger connector would do. The only requirement is that the trigger must work by closing the circuit between two pins of the trigger connector. The MD-12 motor drive uses the same MC-12B, so in theory the solution described here should work with any Nikon SLR camera compatible with this motor drive. Obviously, you will also need a Raspberry Pi as well as a 2N2222 transistor and 1kohm resistor. The final piece of the puzzle is a USB GPS receiver, and you can find one cheaply on Amazon or eBay. I used a BU-353 model, but any GPS receiver known to work with gpsd should do the trick (refer to the GPSd compatibility table  for a list of supported GPS receivers).
Building a Transistor Switch
The first step is to build an electronic version of the mechanical trigger. Because the trigger merely closes the circuit between two pins, its task can be performed by a simple transistor switch controlled via a Raspberry Pi GPIO pin. A transistor is a semiconductor device that can act as both amplifier and switch. A transistor has three terminals: collector, emitter, and base. With no current at the base, no current flows between the collector and emitter. Applying current to the base switches the transistor on, which allows current to flow between the collector and emitter.
There are two types of transistors: NPN and PNP. In NPN transistors, current flows from the collector to the emitter, whereas in a PNP transistor, the current flows from emitter to collector. In this particular case, polarity is not important, so any transistor would do. I used a 2N2222 transistor  readily available in practically any electronics store. The circuit diagram of the transistor switch is very simple (Figure 1).
For more detail: Control your old film camera with a Raspberry Pi