Photocritic loves these 50 websites.

Building a laser trigger for your camera

There are loads of reasons for why you could want to trigger your camera remotely – to avoid camera shake, for example, or to be able to take a photograph of yourself without having to rely on a timer. If you want to build more ambitious projects, however, you may have to consider getting more exotic.

I recently built a little device which triggers my camera whenever a laser beam is broken – It’s about as simple an electronics project as you can pull off, but it’s going to form the base of a couple of other cool projects I’ll be working on going forward (stay tuned…), so I figured I’d do a quick post explaining how I did this.

Talking to the camera

This looks a lot like a headphone jack, but it isn't - headphone jacks are 3.5mm, this is 2.5mm.

Even though it isn’t strictly necessary, I decided to use my Arduino (check out Arduino.cc) as the base for this project.

I say ‘not necessary’ because you can build this project using just electronic components, which makes it all a lot simpler – however, what I really wanted to do is to build a base on which I can build further in the future. If you want to get more advanced, it becomes a lot easier to use a programmable micro-controller like the Arduino, so I figured I may as well start where I mean to continue.

I stripped the wires from the remote lead. Connecting green and red triggers the camera.

To interface with the camera, I decided to keep things as simple as possible, and I used the 2.5mm jack port on the side of my Canon EOS 450D. If your camera has a different remote control port, you should still be able to use the tips described in this post, but you’ll have to source the actual plug yourself.

Using the remote control port has several advantages, the biggest of which is that it’s really easy to trigger the camera this way. All you need to do is to make a connection between two wires! I bought a couple of cheap remote controls from China and used one of ‘em to interface with my camera, but you can go into your local electronics store to pick up a 2.5mm jack for next to no money…

Triggering the camera with the Arduino

This is the most important part of this mini-project: As soon as you can trigger the camera with the Arduino, only your imagination will stop you from coming up with ways of using this. Because the Arduino will accept input from any number of sources, you can program it to take photos in just about any circumstance imaginable. Just a few ideas:

  • Motion sensor (trigger the camera when it senses movement)
  • Heat sensor (take a picture when the)
  • Sound sensor (take a picture when the dog barks or the phone rings)
  • Telephone trigger (Hook up the arduino to a mobile phone. Call or SMS the mobile phone to take a picture)
  • Timelapse photography (Program the Arduino to take a photo every minute)

There are a few different ways you can use the Arduino to trigger the camera – I considered using a relay, but the problem is that even very fast relays are quite slow, so I decided to use a transistor instead:

You! At the back! no sniggering at my atroceous schematic drawing skills!

The Arduino sends a signal to the transistor, which connects the two leads leading to the camera, which triggers the camera.

Forgive the rubbish picture - I was prototyping, so it's less than clear what's going on here. The important bits are in the schematic above. Honest, it's piss easy.

Getting the laser trigger to work

I hooked up a LDR (Light-dependent resistor) with a pull-down resistor to ensure that it wouldn’t trigger randomly to the analog sensor pin 0 on the Arduino. The programme uploaded to the Arduino is as follows:

 int sensorPin = 0;
 int sensorValue = 0;
 int cameraTrigger =  13; 

 void setup() {
   pinMode (cameraTrigger, OUTPUT); }

 void loop() {
   sensorValue = analogRead(sensorPin);
   if (sensorValue > 700) {
// trigger is quite low, might need to be higher in daylight
     digitalWrite (cameraTrigger, LOW);
   }
   else
   {
     digitalWrite (cameraTrigger, HIGH);
     delay(10);
     digitalWrite (cameraTrigger, LOW);
	 delay(1000); // Take max 1 pic per second
   }
 }

 

Pull-down resistor to ensure true readings, and a LDR to do the actual light measuring.

With the arduino all programmed, I just had to add the LDR.

Now, I rigged up a laser module aimed at the LDR, and I checked what the common sensor values were – turns out that it drops to about 200 when the laser beam wasn’t hitting the sensor, and goes up to about 900 or so when it is hitting the sensor. I set the sensor trigger to about 700 to give me some leeway.

In the above snippet of code, the interesting stuff happens in the loop: Basically, it checks if the sensor has gone ‘dark’. If it hasn’t, it simply checks again.

The bright pink bit in the photo here is the laser beam hitting the LDR.

If the Arduino detects that the sensor has gone ‘dark’, it triggers the camera for 10 milliseconds, then untriggers it. This is to ensure that the camera doesn’t continue taking photos for the duration of the beam being broken – I have my camera set to ‘one shot’ anyway, but by adding this line of code, it should still work if the camera is set to continuous shooting when the shutter button is held down.

