Triggering webcam

I'm attempting to build a simple telecine using an arduino/processing/what other program may be suggested.

My plan is to use a webcam to take snap shots of the 8mm film and save that to file. I understand that the arduino doesn't have enough RAM to process images, however would it be possible to trigger the webcam to take a snap shot?

I would rather not break into the webcam to trigger it via an IC pin, being that its a fairly pricey HD webcam and don't want to fry multiple ones trying to get it right. Rather, is there a way to trigger a "take snapshot" button or keystroke within a program, load into Processing, and then save?

Any advice or further questioning would be greatly appreciated!

I've seen people use a servo to push a button to trigger a device (like a camera). The trick is a stable mount for the device.

Would that work?

Here's a program that will treat incoming ASCII data from a serial port as if you pushed a key:
http://www.aacinstitute.org/Resources/ProductsandServices/AACKeys/AACKeys.html
Can hook that up and simple use "Serial.print" and println. Println just pushes enter as well.

Then, you can download AutoHotKeys and set up a script, so if your arduino, say, sends in "*" you can open up ANY program/anything on your computer and have it send mouse clicks/keypresses.

After it takes a picture, you can make the program wait say, 3 seconds, then take another, and save, or save and exit.. or whatever you want! But you'll have to have an Arduino connected to the computer, or use 2 Arduino's, using a RF kit and you can make it almost wireless. :stuck_out_tongue:

Thanks for the suggestions!

Since posting my question last night I've done a bit more research and I think I have a game plan but any further suggestions would be great!

I plan on using a sensor and a servo to position the film. The code then will use SerialPortX to talk to AppleScript that will control the snapshot program. AppleScript also can tell the program to save the image.

I think I've found a couple sketches and functions that I could use. Would this even work?

Thanks

If it has a snapshot button the wire an arduino pin to the snapshot button itself, then you don't have to mess with the IC. make sure the voltages are correct, you don't want 5v from the arduino going into 3.3v on the webcam. you can always voltage divide the arduino output pin like they do with the SD/MMC card interfacing.

If it is an actual fysical button then it is better to trigger it from Arduino via a photocoupler. This way the cam and Arduino would not be electrically connected.

But it would require the camera to be opened to find the to contactpoints on the switch. This might or might not be a problem.

Some cameras have an input jack you can use for exactly this purpose.

Oops, yes, an optocoupler would make it isolated. If the OP would name the webcam I might be able to help him with the button or a 'tap' point :smiley: Or how about using something like 'processing' to control the webcam? Much more elegant solution... I looked into it last night for some of my astronomy related projects, it only takes about 20 lines of code to do....

go here http://processing.org/learning/libraries/ and check out the Video library tutorials, its very similar to the arduino IDE and pretty simple to understand. you will need to download 'Vdig' otherwise the video functiosn won't compile, do a quick search and you'll find it easily enough on the web.

Don't install vdig 1.5 as its 'broken' install 1.01, it works.

After having read the post again i think you are talking about a button in software, like one you would click with a mouse.

If this is the case, and if you can control the button with a keyboard shortcut then you could probably use GoBetwino to do it:

Thanks again for all the feedback!

Once again I've sort of changed gears since last posting. I came across a program called ASProxy. http://tinker.it/now/2007/04/26/control-your-mac-from-arduino-the-easy-way/ Much like the GoBetwino but for Mac. I'm sure some of you have heard of it, but it allows you to send a serial ASCII letter from the arduino to ASProxy. Which in turn will trigger another program coded with AppleScript within ASProxy. The program I found to script was EvoCam, ASProxy simply says...

tell "EvoCam"
capture now
end tell

...and I get my snapshot!

As for the webcam, I'm using the Logitech QuickCam Pro 9000 for Mac. It doesn't have any external buttons that I'm aware of that I could send a voltage to. So aside from cracking it open I needed a program that I could tell to take a snapshot.

The downside is EvoCam wants money after 15 days, so yes, I wouldn't mind using Processing. I've used it a little and a couple ideas come to mind as how to do it. However I'm doing this project for a friend that does film and would like it sooner than later, so I'm not sure if Processing is the route I want to go. However, Reggie, if you have any good links you think would help I'd definately check them out.

Lastly, any suggestions on an alternative to EvoCam that would be easily AppleScript-able?

Thanks

Hi Derrick, i would definitely go with processing for 2 reason: 1 it'll take a whole 20lines of code to do what you want with processing, 2ndly its free fow the next 15days and then for ever after that :slight_smile:

Aaaaand :smiley: this is a good bit, I've found you a complete dissassembly tutorial for the logitech 9000 pro,

http://ghonis2.ho8.com/Pro9000a.html

I think step 13 is the one you are interested in, guess what? No soldering required.

Step 13. Remove small switch board connector from circuit board with driver :smiley:

the really good bit is the dissassembly is done by the living god Gary Honis (Gary is a legend amongst astrophotographers, you should check out his canon DSLR dissasembly and modifications, absolutely awesome tutorials.)

And I think from the back of the tutorial you may well have sold logitech another 9000 pro, the IR response has shot up by around 5x with the IR filter removed, which means the response in the interesting astronomy wavelengths will also have gone up very nicely.