Controlling a Sony A100 DSLR using Arduino

Arduino controlling Sony A100 camera using 2x 4N25's

Sony DSLR cameras have a 3-pin remote port for use with a wired remote. Today, I’ll explore how we can use it to control the camera using our Arduino.

The Remote Connector

On the back of the camera is a 3-pin port, with pins on 2mm centers. From left to right, the pins are: Focus, Common, and Shutter.

Sony A100 remote interface

We need a cable to connect this port to a breadboard. You’ll need to find a 2mm plug and crimp some pins on. I’ve not yet found a good source for a connector that fits nicely. The one I’m using is from my local electronics store, shaved down a little with an small blade. On the other end of the cable, just strip some extra wire and connect it to some screw terminals on a breadboard.

Even without fancy electronics, we can test out the port. On the breadboard, connect a button between Focus and Common, and another between Shutter and Common. Power on the camera, press and hold the Focus button on your breadboard. You’ll hear the camera coming to life and focusing, then the tell-tale click that it’s ready to shoot. Keep holding it down, and press the Shutter button. Bang! Now you have a photo.

The Circuit

Now our mission is to have the Arduino press these buttons. We cannot simply connect the Arduino pins directly to the camera, they have to be isolated. I’m sure there’s a really good reason for this, I just don’t know what it is๐Ÿ™‚ For this example, I’ve used a pair of 4N25 optocouplers, one for each line. There are myriad alternatives available, including some dual-channel units.

This is how we hook it up:

Sony A100 4N25.sch

Note that the Common line is connected to pin 5 on the Focus circuit, and pin 4 on the Shutter circuit.

The Code

Once this circuit is set up, the code is dirt simple. Set pin 13 high to focus. Keep 13 high, and then set 12 high to shoot. Set them both to low when done.

The code for this is on gist as SonyA100.ino.

Now What?

Like anything else, the path forward is up to your imagination! You can make a sensor-based or timer-based intervalometer that waits for the right moment and takes as many pictures as you need. For The Last Shuttle Project, we used this philosophy to consider the scheduled time of shuttle launches AND the sound of the launch to know it’s time to shoot. (See Skycam Controller for The Last Shuttle Project.


Filed under Arduino, Camera

2 responses to “Controlling a Sony A100 DSLR using Arduino

  1. JD

    Hey, I am trying to build my own arduino intervalometer and had a question after reading your post. You say that you must first set the focus pin to high then the shutter pin. If I am shooting with manual focus do I need to set the shutter pin to high, or can I just set the shutter pin to high? Also why does the common line switch from pin 5 to pin 4 between the two circuits? This page has helped me so much. I know enough to build the arduino and set up its logic, but I could not find any resource on how to use a wired connection to trigger the camera. Everyone uses IR, but I think wired would be more reliable. So, thanks for sharing your insights.


    • Don’t know about manual focus, but you can just try it and find out for yourself.

      As to why the pins are reversed, that I do not know either. I discovered this through experimentation.

      Good luck with your projects!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s