Canon SD450 Triggered by Sonar and the Arduino

This weekend I played with my Canon PowerShot SD450 (aka IXUS 55) and the CHDK along with the Arduino and the MaxBotix MaxSonar LV-EZ1.  The idea is to automatically take pictures when an object moves into frame.
Part of the job involved hacking a USB cable to hook up to the Arduino which I promptly did, as you can see below.

Unfortunately, I was supposed to hack a Mini-USB cable (of which I have a dozen) and instead hacked my (only) Micro-USB cable (oops).
The end I soldered two break away headers and then encased the whole thing with hot glue.

Here's the setup. You can see the sonar on the right.  I soldered a female header to it instead of soldering wires directly to the board.  The hacked USB cable is connected to ground and pin 13.  For the sonar I've plugged it into Ground, 5V, and pin 7.

You may also note that I'm not using the AN (analog) pin on the MaxSonar, but instead the PW (pulse width) pin, unlike most code I saw on the web.  The code is near the bottom on this page. My final code for the arduino is here.

I should mention that the CHDK is a little tricky to setup on the SD450 for shooting remotely by USB.  From what I understand it's supposed to be able to do that out of the box, but it didn't work for me.  However, by creating a LUA script for the camera I was able to get this to work.

To finish the project I'm going to glue that bolt you can see under the plastic container which just happens to be the right size for a tripod bolt.  I'll also add a potentiometer which I'll hook up to a threshold, how far the subject must be before I take a shot.  I'll probably try and take some pictures of hummingbirds near the feeder this weekend.


Popular posts from this blog

Shortest Sudoku solver in Python

Seven Segment Display in Inkscape