Triggering a Camera’s Flash with Sound and Light

Update: Check out my latest Camera Axe project for a much more robust device that handles this or my store where I sell the Camera Axe.

For those just wanting to see the pretty pictures, click here.

This article focuses on making the sensors used to trigger a camera’s flash using a microphone or a cheap laser pointer. Since I’ve already described how to do the actual firing of a camera’s flash here I won’t focus on that part of this project today.

There are a lot of places on the web that describe how to trigger a flash with an electrical circuit, but I feel that using a microcontroller like Arduino offers big benefits. For instance you can easily add new sensors, or even run multiple sensors at once. Since the triggering of the flash is done in software it’s easy to add delays, or make a more complicated triggering algorithm based on multiple sensors. Lastly while the microcontroller does add some cost, it’s not much because boards like Arduino can be bought for around $35 and some of this cost for the microcontroller is offset by simpler circuits.

Now let’s talk about why we’re triggering the flash. The main reason is to help capture those moments that require extremely accurate timing. Computers are many orders of magnitude faster at waiting around for something to happen and then triggering the flash when that something does happen. Humans can try to compensate for this by watching the event and then trying to plan when to trigger the flash. For example when photographing a balloon popping, you can tell your friend to pop the balloon on the count of three and then take the picture on three. This sort of works, but this electronic flash trigger works much more consistently and it’s always ready to take the picture of those less predictable events.

Most SLR and DSLR cameras let you attach a cable to trigger the camera directly. Why not interface that camera trigger directly and just attach the flash to the camera if it’s dark? This would let you use the camera’s built in flash (my method requires an external flash unit). The reason we can’t do this is because camera’s are too slow. I’ve done some measuring of the delay between when you tell a camera to take a picture and when it actually takes a picture and found on my camera it’s around 20 ms. To a person this delay isn’t noticeable, but to a popping balloon it’s way too long. So instead of of triggering the actual camera we must trigger the much more quickly responding flash.

When I’m using this flash trigger I work in a dim room and set my shutter speed to 10 seconds. Since it’s nearly dark in the room the camera’s picture is still black after these 10 seconds. However if I trigger the flash for 1/1000th of a second that short burst of high intensity light is enough to light up the scene. So even though my shutter speed is 10 seconds, I’m effectively only taking a picture while the flash is active because that’s where all the photograph’s light is coming from.

Laser Sensor

This first sensor uses a cheap laser pointer and a photo resister to detect the laser’s light. The software is setup to trigger the flash when the laser beam is broken. The software also turns off the laser so it doesn’t show up in your photograph. Think of it as an electronic trip wire. This is great for catching moving objects. Add a small delay between the detection and triggering of the flash and you can catch cool things like a light bulb that is is smashing into the ground.

Since I didn’t have an extra laser pointer sitting around I bought this cheap laser card module. It’s very low power so I can run it off a digital output on the Arduino board. Originally I powered the laser directly from Arduino’s +3 volt output, but I found that it was better to run it off a digital pin so that the laser could be turned on/off. Since this laser runs on 3 volts and Arduino outputs 5 volts I used a voltage divider in my circuit to get the needed voltage. To sense the laser I used another voltage divider circuit with a photoresistor. An analog input on the Arduino was used to detect the if the laser was hitting the photoresistor or not.

Here’s the circuit.

Sound Sensor

This sensor detects noise. It’s very useful for detecting things like a drop of water splashing, or anything that makes noise. There are lots of places on the web that discuss how to build your own microphone and amplifying circuits, but I liked the idea in this article about using a guitar amplifier. A karioki machine or any other device that has a microphone input and an output line should work. You can pick up a low quality amp and microphone pretty cheaply on ebay or in a retail store. Sometimes you can get them really cheap at a garage sale.

The signal you get from an amplifier is going to be an electrical AC wave representation of the sound going into the microphone. This often means something like a 5 volt 8 kHz wave. The only thing I did was to add a diode to protect the analog input I was using on my Arduino board from the negative portion of this wave. Here are some pictures from my oscilloscope of the wave being generated by the amp. The first one is the full wave of my voice (I was singing “Twinkle Twinkle Little Star”), and the second picture is what it looks like with a diode.

You can see that the bottom half of the waves are getting chopped off, but that should be fine. The Arduino is more the fast enough to detect the voltage spikes. You could even make more sophisticated software to only trigger on certain frequencies of sound, but for now my software just looks for any sound spike over a certain threshold voltage.

Here’s the circuit.

Flash Trigger

I’ve already discussed this part of the system in this article, but for completeness here’s the circuit.

Building a Box to Hold it All

After understanding how all of these circuits worked it was time to put them all together and build a box that would handle all my flash triggering needs. Here are some photos of what I created.

Software

Last, but not least here is the software I wrote to run it.

// Maurice Ribble
// 4-12-2008
// http://www.glacialwanderer.com/hobbyrobotics

// This code is designed to to tune (see PRINT_MESSAGE define) and
// to run a sound sensor and a laser sensor.  Both of these sensors
// Are used to trigger a flash.  It should be easy to add additional
// sensors if you want.

// These enable the different types of triggers
//#define ENABLE_LASER_TRIGGER
#define ENABLE_SOUND_TRIGGER

// The threshhold values for the different triggers.
// These may need to be changed depending on evironment and sensors being used.
// Using PRINT_MESSAGES can help determine the correct value for these.
#define LASER_THRESHHOLD 500
#define SOUND_THRESHHOLD 100

// This prints messages to the serial port.  This is good to enable while determining
// the threshholds for your trigger, but these communications are very slow and
// when using these sensors to actually take pictures this should be turned off.
//#define PRINT_MESSAGES

// The digital pins being used
#define CAMERA_FLASH_PIN 4
#define LASER_PIN 5

