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
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.
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:
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
}
}
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.
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!

































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
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.
Take a Canon EOS 450D. Attach a Canon 50mm f/1.4 lens. Hit the streets of London. See what happens.




Insights, suggestions and comments
INSANELY awsome!
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!
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 ;)
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! ;)
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!
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.
This is a great photography project to do next weekend. Excellent. Thanks.
PB
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!
Love this idea. What was your cost breakdown for this project?
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.
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!
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!
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.
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,
Deer Cam!!!!
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