Posts for Tag: camera

Arduino - Hacking a Canon DSLR shutter release

The Canon 450D supports external shutter release mechanisms using a simple 2.5mm TRS stereo plug - closing Tip or Ring to Sleeve will cause the camera to either take a picture or autofocus:

I created a quick circuit to test out the shutter (I've left out autofocus for now) and take a picture every few seconds using my Arduino, with the idea that I'd put together a nice sunrise timelapse. More on this later. The circuit itself is pretty simple, but the tough part for me was splicing my cable in a way that I could connect it to the breadboard.

In practice my setup is actually a little more complex as I wanted to use my SSD1306 display to show a little indicator of how many photos I'd taken without having to fiddle with the camera - note the very sketchy wiring :-)

The first thing I did was set it up to create a picture every 30 seconds to create a little timelapse of my puppy - Alfie - sleeping on a pile of my jumpers:

I used ffmpeg to produce a nicely sized mp4 video from the generated images.

Satisfied that I could get a decent result, I prepared a couple of timelapses from my living room window:

Timelapse #1 - overcast/snow

The first timelapse is a little boring - a grey sky turning dark blue then being illuminated by street lights. I pointed the camera roughly SSE/120° let the Arduino trigger a picture every 30 seconds for a few hours leading up to 5.30pm. Each frame was originally taken on the lowest-res setting available on my camera - 2256x1504 - at ISO 800 (since we'd also need to take evening pics) using a Canon 20mm f/2.8 lens. I actually started this one off at 1pm but there was a lot of boring grey sky so I trimmed it.

Timelapse #2 - sun/sunset

The second timelapse is a little more interesting. I used the same basic timing and setup but used a lower ISO since the evening pictures ended up a little darker and blurrier anyway, and this time pointed directly towards the sunset (SSW/220°). The main thing I learned from this video is that my window is filthy

Again I used ffmpeg to produce an h264 video:

Code for the Arduino sketch is available HERE but really it's just writing a 1 to a GPIO every few seconds so not particularly tough.