Measuring the shutter lag on a DSLR – Part 1

A while ago we did some playing around with water drop photography and high speed flash:

Water drop photo

It’s rather satisfying, but getting it all tuned and setting up the shot is not that easy to do. As part of it, I wanted to find out precisely how long takes my camera to respond to the shutter button or IR remote.

The easiest way to do this is to make a device that triggers the camera, then displays a counter that shows the number of milliseconds elapsed. If you point the camera at the display, the photo will show you precisely what your shutter lag is.

photo 3

There’s a couple of difficulties with this approach, though. One is that most LED displays are multiplexed, mostly to simplify wiring and IO requirements. If you try to take a photo of a multiplexed display it’ll show up as either corrupted or blank.

There’s a way around this, basically individually wiring up every segment by hand, so that the microcontroller can display it simultaneously rather than scanning the display.

photo 2

The update code has to carefully turn off the common anode to each digit before updating it. That way if the camera shot occurs half way through the update event, it’s obvious, and the display isn’t ambiguous between two digits.

So, how fast does it actually update the display? A simple way to test that is have the microcontroller toggle a spare pin after each update, and then graph it on the oscilloscope.

photo 1

Turns out that even with my crappy inefficient arduino coding, it’s updating 3 time per millisecond. That should be more than adequate for these purposes.

(Edit — I later changed the code to only update a digit when changed, and this increased the update rate to 7.5 times per millisecond.)

I then added in a an IR LED to mimic the Canon infrared remote, and also relay(green thing on the right) to allow direct triggering of the DSLR via a cable:  photo 4

Testing the test equipment:

This was an interesting project. I started out thinking I could knock it off in an evening, and over the next couple of days I kept realising other ways that I could be getting errors.  I was pretty sure that I’d gotten all the bugs (order of updating displays, turning off commons during modifications, etc), but I wanted an external check that the numbers I was reading off the camera screen were sane.

One way to do this was to film the sequence with a 100fps camera. I stepped through the footage and determined that the 100ms and 10ms digits were incrementing exactly as expected. Fantastic.

The last check I did was to use a logic analyzer, and inspect the bits on the wire. It was time consuming to hooking up a line to each segment of the LEDs, run the shot, then work through the digits one by one, but it gave me the confidence that my display was telling the truth.

close up of logic analyzer and led matrix for camera lag

I’ll post the results shortly.

[Edit: Here’s the code, in PDF form since wordpress doesn’t like some file types. It should be obvious where I’ve used other people’s libraries, etc.]


This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

1 Response to Measuring the shutter lag on a DSLR – Part 1

  1. Pingback: Water drop photography | Tinkerings

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 )

Facebook photo

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

Connecting to %s