June 25, 2011

Stereo Camera rig

This is something I've been wanting to try for awhile: I'd like to take pictures I can use with an old-school stereoscope. It seems like a simple enough idea: you just need two pictures of the same thing, taken from a few inches apart. I've seen it done with just two cameras —no external synchronization, just push both buttons at the same time — but it seemed like I could probably synchronize things a bit better than that.

Ideally, it would be perfect to set things up so that one camera was a master and the other a slave: exposure and zoom parameters would be set on the one, which would then be duplicated on the other. The Canon Hack Development Kit (CHDK) gave me some hope that this might be doable, but I haven't found any straightforward way of setting up a master/slave relationship, so instead I used cruder methods. The cameras use a CHDK script to time how long power is applied to the USB connectors, and depending on the pulse width the cameras either zoom in, zoom out, or shoot.

The pill-bottle on the left contains a 4-AA battery pack, 5V regulator, some buttons, and an ATtiny85 to convert button presses to appropriate-length pulses for the cameras. It's not ideal, but it does give me synchronized zoom and shoot capacity using the one set of controls on the pill-bottle.

Here's the code for the cameras, and here's the code for the ATtiny85. One thing I found out by extensive trial and error is that the signal at the USB connector must be 5V. Less than 4.5V does not work, at least on these eBay-special A590is cameras.

I still think there should be some way of having one of the two cameras tell the microcontroller its settings, and have the microcontroller set things to the same values on the second camera. That would allow much easier use of the excellent controls available on the A590is camera. But someone else will have to figure that one out. Send me a link if you know of someone who's successfully managed this!

1 comment:

  1. Hello, I'am setting up a mcu (msp430g2553) to control my cannon camera and was wondering what are the units of your delay routine. I'am guessing they're in milliseconds? Thanks