Arduino High Speed Photography laser flash trigger

Hi, this is my first posting to exhibition…

I made a high speed flash trigger using a laser and light dependent resistor. The relay is a 4N25 optoisolator with the codes below.

Feedback, comments and suggestions are welcome :slight_smile:

High Speed Flash Trigger with LCD output

Instructions for use :-

1. Align mirror to position beam to the light sensor (LDR).

2. When LCD notify that the laser is aligned, press the push button once

3. Now your laser sensor is ready to trigger the flash when laser is cut

4. Drop objects to cut the laser

5. Once the laser is cut, the flash will wait for flashDelay miliseconds
before firing the flash and wait for 5 seconds 

6. If you need to test the flash trigger, press the button when the laser 
is not align 

Arduino pins :-
Analog Pin 0 - light sensor
Digital Pin 4 - laser
Digital Pin 9 - optoisolator
Digital Pin 10 - push button

Optoisolator (4N25) pins :-
Pin 1 - from Arduino Pin 9
Pin 2 - 220R to ground
Pin 4 & 5 connect to flash hotshoe

By Stanley
e-mail :


#include <LiquidCrystal.h>
// My wiring for LCD on breadboard
LiquidCrystal lcd(12, 11, 5, 6, 7, 8);

 *  High Speed Photography with Optoisolator, laser and LDR
int ledPin = 13;               // LED pin
int ldrPin = 0;                // LDR Sensor connected to Analog
int flashPin = 9;              // Optoisolator/Flash output
int laserPin = 4;              // Laser pin
int buttonPin = 10;            // Button pin
int ldr = 0;
int buttonStatus = 0;
int flashDelay = 0;            // 1000 = 1 sec

void setup() {

  pinMode(flashPin,INPUT);     // Set the optoisolator as input
  pinMode(buttonPin,INPUT);     // Read the ready button
  pinMode(laserPin,OUTPUT);     // Turn laser on or off
  pinMode(ledPin, OUTPUT);      // Set the LED pin as output
  // Serial.begin(9600);
  // LCD format is Col,Row

  lcd.print("HS Laser Trigger");
  lcd.print("Version 1.0");

void loop(){

  digitalWrite(laserPin, HIGH);  // turn on the laser
  ldr = analogRead(ldrPin);   // read light value 
  if ( ldr < 100 && buttonStatus == 0 ) {
     lcd.print("Laser aligned ");
     lcd.print(" ");
     lcd.print("Press button now");
  } else {
      lcd.print("Adjust mirror   ");
      lcd.print("till aligned ");
  if ( digitalRead(buttonPin) == HIGH ) {
     buttonStatus = 1;
  if ( buttonStatus == 1 ) {
  // Sensor ready, read the LDR for any cut in the laser
    lcd.print("Laser ready    ");
    lcd.print("Cut laser 4flash");
    if (ldr > 150) {                 // check if the laser is cut
       digitalWrite(laserPin,LOW);     // off the laser
       digitalWrite(flashPin, HIGH);   // triggered the flash
       digitalWrite(ledPin, HIGH);     // turn on the LED
       lcd.print("Flash triggered");   // display message on LED
       lcd.print("Wait for 5 secs ");   // display message on LED
       delay(5000);                    // Wait for 5 seconds
       buttonStatus = 0;                // Reset the button sensor
       digitalWrite(ledPin,LOW);        // Turn off the LED
    } // End if

Looks like a nice project! (extra credit for building the entire circuit on a breadboard...) Do you have a schematic? Have you taken any interesting pictures with it?

Ohh... I made this for a friend, no, I hv not tested it with a DSLR yet, waiting for him to test it and give me the feedback ...

Schematic ??... errr.. What software do I use to draw one ?

I listed all the parts and pin inside my


Just for those interested in producing their own schematic diagrams there is a free open source program called TinyCad. I highly recomend it. Since this is my first post and I'm being prevented from posting the actual link you will have to do a Google search for it. Trust me. You will be happy you did! :)

Here you go…

Thanks for the suggestion...