Automatic MakerBot Camera Pt. 1 - Remote control camera with CHDK
One problem with making time-lapse videos of MakerBot prints is the fact that the MakerBot works by moving the build platform (and therefore the object being built) around in the XY plane, resulting in an unwatchable blur.
It recently occurred to me that, since the MakerBot is such a hackable platform, I could probably make nice time-lapse videos by taking a picture of each layer. The idea is to have the MakerBot pose the object after each layer, and trigger a camera to take a snapshot.
When discussing this idea with fellow HackPittsburgh member Matt Mets, he recommended I try out a Canon camera with the Canon Hack Development Kit (CHDK). Making a quick stop on eBay, I soon had an SD300 in my hands, ready to be hacked!
I started by figuring out which firmware my SD300 was running, which told me which version of CHDK to download for my camera’s particular model/firmware combo. Using an SD card reader, I copied the contents of the CHDK zip file onto my camera’s SD card and followed the instructions to make CHDK auto-load when the camera starts up. I also changed my CHDK firmware settings to set “Disable LCD off” to “[Script]”, so the camera wouldn’t shut down on its own.
Once CHDK was loaded and configured, I followed the USB Remote Cable instructions from the CHDK wiki. The basic idea is to set Enable Remote to on, and load a script that is ready to handle USB remote events. The one on the wiki page didn’t work as-is for me, presumably because my camera has half-shoot (i.e. focus and charge flash) and full-shoot (take picture) settings. Here is the result that worked for me:
As the script says, I now turn the camera on in record mode, disable the flash, and start the script. After that, the camera will automatically take a photo whenever I plug in the USB to my computer.
More from this series:
- Part 1: Remote control camera with CHDK [YOU ARE HERE]
- Part 2: Wiring it up!
- Part 3: Updating the MakerBot Firmware
- Part 4: Updating ReplicatorG
- Part 5: Printing with the Camera!
Comments
Thanks, matias!
I believe some cameras can be triggered over USB using a tool like gphoto2, but I've never actually gone through the process of setting up something like that.
Robert:
Thanks for your quickly reply! The problem i that i need to do this under Windows SO and as far as i know gphoto2 runs on linux...
i dont really know the scripts to implements shoots, could you give me some tips, and which comands are used for...
Thanks you so much!
matias:
As I understand it, CHDK's scripts can't really interact with the USB port other to detect a connection. I could be wrong, however.
Searching Google for a bit, it seems like you may be able to run gphoto2 on Windows using Cygwin, but that is a big commitment. :)
Sorry that I can't help you more. Good luck with the project!
Thanks you so much for your help!
I will search more about cygwin...
Thanks!
good job!!!
i need to do some similar work, i want to control the camer shoot but i want to tell to the camera when it has to shot with some comand usig the usb and not with voltage. Do you know if it is possible???
thanks in advance ando sorry for my english...