// The analog pins being used
#define LASER_TRIGGER_ANALOG_PIN 0
#define SOUND_TRIGGER_ANALOG_PIN 1

void setup()
{
  pinMode(CAMERA_FLASH_PIN, OUTPUT);
  digitalWrite(CAMERA_FLASH_PIN, LOW);
  pinMode(LASER_PIN, OUTPUT);
  digitalWrite(LASER_PIN, LOW);

#ifdef ENABLE_LASER_TRIGGER
  digitalWrite(LASER_PIN, HIGH);  // Turn on the Laser
#endif

#ifdef PRINT_MESSAGES
  Serial.begin(9600); // open serial
#endif
}

void loop()
{
  int soundVal;
  int laserVal;

  ////////////////////////////////////////////////////////////
  // SOUND TRIGGER
  ////////////////////////////////////////////////////////////
#ifdef ENABLE_SOUND_TRIGGER
  soundVal = analogRead(SOUND_TRIGGER_ANALOG_PIN);
  if (soundVal > SOUND_THRESHHOLD)
  {
     digitalWrite(CAMERA_FLASH_PIN, HIGH);
#ifdef PRINT_MESSAGES
     Serial.println("Flash Triggered!!!");
#endif
     delay(100);
     digitalWrite(CAMERA_FLASH_PIN, LOW);
   }
#ifdef PRINT_MESSAGES
  Serial.print("Sound: ");
  Serial.println(soundVal, DEC);
#endif
#endif // ENABLE_SOUND_TRIGGER

  ////////////////////////////////////////////////////////////
  // LASER TRIGGER
  ////////////////////////////////////////////////////////////
#ifdef ENABLE_LASER_TRIGGER
  laserVal = analogRead(LASER_TRIGGER_ANALOG_PIN);
  if (laserVal < LASER_THRESHHOLD)
  {
     digitalWrite(CAMERA_FLASH_PIN, HIGH);
     digitalWrite(LASER_PIN, LOW);  // Turn off laser during picture
#ifdef PRINT_MESSAGES
     Serial.println("Flash Triggered!!!");
#endif
     delay(100);
     digitalWrite(CAMERA_FLASH_PIN, LOW);
     digitalWrite(LASER_PIN, HIGH);  // Turn laser back on after picture
   }
#ifdef PRINT_MESSAGES
  Serial.print("Laser: ");
  Serial.println(laserVal, DEC);
#endif
#endif // ENABLE_LASER_TRIGGER
}