When the Arduino detects a broken beam, it takes a photo, then waits for a second, before checking for a broken beam again. If it’s still broken, it’ll take another photo and then waits another second.

Does it even work?

Yup. But a video says more than a thousand words so check ‘er out:

(forgive the crummy video quality, but you get the idea)

So, er, what the hell can you use this for?

It’s all a little bit theoretical at this point, because I haven’t actually used the trigger for anything useful yet. For one thing, it’s not very portable yet, but I’m planning to take a version of this and solder it all together so it’s a bit more sturdy. At least I know it works, which was the purpose of the exercise.

I have a couple of fantastic ideas for how I can create some pretty cool projects where the camera can just stand there and take photos automatically. Think birds on a bird-feeder, people walking through a doorway, balls in flight, etc.

If you plan to use the kit to take people by surprise, you may have to hide the lasers away a bit better. In a cleanish room, the red laser is pretty much invisible anyway (although it shows up in specs of dust etc), but if you want the sensor to be completely invisible, you can just use an IR laser instead – it’ll make it invisible to the naked eye.

Disclaimer

I haven’t broken my own camera equipment doing any of this, but if you balls things up, there’s a good chance you might. Be careful, know what you’re doing, and don’t come running to me if you blow up your camera, please!

Money made from this advert will be invested in prime lenses.
This post, "Building a laser trigger for your camera", is part of these categories: All articles, Do It Yourself, Equipment, Featured Articles, was posted by Haje Jan Kamps and saw the light of day on the 2nd of February 2010. I hope you liked it.

Insights, suggestions and comments

By Harald Halvorsen on February 2nd, 2010 (permalink)

INSANELY awsome!

By Travis on February 3rd, 2010 (permalink)

it could be the motion sensor of a home alarm system. triggering the short video mode when an intruder broke into the house.

nice work!

By Henry on February 3rd, 2010 (permalink)

This is great! Can a time del be built in to the code? I made a trigger with an LDR and variable resistor, but its too quick. this is what I managed with mine: http://www.flickr.com/photos/henrymatter/sets/72157623080245049/

gret piece of kit tho it seems! might have to get me one ;)

By Daf on February 3rd, 2010 (permalink)

Way cool!
If I ever get a free weekend (yeah not had one of those in months) I’m going to have a a go. Just because it’s a toy not because I need one! ;)

By Haje Jan Kamps on February 3rd, 2010 (permalink)

Hey buddy, on the question of adding a delay to a laser light: Yes it can be easily done. Couple of suggestions for changes: Turn off the laser as soon as the beam is broken. That way, the laser won’t be in the photo – Easy, simply add a third circuit (one is for the laser sensor, one is for the camera trigger, and the last one will control the laser) to be controlled by the Arduino. Shut the laser off, then start the short delay, then trigger the camera, then turn the laser back on.

As for the delay, this can be done two ways; add a delay in the code before you trip the camera:

else
{
delay(15); // this delays the camera for 15 ms
digitalWrite (cameraTrigger, HIGH);
delay(10);
digitalWrite (cameraTrigger, LOW);
delay(1000); // Take max 1 pic per second
}

Of course, this means re-compiling and uploading the code incessantly, which is a pain in the ass. A more elegant solution would be to add a second analog input with a potmeter. You compile the code once, and the delay between the beam breaking and triggering the camera can be fine-tuned as you’re taking photos: Simply turn the potentiometer up for a longer delay, and down for a shorter delay. You can calibrate it finely, so if you know the absolute maximum delay will be 50 milliseconds, calibrate it so 100% flow on the potmeter is 50, and zero is zero – that gives you the ability to fine-tune it to great detail, until the photos are just right.

I might have to try the same, actually, re-visiting my droplet shots. Might be fun!

Best of luck!

By Colin Peart on February 3rd, 2010 (permalink)

I have been working on something similar… I have an eos400d, and I built an interval timer with an LCD display so that you could configure the delays involved. A couple hints for you: the npn on the camera pins is not really needed. I wire both the af wire and the shutter wire straight to the arduino, but hold the pins high normally. The camera ground wire connects to the arduino ground, and to trigger the camera, I set the output pins to low. I have often thought I should use an opto-isolator instead, but never got around to it.

I am looking forward to seeing what other ideas you come up with. I am working on putting mine into a more permanent form at the moment, so that I can free up my arduino for other projects.

By Photographer Brisbane on February 7th, 2010 (permalink)

This is a great photography project to do next weekend. Excellent. Thanks.

PB

By Josh on February 8th, 2010 (permalink)

Check out this: http://www.instructables.com/id/Build-your-own-cheap-multi-function-wireless-ca/

