When planning a new project I needed to tackle how to remote trigger a Canon DSLR camera. So I started with looking at the options and landed on using an infrared link to the camera. Things didn’t quite go as I expected.
The IR Camera Shutter Trigger
Some time ago I acquired an aftermarket remote shutter trigger that enabled immediate and delayed shutter release (S and 2S in the left image). So, I reasoned, I just need to work out what code was being transmitted and then replicate that from an Arduino. No problem.
The two traces were similar – the first (green) trace is for the immediate shutter release and the second (yellow) trace is for the delayed release.
The data tables on the right tells us that each signal is just two pulses in the IR modulated signal. For the green trace there is 1000 usec ‘low’, followed by 568 usec ‘high’ (the first pulse), 7124 usec low and 592 usec high (the second pulse). The yellow signal is similar with a shorter (5256 usec) gap between the two pulses. Both signals also seem to have a carrier frequency around 32 kHz.
Neither of these correspond to a ‘code’ as such, so I went out to the internet to see if what I was looking at made sense.
The Arduino Replacement
Creating an IR LED output driven by Arduino I/O pins the same as for any other LED. The complication is in the software creating the modulated signal that the IR receiver is expecting.
My investigations also uncovered multiCameraIrControl, an old and probably now unsupported Arduino library, that allows applications to trigger camera shutters for a range of digital camera brands, including Canon.
So I installed it and ran their test code. The main thing is that it actually did work with the camera (the main point of this work), so I compared the library signal to the hardware IR Remote signal using AnalysIR for the immediate shutter release:
The green trace is the hardware output, the yellow the Arduino software. The important feature is that the timing parameters are similar to those quoted above, and the signal looks ‘good enough’ to trigger the camera, as it does.
What I thought was going to be a ‘tricky’ part of the project turned out to be relatively simple. The one thing I did learn was that I should be doing more research as it it likely, in Arduino-land, that someone else has done something similar before!