Immediate influences are the high-speed flash photography triggered by sound or light project by Glacial Wanderer and the Laser Triggered High-Speed Photography instructable by Saskview. The first uses a laser break-beam and an Arduino to trigger a flash in a dark room and capture action while the second uses two 555 timer ICs to generate a signal to trigger the camera. The second method does not require a dark room.
The approach described here requires a Canon camera modified with CHDK, uses the Arduino to do the electronic heavy lifting, and does not require a dark room. My intention was to keep things relatively easy -- no etching circuit boards, no cramming stuff in to small spaces &c. That said, there is some careful soldering and fabrication required but nothing beyond that.
Step 1: Blah Blah Blah
Step 2: Parts
Arduino Diecimila or comparable board. The actual board does not matter as long as you understand what the various pins do and can adjust input, output, analog, and digital pins accordingly.
In the interest of keeping this relatively simple, I built this on a Proto Shield for Arduino from Adafruit Industries outfitted with a tiny breadboard. Again, this is optional but makes things easier.
The electronic components need depend on one another -- the resistors for the LEDs depend on the LEDs, the potentiometer depends on itself, the resistors for the voltage dividers depend on the LSR and the laser. Because of this, exact values are not given below.
Potentiometer - linear taper is best
Similarly, the particulars of the following components are not critical. Use what you have on hand or order ones you like.
Battery holder (1)
Push-button momentarily on switch (1)
Phone jack stereo 3.5mm (1)
Plug 3.5mm (1)
USB cable (1)
LED holders (3)
Pin headers (many)
Heat shrink tubing
Loc-Line from ModularHose. This stuff is really fun and pretty expensive. Buy the pliers. Also, buy a lot because you will want to make other stuff using it. See the DeskSquid and GorillaPod instructables.
Step 3: CHDK
This instructable is NOT about the CHDK and really only uses it to enable the USB triggering of the camera. It enabled my Canon a480 (simple, cheap, point and shoot) to use a USB remote trigger, among other things. See the CHDK Wiki for information about installing and using the features of CHDK on your Canon camera.
Step 4: CHDK Primer
Loading Start your camera in Review mode (press on the little play button; lens should not be open). Press Menu and scroll to the bottom and update the firmware.
Using Press the Program button to get into ALT mode. This is the mode in which you access the CHDK features. Once in ALT mode (which you will recognize by the text at the bottom of your screen), press the Menu button to access the CHDK features.
Note I found it difficult to understand how to install the CHDK and access it features from material on the Internet. Because the port is different for each camera and the buttons and button layout is different for each camera, names and actions are not consistent. After working with the CHDK on my camera, things came to make sense. Be patient with this part of the project.
Step 5: Enclosure
The tin needs several sets of holes of varying diameters. I use a metal punch to mark the hole locations and brad point bits (for wood) to drill the holes. The brad point bits have a center point and two cutting edges. They won't skate and the edges cut slowly and cleanly through the metal. Brad point bits are available from Lee Valley (among other places).
Holes in the top
The three LED's, the push button switch, and the potentiometer all are attached to the top and need appropriately sized and spaced holes.
Holes in the right side
The Loc-Line arm holding the laser runs out the right side and needs a 1/2 inch hole and the USB trigger for the camera runs out the right side. It needs a 1/4 inch hole.
Even though the potentiometer allows one to change the timing interval, I found it more convenient to power the Arduino via USB from a laptop. This allowed me to upload a new timing range as I was taking pictures. This necessitated yet another 1/2 inch hole on the left side of the tin. To accommodate the USB plug I had to file it slightly wider.
Holes in the left side
Only one hole is needed in the left side. The Loc-Line arm holding the LSR runs out the left side and needs a 1/2 inch hole.
Step 6: Schematic
Step 7: Arduino Board
At the same time that you layout the wires, put in the resistors for the LEDs, the pull-up resistor for the switch, the single resistor for the LSR and the two resistors for the voltage divider for the laser.
In the second and third picture, I put pin headers to mark the locations of the various components. Note that the laser pin header is NOT correct in the third picture.
Note Because of the orientation of the Arduino board in the enclosure and the location of the LEDs, I used three analog input pins for the LEDs. They are configured in code to be digital pins.
Step 8: Ground Bus
The small loops in the wires were made using a jewelry making tool that forms wire coils.
Step 9: LEDs, Switch, Potentiometer
Note The location of these parts on the breadboard was determined in an earlier step. This step just shows the fabrication of the various parts.
Each LED requires a resistor. Determine the appropriate resistance using an LED Resistor calculator. These are readily available on the Internet.
The switch requires a 10K pull-up resistor. One of the options on the CHDK USB Remote Trigger is to fire on the falling edge. This is, apparently, faster, easier and more reliable. For this reason, use a pull-up resistor and drop the voltage when the button is pushed.
Step 10: USB Cable
I had both a stereo plug and jack and decided to attach the plug to the cable and the jack to the Arduino. This makes it easy to plug in and prevents me from accidentally reversing the contacts. See warning below. A multimeter is essential to verify that you have the correct connections and nothing is shorted.
This was a difficult solder but the result was worth it.
WARNING The wires are really small and it is absolutely important that you get ground to ground and power to power. The connection to the Arduino should be such that you (or someone else) cannot accidentally reverse the plug. Current the wrong way through your camera...
Step 11: Light Sensitive Resistor
The LSR is one of two resistors in a voltage divider. The laser beam shines on the LSR and keeps the resistance LOW and consequently the voltage to the analog input pin HIGH. When the laser beam is broken, the resistance on the LSR goes HIGH, which causes the voltage to the analog input pin to go LOW. When the pin goes low enough (below a certain threshold), the Arduino responds and triggers the camera.
Step 12: Laser
The Arduino outputs +5V on its output pins. The laser I used (check the voltage requirement of your laser) requires only +3V. The laser receives output from a voltage divider circuit that drops the +5V to about +3V. I used a 47 ohm resistor and a 100 ohm resistor to give 100 / (47 + 100) * 5 = +3.4V which seems to be within the range for my laser.
This is NOT the laser I ended up using. The photograph is from an intermediate stage in the construction when I mocked-up the parts to test out the system. The actual laser is embedded in the Loc-Line at the end of the right arm.
Step 13: Battery Pack
Note The project pictured here does not actually use a battery pack. I decided to run the Arduino via USB power from a laptop. If I were to use a battery pack, I would do what I described here.
This is a straightforward solder. Solder the battery plug to the wires coming out of the switched battery holder. Be care to respect polarity.
Remember to switch the jumper from USB to EXT when running the Arduino on battery power. (I think this may not be necessary for newer boards, but I am not completely sure). Also remember to switch back when running the Arduino off the computer.
Step 14: Potentiometer
With the potentiometer in place, run the Arduino code and read the output in the Serial window. Check the following dial positions -- all the way to the left, approximate one-quarter, approximate middle, approximate three-quarters, and all the way to the right. A linear taper potentiometer should give readings of about 0, 255, 512, 767, and 1023 (or these numbers in reverse order). My audio taper potentiometer gave readings of 1023, 990, 870, 674, and 0.
Correcting for this in code I graphed my output and it appeared logarithmic. I did a logarithmic regression to find a best-fit natural log approximation to my data points and used that to modify the potentiometer reading before plugging it into the map() function to determine the actual delay. Because the range of delay values is relatively small, this worked quite well.
Step 15: Armed and Ready
Because the thread on the Loc-Line hose is NPT (National Pipe Thread Tapered Thread) there are NOT nuts for it! At least not that I could find and I spent a lot of time looking. I ended up getting two brass connector fittings from a plumbing department, cutting off the end I did not want and grinding the remaining washer-like piece clean. If I were to do this again, I would look for a 1/4 inch thick piece of plastic and cut and tap my own washers.
Step 16: Assembled
Step 17: Arduino Code
Testing There are several routines in place (commented out or at least not called in the working version) that test the various systems. You should install the code and test the systems as you go along. This will prevent headaches once everything is in place.
Step 18: Photographs
I found the interaction between the CHDK and Arduino and the camera's operating system to be very flaky. Leave the camera out and everything works really well. I don't know what the camera is doing when and it seemed like the whole system could get out of sync with itself. Unplugging the Arduino and starting it up helped. Just trying the same thing again helped. Waiting for the camera to time-out and take a picture helped. Fortunately, there is little to no cost associated with bad pictures, so patience helped the most.
Step 19: Future Plans
Because of the open nature of this project, any number of sensors or configurations can be used to trigger the camera. The first that come to mind are a sound trigger (which should be easy to attach to and through the Arduino) and long Loc-Line arms so that a bat swinging through and smashing something can trigger the camera.
Any thoughts or suggestions would be appreciated.