Showing posts with label raspberry pi. Show all posts
Showing posts with label raspberry pi. Show all posts

Monday, 8 April 2013

Raspberry Pi Controlled Canon DSLR

As I work from home, overlooking the garden, I decided to build myself a bird table to have something interesting to look at whilst working out whatever network problem has fallen into my lap that day.

I am by no means a carpenter but I think it turned out OK, and the birds seem to like it.
Click for Larger Version

Next it was time to take some pictures of the visitors I had, this turned out to be very difficult with only a 250mm zoom lens. As soon as you moved the little blighters flew off! plus I had work to do, couldn't do both at the same time.

Having made a DIY shutter release for my Canon1000D camera the obvious next step was to build a remote release and the device most suited to this task was of course my RaspberryPi.....

This post will not cover setting up and updating your RPi, there are plenty of those already, suffice to say, keep your system updated.
There is also a myriad of websites detailing the physical differences between camera shutter release connections, please check your own camera/connectors. Although each one will have at least 3 pins to connect to, these are usually pre-focus, shutter & ground. You'll need to know which is which.

So, let's get to it.....

Step1 : The Circuit
Click for Larger Version

The circuit comprises of two transistors which replace the physical buttons used on a standard handheld shutter release, a transistor is a switch after all - just one controlled by electricity instead.
The transistors I used were "2N3440", I decided quite arbitrarily on these (Lots of Googling shows these are quite 'beefy' so not much chance of any power from the camera getting to my RPi) - I'm not an electronics person either, although I do have a soldering iron !


The basic logic is that each transistor has 3 'legs' Base, Collector & Emitter, they usually have a flat edge or a bumb to show it's orientation - again, google it.
We apply current to the 'Base' from the RPi GPIO pin (via software which we'll get to later), which throws the transistor 'switch', the 'Emitter' is ground and the 'Collector' is connected to the respective pin in the 2.5mm jack.
You can see all of the 'grounds' are connected together.
The pictures below show the finished board, and with it connected to the RPi. The 3 grey connector wires, with respect to the diagram above, from top to bottom, GPIO Pin#6(Green), #16(Red) & #18(Yellow)
Click for Larger VersionClick for Larger Version



















That covers the hardware side of things, next is the software..