109 Comments

  1. cigarBoxhacker said,

    November 9, 2008 @ 9:58 pm

    I had this idea, except instead of using an optoisilator I thought that a relay would work. Is there a reason you chose an optoisolator instead of a relay to trigger the flash?

  2. Glacial Wanderer said,

    November 9, 2008 @ 11:15 pm

    A relay should work, but I believe a relay would be much slower. You can look at the specs on your relay to find out how much slower it would be and whether it would impact your ability to capture the photo.

  3. Quercus said,

    January 1, 2009 @ 7:17 pm

    Hi there, I just made an arduino controlled flash trigger based in yours, and just wanted to say that I love it :-)
    I made a little video and a couple of pictures of it working, in case you wanna have a look (didn’t want to post here the URL without permission).

  4. Glacial Wanderer said,

    January 1, 2009 @ 9:36 pm

    Quercus, please post the video and URL. I’d love to see what you’ve done and it might help others who find this page. Thanks!

  5. Quercus said,

    January 2, 2009 @ 7:53 am

    Ok, there it goes, the page is not finished yet, but you can already see the video, some pictures and the code in http://projects.nosomos.org/arduino-controlled-flash-trigger. Hopefully I’ll upload the schematic in the next days :-)

  6. Rune Kyndal said,

    January 8, 2009 @ 12:39 pm

    Now we just need to add the standard LCD-Keypad Shield,
    and menus for choosing different sensors and programs (laser, sound, lightning)
    and precisely “dial” in a set time delay?

    pleeease :)

    Great work, im building one

    /Kyndal

  7. .::ich-wars-nicht.ch::. said,

    February 22, 2009 @ 3:50 pm

    EOS 450D Remote Trigger…

    On the left side of the Canon EOS 450D (and probably on any other EOS camera), there’s a connector for a remote shutter trigger. You can make your own remote trigger by sticking one side of a 2.5″ jack-jack cable into the connector, while b…

  8. booze said,

    February 28, 2009 @ 5:19 pm

    wanderer, great idea and wonderful writeup.
    I built a version of this with an integrated sound circuit and built it into a shield for the ‘duino. It works great, but I ran into a strange problem with the code; the laser only turns on when PRINT_MESSAGES is not commented out. I can run it printing to serial but would like to turn it off. Any ideas?
    -scratching my head…

  9. Glacial Wanderer said,

    February 28, 2009 @ 6:01 pm

    Do you have a link to it? I was planning to do something like this, but if you’ve already done it that will make it easier. If you can get the bugs ironed out I might even consider buying one of these shields from you if you have any extra.

    As for your problem, nothing popped out as obviously wrong in the code. Things I would check are making sure the printfs don’t fix some timing bug and checking what pins are used for serial communications to verify that’s not messing it up somehow. The code isn’t very big I’m sure you can make a few changes and see what’s going wrong. Sorry I couldn’t help more.

  10. chimpman said,

    March 3, 2009 @ 9:10 am

    Some great ideas here. Just got into the Arduino. What an improvement over the analog stuff. I am shooting a 40D and have rigged a circuit to trigger the shutter. It does not work for high speed stuff; shutter speed is about 58ms. Most DSLR’s are in this range. Way to slow (incidentally, relays are way too slow also). Saw a HS shutter idea from old hard drive on Flickr. Has anyone considered this or other ideas? In combo with all the above ideas HS shutter would make for a beautiful setup. Better than standing in the dark with a cable release.

  11. Peter Borghard said,

    March 15, 2009 @ 7:59 pm

    first off, great post. Very comprehensive. One thing I’m having trouble with when using a laser as a trigger is making sure that the item I’m dropping breaks the beam. For instance in my initial test I was dropping water and having trouble breaking the beam. Perhaps the ‘sound’ trigger would be better for something like this. Thoughts? Also, I was thinking of using a series of laser beams(3 or 4 w/ photoresistor) to form a wider trigger. I have to do some thinking about that one.

    Peter Borghard

  12. ribblem said,

    March 16, 2009 @ 2:24 pm

    Thanks Peter. I used the sound trigger for the milk droplets, but that wasn’t perfect either. Only about 50% of the drops triggered the microphone and I had to have the microphone very close so it got splattered with milk. I suppose if you had more amplification it would work better. I like your idea of using multiple beams. I see no reason it shouldn’t work. Also might be cool to try experimenting with mirrors so you could bounce the beam back and forth a lot of times, but getting that lined up would be tricky.

    I’m glad you mentioned photo transistors. Since I wrote this article I’ve learned more about phototransistors. They are a much better solution than the photoresistors I used for this project.

  13. Barry said,

    April 22, 2009 @ 9:51 pm

    Forgive my ignorance is the programme written in basic, I understand the electronic side of things

  14. Maurice Ribble said,

    April 22, 2009 @ 10:25 pm

    The program is written in a C-ish language. It uses a C compiler/linker (gcc), but has some helper functions that make it easy to use. If you are interested in programming microcontrollers, this is a great one to start with. All the programming tools are easy to use, open source, and free. You can read more about it at http://www.arduino.cc/.

  15. kyndal said,

    May 4, 2009 @ 6:59 pm

    I have started using a red LED “in reverse” instead of the photo resistor.
    seems to react a bit faster.. and much simpler to hook up too.. just one LED ;)

    works good, but needs to be aligned much more precisely than the photo resistor
    its not enough just to “light up” the diode. the laser needs to hit it “head on” right on the silicon inside
    (depends on the beam angle of the diode.. but straight is better)
    i use a dark red one so the resin color matches the laser. which filters out most of the ambient light
    and thereby knocking the “idle” threshold down between 0 and 20 when lid by the laser
    and far higher when “broken”

    \\
    Analog pin o———-|<|———-// Gnd

    Sniplet from the serial reply
    Laser: 0
    Laser: 0
    Laser: 0
    Laser: 15 Here the diode is lid by the laser
    Laser: 0
    Laser: 4
    Laser: 4
    Flash Triggered!!! first break
    Laser: 43
    Flash Triggered!!!
    Laser: 200
    Flash Triggered!!!
    Laser: 260
    Flash Triggered!!!
    Laser: 278
    Flash Triggered!!!

    need to find some visible spectrum phototransistors..

    /Kyndal

  16. Maurice Ribble said,

    May 4, 2009 @ 9:14 pm

    Nice trick with the LED. I’m actually working on finding a visible light photo transistor. I ordered a few different ones from mouser and will see if any work well.

  17. kyndal said,

    May 4, 2009 @ 10:14 pm

    yea, im looking at that too.. trying to get the systema bit more responsive..
    and i think photo diodes. which the LED is a pretty crude version of.
    or even better a photo transistor is the way.

    problem is that most of the ones i have found so far are infra red spectrum only.
    and a laser pointer gets bad if any response..

    /Kyndal

  18. Maurice Ribble said,

    May 5, 2009 @ 9:24 am

    Most of the photo transistors/diodes are IR only, but there are still a lot of choices that accept the full visible spectrum. I ordered this one to try, but I probably won’t have time to test it for awhile since I’ll be traveling for the next 3 weeks. http://mouser.com/Search/ProductDetail.aspx?qs=K5ta8V%252bWhtZr3fLfLxS3VA%3d%3d

  19. kyndal said,

    May 5, 2009 @ 3:09 pm

    off wikipedia.org
    ” The least expensive laser pointers use a deep red laser diode near the 670/650 nanometers (nm) wavelength.” (mine is the crappy 1$ ones. so thats probably about right)

    and the STH-310 you pointed out is sensitive between 450 nm -1100 nm
    With Peak sensitivity at 880 nm

    so that puts us around 65% on its Relative Spectral Sensitivity graph.
    so maby a filter is called for?
    and it is still very directional. (still trying to work out if that is an advantage of my LCD vs LCR)

    Looks okay. just added a couple to my next order.

    /Kyndal

  20. Maurice Ribble said,

    May 8, 2009 @ 9:20 am

    I tested the photo transistor I linked above last night with a DMM. I used a 100K resistor with it and it had very good voltage response with nice linear ramping (1V to 5V). I’m now convinced it will work for me. Here is the circuit I used http://www.glacialwanderer.com/_blog/blog2008/06_June/hr_lightningCircuit.jpg. It is from my lightning detection project. http://www.glacialwanderer.com/hobbyrobotics/?cat=9

  21. kyndal said,

    May 8, 2009 @ 6:40 pm

    Nice.. i just ordered a couple of those aswell.

    Im still tinkering with the idea of adding a display and button “shield” to the mix.
    with real time readout of the values and adjusting the thresholds.
    enable / disable sensors etc.
    instead of the current “computer assisted” not so “field” compatible system
    possible with a active / inactive mode so it doesn’t slow down the system while in use
    but activates on a button or something for adjustments..

    im looking at a 4 bit display, analog swich shield on ebay “16×2-LCD-Keypad-Shield-for-Arduino”

    would make it a very nice package.

    /Kyndal

  22. kyndal said,

    May 8, 2009 @ 6:58 pm

    http://www.nuelectronics.com/estore/?p=6

  23. Maurice Ribble said,

    May 9, 2009 @ 2:29 pm

    Kyndal, that is pretty neat. I’m actually working on my own version of this. It has ports that you can plug different sensors into and the PCB is designed in a way that integrates nicely into a plastic case. I’m also not doing as a shield for Ardunio, but I’m including the ATMEGA chip on the board so that the size is nice and small. I sent the board off to be built about a week ago and should have it back in about 3 more weeks. If that first version of the board works I will post a new article here about it in a month or two.

  24. kyndal said,

    May 9, 2009 @ 3:20 pm

    Sounds sweet.. are you keeping the code “arduino” compatible?

  25. Maurice Ribble said,

    May 9, 2009 @ 4:20 pm

    Yes, the code is going to be arduino compatible.

  26. mark said,

    May 15, 2009 @ 3:32 am

    Thanks! I tweaked it a little and used a Piezo element for the sound trigger, got really great results.

  27. Adrian said,

    May 15, 2009 @ 4:29 am

    Without any knowledge of electronics, I copied your circuit. (Thanks for the great detail!).
    I got everything working except that I could not get the optocoupler to trigger the flash. In fact, I was frying the oc!
    I was using an old flash unit;- many of the older flash units have a big trigger voltage, too high for the optocoupler.
    (There is a site which shows the trigger voltage of most strobe flash units;- http://www.botzilla.com/photo/strobeVolts.html).
    In the end I replaced the oc with a relais (Zettler AZ473-2CB-5DE). It’s a shame about the speed loss due to the relais but the circuit works now, even with my old flash unit.
    Adrian

  28. Maurice Ribble said,

    May 15, 2009 @ 5:36 am

    Adrian, that is a great link! I really appreciate you posting it. I’ve had a few people ask if their flash would work and never had such a good site to point to.

  29. kyndal said,

    May 15, 2009 @ 6:32 pm

    if your flash has IR slave port you can trigger optically with a IR diode. taped on / aimed at that “ir Eye”

    try with tv remote and you will see a nice strobe show ;)

    /Kyndal

  30. kyndal said,

    May 16, 2009 @ 7:22 pm

    i totally loved your piezo idea.

    so i put a “quarter” size piezo speaker on my table with a glass of water sitting on it
    and dropped a drop of water from like 20cm.

    gives me a very nice about 1v spike

    i put a 100nf cap in parallel with the piezo
    seamed to do a good job of reducing my 60hz background noice by about half

    line in ——————- “crystal center”
    | ||
    == 100nf || piezo
    | ||
    gnd ——————– “ground plate”

    Scope screenshot 0.2v/div 1 Sec
    http://kyndal.dk.googlepages.com/piezo.png

    looks perfect for waterdrops ;)

    /Kyndal

  31. Dan said,

    May 23, 2009 @ 8:24 am

    I don’t know anything about the technical side of this stuff. But I’d love to have some kind of a laser/sound tripwire for my Canon 5d and 1D Mark III. Mainly for animals during the night. Does anyone make something that would work for me? Or do any of you guys make and sell something for people like me?
    Thanks.

    Dan M.

  32. kyndal said,

    May 28, 2009 @ 12:35 am

    id suggest a “burglar alarm” or “outdoor floodlight light” motion detecting unit.

  33. kyndal said,

    May 30, 2009 @ 3:22 pm

    i hooked the piezo up today.
    ran it through a LM358 Operational Amplifier for amplification
    and signal conditioning, Works great. Detects a drop of water in a glass placed on top of the piezo

    piezoVal=1
    piezoVal=0
    piezoVal=1
    piezoVal=17
    piezoVal=28
    piezoVal=0
    ******* Flash ******* Triggered flash port=4 on PIEZO signal: piezoVal=81 PIEZO_THRESHHOLD=60 On Analog port=1 CAMERA_DELAY=0ms
    piezoVal=61
    piezoVal=2
    piezoVal=23
    piezoVal=22
    piezoVal=0

  34. Michael said,

    June 1, 2009 @ 10:01 am

    Check out my Video tutorial on how to take a picture of an exploding waterbomb:

    http://vimeo.com/4932871

    Michael

  35. Louise said,

    June 20, 2009 @ 8:51 am

    Thanks for the introduction to Arduino…

    I found this blog when searching for high speed flash photography and pretty soon found myself in possession of an arduino along with a bucket full of other misc electronics components to play with.

    I am by no means an electronics expert, in fact quite the opposite I don’t recall the last time I had picked up a soldering iron and have never used bread board in my life (didn’t exist last time I tried anything electronicsy lol)

    But now thanks to you, I am in possession of a prototype camera/ flash triggering thingy with BIG ideas which were just a fantasy 2 weeks ago. I have a 20 x 4 LCD display hooked up, 3 x 4 keypad, menu system up and running to set up the timer parameters and even backlight timeout… It’s amazing, I just luuurve the Arduino :) )

    Anyway, on to sensors. The first attempt I used a laser diode module and LDR which worked for larger/ opaque objects but didn’t do it for me when it came to water drops so I have been searching for a cheap effective way to detect them and came across this particular doodaa..

    http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=219-2527

    It is TTL output, so I just connected the output directly to the analogue input, gave it +5v to chew on, selotaped it to the kitchen tap with the drops falling through the slot, positioned camera and flash, fired up the program and gazed through the camera viewfinder to see a perfectly formed water drop perched in mid air every second. A quick adjustment of the timer to illuminate the drop a bit later and I had a wonderful water splash column with a drop perched above it every second.

    For a very reasonable £2 each from RS Components (probably half that any where else) it does the job admirably ;)

  36. Maurice Ribble said,

    June 20, 2009 @ 8:59 am

    Louise, thanks for sharing. I’ve often wondered how one of those sensors would work, but I never tried them. Looks like they work great! Good luck on interfacing the LCD and number pad to create a more user friendly version! I’ve done something similar here: http://www.glacialwanderer.com/hobbyrobotics/?p=167, but I bet you will come up with some improvements I didn’t think of.

  37. Asif said,

    July 8, 2009 @ 10:29 am

    Thanks for the great write up.

    A have a question regarding the voltages the microprocessor needs to switch. According to my calculations your circuit returns a voltage of 4.5v to Analogue Pin 0 when light, and 2.5v when dark.

    My photocell has different resistance to yours so I cannot replicate those voltages using a voltage divider – do I change the threshhold on the board or do I need to achieve just a similar variance in voltage? I calculate I can achieve 3.7v Light – 2.5v Dark, 2.3v Light – 1.1v Dark or 4v Dark – 2.9v Light depending on the resistor I pair the photocell to.

    I know nothing of electronics so I may be completely wrong – So many thanks if you can help…

  38. Maurice Ribble said,

    July 8, 2009 @ 11:37 am

    Asif, that should work fine. You just need a large enough voltage varience to detect with the Arduino. In the code you want to see what laserVal in this line:

    laserVal = analogRead(LASER_TRIGGER_ANALOG_PIN);

    gets set to in light and dark environments. Then you can set LASER_THRESHHOLD to the correct value for your circuit.

  39. kyndal said,

    July 8, 2009 @ 2:27 pm

    just monitor the returned value on the serial-port, and program the threshold accordingly..

    i suggest getting a photo diode or photo transistor instead of the LDR

    kyndal

  40. Jon said,

    July 11, 2009 @ 4:42 pm

    hello – i have been reading your article and tried to reproduce your technology. i bout an arduino and the components you have. the only difference is the laser i found is 5v so i didnt think i needed the resistors you have. however i cant gt it to work – can you help me?

    even before i connect a flashgon, the laser pointer is not lit up. do you know what i am doing wrong? I have laser + going to pin 5 and laser – going to neg. other bits i have usd are like your digram i think.

    when i connect flash to pin 4 and neg, it keeps flashing continuouesly, why would that be?

    if you could give me help in dianosing that would be much appreciated thanks Jon

  41. Maurice Ribble said,

    July 11, 2009 @ 6:53 pm

    Jon, how much current does the laser you’re using require? If it’s more than 40 mA then you may have damaged your arduino (http://arduino.cc/en/Main/ArduinoBoardDuemilanove). If the laser doesn’t have specs you could try hooking it’s +5V to the 5V pin on arduino which handles more current than the IO pins.

    I’m not sure why the flash keeps triggering itself. I would probe the different voltages with a DMM.

  42. Jon said,

    July 11, 2009 @ 9:17 pm

    if i connect the + from the laser to the +5v on the arduino then it comes on

  43. Maurice Ribble said,

    July 12, 2009 @ 5:41 am

    I’m going to assume you don’t have a DMM or other device to read voltage/current since that is the best way to debug this problem. The first order of buisness is to make sure you are loading programs to the Arduino correctly. You can do this with the blinky led program that comes with the dev environment. Then you need to make sure pin 5 is still working by attaching an LED to it and turning it on. There are people who can help on this forum: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl

    After you get the basics verified you can use a switching transistor to power a laser that uses more current than a pin can provide if this is your problem. There are examples of how to do this in that forum and on the general web.

  44. Ernie Hatt said,

    August 15, 2009 @ 4:32 pm

    Hi there,
    A very interesting article, I have one of these boards on order, there are a couple of questions I hope you will answer. I am fairly confident in the practical side of electronic circuits, But programming is something I have necer attempted. I have been playing around with some sound and photogate triggers, could your software be utilized to use these triggers, especially the photogate, th sound one is similare to yours. Regards Ernie

  45. Ernie Hatt said,

    August 15, 2009 @ 9:10 pm

    forgot my second question. Is there a way to program in an adjustable delay. Ernie

  46. Maurice Ribble said,

    August 15, 2009 @ 9:27 pm

    Hi Ernie. If you understand the electrical size of things here is what the microcontroller can do. It can output a signal on pin that is 0 or 5V at up to 40 mA. It can also read s signal that varies from 0 to 5 volts. If the electrical components you are trying to interface don’t follow those guide lines you need to add additional electrical components outside the microcontroller.

    Learning to program the Arduino isn’t difficult. All sorts of non-technical people figure out how to program the Arduino. It is one of the easiest microcontrollers to use. I suggest you go through some of the tutorials on this page to get an understanding how to program the arduino. http://arduino.cc/en/Tutorial/HomePage

    I’d suggest using a potentiometer and use it to control an adjustable delay. Here is a tutorial on this topic. http://arduino.cc/en/Tutorial/AnalogInput

  47. Ernie Hatt said,

    August 16, 2009 @ 10:51 pm

    Thanks Maurice, much appreciated. just a few more answers needed.
    What language is used, and do you have all these circuits attached to the Arduino at the one time and selected via software, or are they connected as required. Ernie

  48. Maurice Ribble said,

    August 17, 2009 @ 5:02 am

    The language uses a C++ compiler, but there are a bunch of helper functions built in so it’s much easier to use than standard C++. I’d suggest just looking through the examples and adding the pieces you need.

    I think the trigger circuit and the potentiometer circuit would be attached to Arduino at the same time. You would use different pins on the microcontroller for different circuits and then in software you would read or write to the different pins.

  49. Ernie Hatt said,

    August 17, 2009 @ 5:19 am

    Thanks Maurice, I mau decide to Have a board made for the CameraAxe. Ernie

  50. Ernie Hatt said,

    August 19, 2009 @ 6:02 pm

    Hi Maurice,
    I would like to learn to program the Arduino, any suggestions on Materials to suit a beginner. Regards Ernie

  51. Ernie Hatt said,

    August 25, 2009 @ 7:03 pm

    Maurice, I am having a problem compiling this code.

    ////////////////////////////////////////////////////////////
    // SOUND TRIGGER
    ////////////////////////////////////////////////////////////
    #ifdef ENABLE_SOUND_TRIGGER
    soundVal = analogRead(SOUND_TRIGGER_ANALOG_PIN);
    if (soundVal > SOUND_THRESHHOLD)
    {
    digitalWrite(CAMERA_FLASH_PIN, HIGH);
    I am getting an error in the second line
    Erroe:expected constructor, destructor, or type conversion before “=” token.
    any ideas as to what is needed. Thanks Ernie

  52. Maurice Ribble said,

    August 25, 2009 @ 8:10 pm

    Ernie, I suggest looking at and understanding some of the tutorials at: http://arduino.cc/en/Tutorial/HomePage

    Start with blinky. A great place to ask questions is on the Arduino forums: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl

    I don’t see anything wrong in the code you included above. I’d try changing things on the bad line until you isolate exactly what’s wrong. If you have a very old version of the Arduino software you might want to try updating that.

  53. Ernie Hatt said,

    August 26, 2009 @ 2:10 am

    Thanks Maurice, No I have the latest software and just bought the Demilanove with 382 processor, so that should be Ok. I will try your suggestions. Ernie

  54. kyndal said,

    August 27, 2009 @ 12:48 am

    the problems i get with code.
    is often somewhere completely different than where the software tells you.

    something to do with the code it jumps to, but which has been defined (or not)
    further up in the code.
    or just missing “; { }”

    /Rune

  55. Ernie Hatt said,

    February 22, 2010 @ 9:52 pm

    Hi Maurice,
    as mentioned in earlier comments, I am ok on the Electrical side but not the programming, though I am a little better now. I have a board put together for the sound Laser triggers, which work as indifidual circuits, but using your program above, I cannot get it to differentiate between the seperate circuits, I am doing something wrong here any Ideas. Regards Ernie

  56. Maurice Ribble said,

    February 23, 2010 @ 6:50 am

    If you change the circuits you need to update which pins the Arduino is using. Here is the code that does the output/input pin setup.

    // The digital pins being used
    #define CAMERA_FLASH_PIN 4
    #define LASER_PIN 5

    // The analog pins being used
    #define LASER_TRIGGER_ANALOG_PIN 0
    #define SOUND_TRIGGER_ANALOG_PIN 1

  57. Ernie Hatt said,

    February 23, 2010 @ 9:01 pm

    Thanks Maurice,
    I am following all that, what I am unaware of is how I can choose which circuit I want to use, it just seems to work with the laser side, I cannot get it to change to the sound module. Should I be changing from one sensor, to another. Ernie

  58. Adrian said,

    April 20, 2010 @ 12:21 am

    Hi,
    I see you used the optoisolator, and this is good.
    I also see discussion entertaining the use of relays.

    But I don’t know why you didn’t use a simple Transistor to trigger things.
    Is this not an option?

    Kindest Regards and Greatest respect on an awesome job.
    -Adrian

  59. Maurice Ribble said,

    April 20, 2010 @ 5:00 am

    I’ve used a transistor and they work. Many people use SCRs. The reason I go with optoisolator is it gives protection against very high voltage flashes and if it ever gets damaged its easy to plug a new chip into the socket.

  60. STEVE CANBY said,

    May 14, 2010 @ 2:43 pm

    Don’t want to waste your time but I am a novice at building any electrical device. What I would like to do, is build a device using a sound sensing unit that will pick up a gun shot from a starter pistol and flash a light. I am not sure where to begin so any help would be great.

  61. Maurice Ribble said,

    June 7, 2010 @ 4:41 am

    Steve, I’d suggest hooking this (http://www.sparkfun.com/commerce/product_info.php?products_id=8669) to an arduino board. And then follow this relay tutorial (http://www.glacialwanderer.com/hobbyrobotics/?p=9) to flash a light. Since you’re new you’ll need to spend some time figuring out how to connect these pieces together, but I’m confident if you do both of these things separately you’ll gain enough experience to combine them. If you have specific questions let me know.

  62. Ernie Hatt said,

    June 8, 2010 @ 7:18 pm

    HI Maurice,
    I am trying to add another sensor to your software. It works as an individual program, but when Im try to combine it into your software funny things start to happen, would there be any chance of you having a look at it for me, or give me some idea as to how to combine them. I have the hardware all ready to go. Thanks, regards Ernie

  63. Ernie Hatt said,

    June 8, 2010 @ 7:39 pm

    A little more info, I have managed to add pots to read the threshhold and delay values, and I am at present working on adding an Lcd Screen. So my knowledge of programming though very slim at present, is growing. Thanks Ernie

  64. ThierryD said,

    June 17, 2010 @ 4:05 pm

    Hello
    I can speak on this post because I made a detector drops of water for SLR photography.
    This small electronic circuitry detects a falling drops of water with an infrared barrier. It can detect extremely small objects but also transparent objects like drops of water.
    The electric installation is very easy to achieve.
    All details of installation, drawing, explanations and examples of photos are available on my website:
    rienquepourlesyeux.free.fr

  65. Ravendran said,

    June 23, 2010 @ 12:58 pm

    hi, just wondering how do you make the camera take the photo?

  66. Ernie Hatt said,

    July 14, 2010 @ 12:34 am

    Maurice, I have managed to get my project up and running, with three triggers, Sound, Photogate, and lightning, though I must say that apart from the initial idea, I can’t convay any thanks your way. for some reason you chose to ignor my questions. Still in away that did help me, it force me to use my brain, and at 75 that helped to keep selinity at bay for a while longer. Regards Ernie

  67. Tyson Wiseman said,

    August 14, 2010 @ 1:05 am

    Nice post, cool site, keep it up.

  68. Top Gifts for the Photographer in your Life | alex's photo weblog said,

    August 14, 2010 @ 11:03 pm

    [...] For the overachiever photographer in your life, how about high-speed photography.  You know, where one of your slack-jawed yokel buddies fires a bullet into a water balloon, and the [...]

  69. Ideas on the Waterdrop Trigger said,

    September 12, 2010 @ 10:32 am

    [...] this project has already been done before (Hobby Robotics), I was thinking of some of the difficulties that may arise from using this device. My first [...]

  70. Ernie Hatt said,

    October 7, 2010 @ 4:00 am

    Don’t know what difficulties you envisage, I have one and it works fine, only problem coms from not knowing what on is doing.

  71. What is Arduino? | CSIS 495 - Interactive and Generative Art said,

    November 10, 2010 @ 11:47 am

    [...] your own laser harp Make a lo-fi guitar effect pedal Trigger your camera’s flash for high-speed photography Build a modular musical step sequencer Detect seismic activity Tags: [...]

  72. Engineering 101 – Fall 2010 » Blog Archive » Luis Nolasco- Final Project Proposal said,

    November 10, 2010 @ 1:20 pm

    [...] http://www.glacialwanderer.com/hobbyrobotics/?p=11 [...]

  73. Electronics-Lab.com Blog » Blog Archive » Triggering a Camera’s Flash with Sound and Light said,

    December 22, 2010 @ 5:45 am

    [...] a Camera’s Flash with Sound and Light – [Link] Tags: Arduino, FLASH, laser pointer, microphone, trigger Filed in Sensor | 1 views No [...]

  74. DOING – 21/04/10 – Arduino Propa | Newcastle Digital Media Course Blog said,

    January 17, 2011 @ 12:06 pm

    [...] well as for… timing, triggers, remote [...]

  75. val46 said,

    February 27, 2011 @ 5:54 pm

    Great job….. Just this post as rekindled the electronic flame, my first Arduino just wondered if anyone can tell me if this project is possialbe with Arduino programming to program this to work. http://www.doc-diy.net/photo/smatrig2/

  76. tiara said,

    February 28, 2011 @ 12:15 pm

    this totally helped thanx

  77. jinlsui said,

    March 3, 2011 @ 8:59 pm

    first time come to this very long disucssions, and just got my first Arduino UNO. After building my analog high speed trigger and did some photos, I realized it’s too much work to do any modification. Comparing to the analog devices, one of hte advantages with Arduino is repeated precision in terms of trigger timing control as well as multi-trigger capacity. I want to use one or two potentiometers to dial in the timing value (instead of changing code), which should be trasnlated into delay time by Arduino via the A/D ports. I wonder if anyone have tried this idea, and have been able to display the translated delay time (perhaps in ms) on screen while waiting for trigger signal. Thanks.

  78. Rafal said,

    April 20, 2011 @ 9:40 am

    Wow jinlsui, this is a great idea, I would love to see an analog dial be able to adjust the delay :)

  79. Rafal said,

    April 20, 2011 @ 9:43 am

    perhaps this will help
    http://www.arduino.cc/en/Tutorial/Potentiometer

  80. Rookie said,

    July 3, 2011 @ 2:28 am

    Firstly just want to say wicked cool idea! Bought an Arduino just for projects like this and had mine for all about two days now. I was wondering if there is any way that I can work around the optoisolator? Coming from a rural area I have limited supplies, only a couple of diodes, resistors and a reed switch… I am also hoping to the flash off a disposable camera? Would that make much of a difference?

  81. Maurice Ribble said,

    July 3, 2011 @ 4:42 am

    Sure, you could use a transistor as a switch instead of the optoisolator. There are a lot of people on the arduino forums and even this site that show you how to do that. The flash on a disposable camera will be much slower, but it will still be fast enough for many types of shots.

  82. avrlabnet said,

    July 8, 2011 @ 9:35 am

    Can I use this device to capture such is not a drop of water or paint and deflates balloon or something else?

  83. Rookie said,

    July 8, 2011 @ 3:16 pm

    Thanks a lot Maurice, your code and circuit work perfectly. Only problem is I can’t seem to trigger the flash? I works perfectly with a LED in place but otherwise I can’t seem to get my Fuji disposable flash to trigger.

  84. Jon said,

    October 3, 2011 @ 5:55 am

    Hello.
    I’d like to find someone to build one of these sound triggers and I’m happy to pay for their time.
    It would have a different use to the norm. If you are interested in a small project please contact me at jonnyb@yahoo.com.
    Thank you.. Jon

  85. lasertrigger - Belgiumdigital forum - Digitale fotografie said,

    December 5, 2011 @ 2:49 pm

    [...] lasertrigger http://www.glacialwanderer.com/hobbyrobotics/?p=11 __________________ EOS 5D Mark II | 50 mm f/1.4 USM | 24-70 mm f/2.8 L USM | 70-200 mm f/2.8 L [...]

  86. Matt Bell said,

    January 6, 2012 @ 11:50 pm

    I built this and then added a bluetooth mate to communicate with an android app I wrote to make configuration easier: http://www.youtube.com/watch?v=3sFUDp0RTAc

  87. Playing with the Freeduino | Andrei said,

    January 9, 2012 @ 4:40 pm

    [...] up, this cool project! Though I’ll try to do it with IR instead of Laser, cause I’m having trouble finding [...]

  88. Peter said,

    January 16, 2012 @ 12:56 am

    Hi Maurice
    Thanks for your very informative articles. Great for someone with little electronic knowledge. I just have one question. I am using a 4N25 to trigger a D700 and just want to make sure what the trigger voltage should be before I connect it up. Depending on whether I set the digital pin as high or low the voltage can either increase to 3.6 or decrease to below 1 when there is a sudden increase in ight (flash)

    Thanks

  89. Robin | Photography Backdrops said,

    January 24, 2012 @ 2:28 am

    Thanks for posting this topic. This is a good source to help us understand more the importance of flash and lighting to create a good output in certain photography project.

  90. Pixel Src » Arduino controlled strobe said,

    January 30, 2012 @ 4:40 pm

    [...] I came across a website by Maurice Ribble which contains a wealth of information, cool projects and the “Camera Axe 5″ shield for Arduino – more about the shield in another post. What caught my interest was Maurice’s project on triggering a camera’s flash with sound and light. [...]

  91. n0vwx said,

    February 17, 2012 @ 3:48 pm

    Hello, Your “Lightning Detector/Trigger looks very interesting. We get a lot of spectacular storms here in the Rocky Mountains, and would be great if I could capture some of the displays. When I verify your code I am getting an error message that “gt was not declared in this scope” . This the “no pot” version.
    I am new at programming. Could you advise how I can correct this line? Thanks.

    if (abs(newLightningVal – lightningVal) > TRIGGER_THRESHHOLD)

  92. n0vwx said,

    February 17, 2012 @ 3:51 pm

    if (abs(newLightningVal – lightningVal) > TRIGGER_THRESHHOLD)
    It looks like included the wrong line.
    Thanks

  93. n0vwx said,

    February 17, 2012 @ 3:53 pm

    if (abs(newLightningVal – lightningVal) > TRIGGER_THRESHHOLD)

    The “&gt” is not making it to the forum. Thanks

  94. High Speed Photography Workshop with Arduino : The Edge | Digital Culture Centre said,

    February 27, 2012 @ 9:29 pm

    [...] laster-gate. Check out this tutorial on how to control a flashlight through an Arduino, and further schematics and Arduino sketch to fire sensor triggered flash events. The video below shows the first development stage; the flashlight is triggered through an Arduino, [...]

  95. sam said,

    March 15, 2012 @ 1:36 pm

    thanks a bunch morice, this really is a treasure, and a gr8 way to get into arduino,

    but if i may ask, if i were to minimize the instrument, ill need to take out the amplifier, what could be a small device to take its place?

    thanks

  96. Using sound, light and an Arduino to trigger a camera flash « freetronicsblog said,

    May 31, 2012 @ 11:49 pm

    [...] This project is a great example of how anyone can use an Arduino or compatible board to turn the ordinary into the extraordinary. For those looking to recreate this project we offer a range of Arduino-compatible boards such as the Eleven, and also our MIC sound input module for the sound triggering. You can review the design and Arduino sketch at the product website here. [...]

  97. Sridhar Rajagopal said,

    June 5, 2012 @ 5:48 pm

    Hi,

    Wonderful project, and phenomenal results! Thanks for sharing! I recently bought an Arduino, and I’ve been looking for some cool projects, and being interested in photography, this is something I would like to try!

    Pardon my ignorance, but one thing that I didn’t get or understand is – when is the camera shutter released? You are triggering a remote flash using the Arduino, but how does the camera shutter release happen? Perhaps it is obvious, but I was missing this point.

    Thanks,
    Sridhar

  98. Gary said,

    October 11, 2012 @ 6:18 pm

    Hi Maurice, fantastic project !!!

    Would there be any way to add a solenoid to control the liquid drops ? Would be even better if you could trigger solenoid by button, to do a few drops of liquid, then stop until triggered again.

  99. Maurice Ribble said,

    October 11, 2012 @ 6:30 pm

    I have done the solenoid and button solution in another project. Check out http://www.cameraaxe.com

  100. Gary said,

    October 12, 2012 @ 5:18 am

    I did see your camera axe, but only after buying components for this project, still looks fantastic though. I do intend getting one, but not just yet. Just a shame there is only one stockist in the UK.

  101. Arduino et la photographie | Le blog du Lord said,

    October 24, 2012 @ 2:23 pm

    [...] Triggering a Camera’s Flash with Sound and Light [...]

  102. CrazeUK said,

    October 24, 2012 @ 9:11 pm

    Hi Maurice. Fantastic project.
    I want to use an extrenal laser pointer. Will this work with one?
    Also what if i dont use the sound or the ldr?

    Will the code account for that?
    Thanks

  103. CrazeUK said,

    October 24, 2012 @ 9:12 pm

    Peter my aim is also the same for a D7000, how did you get on?

  104. Moses said,

    November 18, 2012 @ 2:09 am

    Hello friends, nice post and fastidious arguments commented at this place, I
    am truly enjoying by these.

  105. High speed foto’s maken met Arduino - Mancave said,

    November 19, 2012 @ 5:07 am

    [...] namelijk te traag. En je dacht nog wel dat jouw dure camera zo goed was…Bouwen dan!De mysterieuze Glacial Wanderer (hij heet gewoon Maurice Ribble) heeft precies omschreven hoe je dit project moet bouwen. Zowel de [...]

  106. Jameson said,

    November 22, 2012 @ 6:52 am

    Very nice project, i’m buildin a light trigger myself at the moment and i was wondering if you measured the reaction time of the photo-resistor? it seems they have quite a delay, so perhaps i should better use a photo-transistor. source: http://www.resistorguide.com/photo-resistor/

  107. Cliff C. said,

    March 12, 2013 @ 10:26 pm

    Hey I tried making the Flash trigger using a PS7113-2A and cant seem to get it to fire……any thoughts?
    http://www.mouser.com/ds/2/286/ps7113-57025.pdf

  108. Robomore Blog » En İyi Arduino Projeleri said,

    April 22, 2013 @ 2:32 am

    [...] Arduino ile Yüksek Hızla Fotoğraf Çekimi [...]

  109. Triggering pictures with an Arduino / Aura-Blog said,

    August 27, 2013 @ 4:57 pm

    […] Source: Hobby Robotics […]

RSS feed for comments on this post