📸 Photo flash control with Arduino controller

In this project, we will explain how to control the flash using the Arduino controller. To control the flash will need a “hot shoe”, through which we will give a sync signal. This assembly uses a shoe with a standard connector for a 1/8-inch plug. In general, you can use any other shoe. The signal for the flash in the overwhelming majority is the closure of the contacts of the sync cable. An optocoupler (characteristic) is used for the galvanic isolation of the flash circuit and the Arduino circuit. Using an optocoupler will allow you to isolate the controller from possible surges when the flash is triggered, which is especially characteristic of old flashes.

The control circuit is shown in the figure. It is very simple: we simply apply HIGH to the digital output, which closes the flash circuit through the optocoupler. The duration of the signal is 0.1 s.

Code:

// Maurice Ribble

#define CAMERA_FLASH_PIN 4

void setup()
{
pinMode(CAMERA_FLASH_PIN, OUTPUT);
digitalWrite(CAMERA_FLASH_PIN, LOW);
Serial.begin(9600); // open serial
Serial.println("Press the spacebar to trigger the flash");
}

void loop()
{
int cmd;

while (Serial.available() > 0)
{
int cmd = Serial.read();

switch (cmd)
{
case ' ':
{
digitalWrite(CAMERA_FLASH_PIN, HIGH);
delay(100);
digitalWrite(CAMERA_FLASH_PIN, LOW);
break;
}
default:
{
Serial.println("Press the spacebar to trigger the flash");
}
}
}
}

 

  • Jul 24, 2019
  • Category: Arduino
  • Comments: 0
Leave a comment

Please note, comments must be approved before they are published

Shopping Cart
0
No products in the cart.