Similar project, but designed to be portable and cheap. It’s extended the concept a bit to include an LCD screen and time lapse functionality.

Oh, congrats for the Engadget feature!

By Sha on February 8th, 2010 (permalink)

Love this idea. What was your cost breakdown for this project?

By Haje Jan Kamps on February 8th, 2010 (permalink)

Sha: Hard to say, I had an Arduino anyway – the laser module is about $10, I think, and the LDR is about $0.50 or so. Add some wiring and a $5 remote control – I reckon that the whole project costs less than $20 plus an Arduino.

By Rob R on February 9th, 2010 (permalink)

Can you post links to the specific components you used? I’d love to simply add them to my cart and build this solution. Thanks for the project!

By MAC C on February 13th, 2010 (permalink)

Absolutely fantastic!! This is exactly what I’ve been looking for to capture insects in flight, but being a non starter (so far) with the Arduino I too would be very interested in a parts list and any programming/hardware enhancemens you have in mind. Very well done and thanks!

By Markus on February 16th, 2010 (permalink)

Great DIY work!
These Arduino based triggers are so versatile that I have to build on some time – first I have different own DIY projects to do.

By ruben smit on February 17th, 2010 (permalink)

Can I trigger the video function of my DSLR? I need to find a way to operate my DSLR video camera on a distance…

Thnxx,

By Dan Baiotto on February 18th, 2010 (permalink)

Deer Cam!!!!

By Salted on March 2nd, 2010 (permalink)

I went ahead and put together your laser shutter idea with just a few changes. I implemented the logic in an FPGA instead of a microcontroller. This gives me an incredible amount of timing and repeatability. I’m setup my board to give me 0.5ms-127ms offsets from the time the laser beam is interrupted.

I took a series of different drops with different time delays. This makes it look like a slow motion series of the same drop, with a few differences in every capture. Here’s what I ended up with. (Actually there were about 100 frames, but I picked a nice spread of 16)

http://www.flickr.com/photos/saltedguy/4399880577/

Enjoy!

 

Share your wisdom



Go on, click the button

So, the 550D and the 50D cost practically the same, and have different advantages. Which one would you buy?
View Results

Get notified!

If you want to get a notification whenever Photocritic makes a new post, fill in the form below!

Email Address:

Powered by Feed My Inbox

I love this on Flickr

On the Book of Face

Photocritic on Facebook

It goes 'tweet'

  • • Microchip? That's a funny name for a dog. http://flic.kr/p/7L9Ei8 #Flickr (link)
  • • Magnificent MC: the 1960 BMW R69S. A beautiful gallery. http://bit.ly/dsLINa /via @BikeEXIF (link)
  • • A roundup of photography cheat-sheets? http://bit.ly/9cn6Wn /thx @katherine & @photojojo (link)
  • • The Leica M8 is perfect for street photography. It just needs one tiny modification: http://yfrog.com/jva7nj (link)
  • • A fresh take on nude photography: http://ow.ly/1kYCU (NSFW, obviously) (link)
  • • This is why #TopGear is great: Destroying a Toyota pick-up truck (3 parts): http://is.gd/aHcza / http://is.gd/aHczw / http://is.gd/aHcAa (link)
  • follow @photocritic on Twitter!

My books

Macro Photography Photo Workshop

Macro Photography Photo Workshop by Haje Jan Kamps My day job, if it can be called that, is being a writer. I've got one book out there so far and it's awesome, so go ahead and buy a copy! It's available from Amazon.com, Amazon.co.uk, and most decent-sized bookshops, too!

To find out more, check out this post! If you want to know more about the 'being a writer' thing, check this site out.

Put another dime in the jukebox

Put another dime in the jukebox In front of you, five hyperactive men with guitars, drums, and microphones. Behind you, five thousand fans. In your hands, a camera... You're going to need more than just a little bit of good luck to pull this one off. That's where this book comes in.

With nearly a hundred fantastic gig photos, and a ton of info about how to get involved in taking photos like this yourself, you can't go wrong. Buy this book. Grab your camera. Good luck.

Street Photography: London

Street Photography: London Take a Canon EOS 450D. Attach a Canon 50mm f/1.4 lens. Hit the streets of London. See what happens.

Sounds simple - but the results are anything but. Moving, intense, and personal, Street Photography: London is a great collection of the people of London, their passions, and their dreams. Look for yourself!


About

This site is all about learning more about photography, from the incredibly insightful (rarely) to the dreadfully mundane (also, hopefully rarely) via just about everything in between.

If this website seems a little whimsical and random, then that's because the author of this blog, who for the occasion is confusing himself by writing about himself in the third person, is slightly whimsical and random himself.

Enjoy!

- Haje