In this post I’ll describe how to make your own cable to trigger the Samsung mirrorless cameras NX20, NX210 and NX1000. We’ll be using an ArduPilot Mega 2.5 to do the triggering but you can use any Arduino or even a soldered push button.
What you’ll need:
- Any 2 or 3 wire cable – I use a 30cm Futaba servo extender which I cut the female end off
- A micro-USB plug
- Ideally an 0805 68kOhm resistor; through hole resistors work as well but not as nicely
- Heat shrink
Some USB devices use what’s known as OTG or On the Go cables to determine master/slave status of each device. The resistance between the ground pin and the ID pin determine how the device responds – most OTG cables just short these pins which wont work for us, so avoid OTG cables if you’re recycling a USB plug. We’ll use a 68k resistor so the camera identifies our cable as a remote shutter. The design we’re going for is shown below in an Eagle schematic for clarity.
The problem here is that it’s not so easy to get at pin 4 of most micro USB plugs. If you buy one from Digikey you’ll see it’s no problem but if you’re trying to recycle a plug from a spare micro USB cable, it can be quite challenging. I’ve done it and it’s possible but can be very frustrating and not all plugs even have pin 4 exposed!
First pull all your parts together and identify pins 5 and 4 on your USB plug. On this one, pin 1 is on the far right with the USB plug facing up.
Then add a bit of solder to pins 5 and 4 to get them ready for the resistor.
This step isn’t as hard as it sounds – with the soldering iron in one hand and tweezers in the other, pick up the resistor and get it onto pins 5 and 4 where it actually touches both pins – it fits almost perfectly in this position using this USB plug. Now melt some of the solder that is already on Pin 5 (or Pin 4, depending on how you’re holding it), just enough so that it makes a solid joint and holds the resistor in place. Then flip it over and add more solder to the other pin. Don’t spend too long on that one or it will heat up the other side and the resistor will fall off.
Easier than you thought, right? Make sure both ends have strong joints and plenty of solder, being careful not to get it too hot and let it melt off the other side. Now grab the servo cable and cut off the female end. Splice out the ground and signal wires. You can also cut back the power wire now.
Add some solder to these wire ends to prepare them to be attached to the USB connector. Make sure there’s a bit extra so you can make the joint without a third hand for applying solder. According to the schematic, we have to attach ground (black wire) to Pin 5.
..And then attach the signal (white) wire to Pin 3.
Now before we do anything else, hook it up to your camera and make sure it works by shorting out the white and black wires – I use my tweezers on the exposed metal pins to do this easily.
Make sure it actually takes a picture and doesn’t just focus. If you solder the signal wire to Pin 2 instead of Pin 3 it will only focus the lens, not take the picture. Now all these wires are pretty close to each other and over time with mechanical stress they could end up shorting. To prevent that, add a dab of hot glue between the connections to keep them spaced for good.
Finally, wrap it up with heatshrink!
Now you can trigger the camera shutter simply by supplying a low pulse to the servo wire plugged into an Arduino. If you’re looking to take aerial photographs using ArduPilot, then the rest is done for you. Just visit the Event 38 Downloads page and download the Aphex firmware and parameter file. This firmware puts out the correct pulse on pin A7 in the row of auxiliary pins on the side of APM approximately every 2.4 seconds. If you want to change the timing or have it respond to R/C input instead feel free to checkout and modify our source code from Github branch AC2.9.1b_NX.