Foto Trigger

This experiment is very simple but was a whole lot of fun. The idea of my friend Sebastian Ritter was to make some kind of exploding water ballon fashion pictures. See below for one of the – not yet fotoshopped – pictures. The idea should be pretty clear.

0D7_Model_compressed_800

The basic approach is of course simple. There will be a water balloon wrapped around the model. Then he will focus his camera. The light will be switched off. Once the light is off he will trigger his camera.
Then the balloon will be poked from behind the model. As soon as the balloon explodes the flash will be triggered “at the right time”. This is a typical high speed fotography approach.

Triggering flashes for high speed pictures is well known to the Arduino community. There exist lots of successful attempts and even some commercial setups. However for a one time set we wanted something that is as cheap as possible and as fast to setup as possible. Thus a Blinkenlighty was used.

The idea of a sound trigger was almost immediately ditched as it was unclear if the water balloons would make enough noise. Instead the idea was to detect the needle when it pokes through the balloon. But how would we do it? We could connect one wire to a needle but where to connect the second wire? My trivial idea was to use two needles instead of one and see if it works out.

This setup is so simple that I did not even bother to fire up Eagle. Thus the circuit only existed on paper.

0D7_Schematic

The idea is that once the needles hit the water the Blinkenlighty will detect that the connection between the pins is closed and subsequently trigger the flashes.

Here is one of the first practice shots.

0D7_Practice_Shot_compressed_1280

And here is a close up where you can clearly see that there are two needles glued to the stick.

0D7_Practice_Shot_Close_Up_compressed_1280

The practice shots are necessary to get the timing right before the real shots are taken. This is because the models need not waste there time for this.

But lets focus on the Arduino sketch I created. This was the least work of the whole project – but hey this is an Arduino Blog 😉

//
//  www.blinkenlight.net
//
//  Copyright 2014 Udo Klein
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program. If not, see http://www.gnu.org/licenses/

const uint8_t input_pin = 2;
const uint8_t output_pin = 19;
const uint8_t analog_pin = output_pin - 14; // analog 5
const uint8_t monitor_pin = 13;

// larger values == more sensitive
// maximum is 1023 == always triggered
// minimum is 0    == never triggered
const int16_t threshhold = 1000;

const uint16_t trigger_delay_us = 10;
const uint16_t trigger_time_us = 20;
const uint16_t dead_time_ms = 200;

void init_monitor_pin() {
    pinMode(monitor_pin, OUTPUT);
    digitalWrite(monitor_pin, LOW);
}

void init_input_pin() {
    pinMode(input_pin, INPUT);
    digitalWrite(input_pin, LOW);
}

void init_output_pin() {
      pinMode(output_pin, INPUT);
      digitalWrite(output_pin, HIGH);
}

boolean not_triggered() {
    return analogRead(analog_pin) > threshhold;
}

void setup() {
    init_input_pin();
    init_output_pin();
    init_monitor_pin();
}

void loop() {
    while (not_triggered()) {}

    delayMicroseconds(trigger_delay_us);
    // close output low
    pinMode(output_pin, OUTPUT);
    digitalWrite(monitor_pin, HIGH);

    delayMicroseconds(trigger_time_us);
    // open output 
    pinMode(output_pin, INPUT);

    delay(dead_time_ms);
    digitalWrite(monitor_pin, LOW);
} 

Basically this sketch activates the internal pullup of one of the analog pins. While the pin is not connected to anything this will pullup the pin’s voltage to 5V. The pin as well as ground are connected to needles. As soon as some water is between the needles some small current will flow. This will decrease the voltage at the analog pin which will then trigger the flash. Notice that after triggering the flash there is some dead time to ensure that the flash will not retrigger immediately.

The real magic of the script is in the flash controller driver though. Notice that I do not toggle the pin level but I toggle between input and output mode. The point is that the flash controller runs on 3 Volts but the Arduino on 5 Volts. So an opto coupler or an open collector transistor driver would be an obvious solution. Here my idea was to emulate an open collector output. Setting a pin to low and switching to input is like closing the circuit of the flash controller. Setting the same pin to OUTPUT is like opening the circuit again. Important is that the only voltages that will be relevant is 0 V (while output is low) and the flash controller’s control voltage (while the pin is set as input).

Of course this will only work if the flash controller’s voltage is within the range of 0-5 Volts AND if the Blinkenlighty and the flash controller share a common ground. Fortunately all of the flash controllers were battery powered so this was no issue at all.

Pretty simple isn’t it? And the pictures are definitely cool.

0D7_Model_2_compressed_800

9 Responses to Foto Trigger

  1. Ken says:

    You have a brave model, she is smiling even though she knows she is getting soaked!

  2. scorcher1982 says:

    Can you post a picture of the whole wiring setup???

  3. miragempro says:

    This setup is so simple that I did not even bother to fire up Eagle. Thus the circuit only existed on paper. Sorry, I did not understand their design, one Fritzen, or Eagle would be great. a hug from Brazil Eduardo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s