Close

Shutter Scramble

A project log for Affordable Reflectance Transformation Imaging Dome

A simple and inexpensive way to image and analyze subtle surface details on objects.

leszek-pawlowiczLeszek Pawlowicz 08/01/2016 at 04:340 Comments

I'm getting to the point in the assembly process where I'm hooking up the interface that automates the camera shutter, and just realized I'd forgotten about my plan to add the option for mechanical triggering of camera shutters. D'oh!

The system currently has four ways to trigger a camera shutter automatically, in sync with the LEDs at different lighting angles turning on and off:

  1. Through a standard USB cable connected to a Canon camera that supports CHDK, with the CHDK settings set to allow shutter triggering with a voltage pulse through the +5V and G connections.
  2. For cameras supporting a wired remote, through the same USB cable connection and +5V pulse, this time using an optoisolator circuit to close a circuit and trigger the shutter.
  3. For cameras supporting an IR remote, a USB-connected IR LED driven by Sebastian Setz's Arduino IR remote library.
  4. For cameras that can be triggered via a PC program, the Adafruit Bluefruit EZ-Key Bluetooth HID adapter.

For cameras that don't support any of these options, there is the option to run in manual mode, where you push a button to light the LED for a second or two, press the shutter manually, then press the button again to advance to the next LED. Certainly works, and doesn't actually take much longer than the automated approach, but requires you to babysit the system - not fun. So I've had in the back of my mind to add a method to depress the shutter button that could in principle be adapted to any camera.

I've found a few electrical approaches online, where you disassemble the camera, find the shutter switch connections, and wire an electrical switch (like the optoisolator circuit in no. 2 above) to let you trigger the shutter with an Arduino or other electrical control system. Don't like that approach, since you have to take apart the camera and find the right place to wire the shutter connection, and you're permanently modifying the camera. I break things. A lot. The other approach is electromechanical, using a servo connected to an Arduino that will physically depress the shutter button. Lots of people doing this online, with an amazing variety of Rube-Goldbergian attachments. That's a compliment - I'll be lucky if my setup looks half as good as any of these.

The RTI system control box has a USB connector on the back side that options 1-3 above plug into, and I'd like to use that same connector for the servo. Those three options only need two electrical connections, for +V and ground. The servo needs three connections, +4.8-6V for power, +5V to control it, and ground. Options 2-3 would work fine with a permanent +5V connection, since they won't be connected to that line. But I'm concerned about a constant +5V signal through the USB port to the Canon camera using CHDK. It might do nothing, it might freeze up the camera, it might break the camera; don't have any interest in doing the latter. I thought about supplying +5V power to the servo with an Arduino output pin, but that's limited to a max of 40 mA, and a recommended max of 30 mA. I did find one page that suggested that might be possible, but the datasheet for the servo indicated that the servo could draw 160 mA in normal operation, and up to 700 mA in a stall, easily enough to blow out the Arduino pin. Had me stumped for a few minutes, until I had my standard "I'm a dope" revelation - just hook up a couple of header pins for use with a mini-jumper. Put the jumper in, and it supplies +5V to one of the USB output pins; remove the jumper to disconnect the +5V, and you can use the USB output with the Canon CHDK option without problems. If you get tired of putting the jumper on and off, you could even wire it to a switch mounted externally on the controller enclosure.

So, the servo is on order, and figuring out how to make it work is on the agenda after I complete the instructions for the full system. Gotta come up with a simple way of mounting it so that it can trigger any camera, calibrating the servo parameters, and adding the code to the controller system. Stay tuned. I'm open to suggestions.

While I was thinking about shutter issues, came up with an alternative to option 3 above. While the Setz library and the IR LED rig have worked fine on every compatible camera I've used them with, one problem with it is that if you change the brand of camera you use (Canon, Nikon, Sony, etc.), you have to change the IR remote controller code to match the brand (i.e. the codes for Nikon won't work for Canon, Canon won't work for Sony, and so on), then upload it to the Arduino. Flipping around on eBay, found a cheap IR remote that works with multiple brands; cheap as in about $3 for the one I ordered from the US for quick delivery, about $1.50 for one direct from China . If I can figure out how to open it up without breaking it, and then wire an optoisolator circuit to the shutter switch, that would be an easy way to have an IR remote that could easily be switched from one camera brand to another.

Discussions