High Speed Photography

My high speed photography project for water drops ect, is comming along very nicely so here what i have done so far.
With the Arduino Duemilanove i'm controlling a: Solenoid valve, Photogate, Flash and my Camera.
Works like this:

  1. open shutter on camera
  2. a delay control the drops from the solenoid valve
  3. a photogate waits for the drop the pass the gate
  4. after a delay the flash get fired and the picture is taken.

this is what i have done with it:

More here: Jens Erik Mikkelsen | Flickr

Here is the schematic for it, this is the first time i have drawn a schmatic so there might be some error in it:

And the code:

int buttonPin = 2;                 // Connection to the Button
int solenoidPin = 8;              // Connection to the Solenoid valve
int flashPin = 9;                 // Connection to the Flash
int cameraPin = 10;                // Connection to the Camera
int photogatePin =11;              // Connection to the Photogate

int varloop = 0;                   // Check variable for Photogate
int val = 0;                       // Variable for checking if something has passed through the photogate
int bval = 0;                      // Variable for checking is button is pressed
int flashTimer = 212;              // Delay before flash is fired   ----- Millisecond
// int flashTimer_micro = 500;         // Delay before flash is fired   ----- Microsecond (1000 = 1 milisecond)
int solenoidDelay = 250;            // Delay for the Solenoid vale, determinds how many drops are dropped 
int cameraDelay = 250;

void setup(){
  pinMode(cameraPin, OUTPUT);
  pinMode(solenoidPin, OUTPUT);
  pinMode(flashPin, OUTPUT);
  pinMode(photogatePin, INPUT);
  pinMode(buttonPin, INPUT);

void loop(){
  bval = digitalRead(buttonPin);
  if (bval == HIGH){
    varloop = 0;
    } else {
      while(varloop != 1){
     varloop = 0;

int openShutter(){
  digitalWrite(cameraPin, HIGH);
  digitalWrite(cameraPin, LOW);

int dropWater(){
  digitalWrite(solenoidPin, HIGH);
  digitalWrite(solenoidPin, LOW);

int detectFlash(){
   val = digitalRead(photogatePin);
  if (val == HIGH) {
//    delay(flashTimer_micro);
    digitalWrite(flashPin, HIGH);
    digitalWrite(flashPin, LOW);
    varloop = 1;

Next ting will be to add a LCD display

Jens Erik


Those are gorgeous pictures. And really ingenious work to make them.


Those are the most amazing pictures ever bookmarks. You should enter in a contest!!!!!!!!!!!!!! ;D

thats really cool, great photos :slight_smile:

you should try something similar with balloon popping... just replace the solenoid with a linear actuator attached to a needle... and you wont even need the photogate

Thanks for the comments

jezuz, haven thought of that, great idea

Jens Erik

One thing I was wondering about though. You have the photogate, so why go to the trouble of the solenoid? When I did this, I used a laboratory burette to give me a slow stream of nice fat drops.

To control how fast the drops are moveing, i need about 10 drops a sec to get the drops.I have the solenoid connected to a Mariotte Siphon (http://www.martin-waugh.com/?p=19 )so i get a steady stream of drops af the precise speed i want.

Hi Jens , I am a little confused (not difficult) over the Mariotte Siphon and the solenoid set up , If the solenoid is normally closed and fixed to the outlet of the Siphon , wouldn't the drops just sit behind the solenoid valve and build up. Then once released just drop in one spurt.
Also I am not really into code is this a one shot operation or does the button switch start the process

Have you got a shot of the full set up


Hi Barry

Yes the are a fixed pressure behind the solenoid valve, but i only open the solenoid valve for a very short time 75-250 micro sec, to control how many drops the solenoid valve will release, the height of the marion siphon depends how much pressure, thus determining the drop rate.

Yes the button starts the whole process.

I don't have a photo of the setup, i have just taken it down, but i will set it up again in a couple of days , then i will take a photo and post it

Jens Erik

Thanks Jens , I made the Hi-viz set-up and that works quite well but when trying to get a collision it was like a disco in here the flash going off every 500 milliseconds lol

I hot the picture now (forgive the pun) just waiting for my solenoid to arrive , then get down to business

once again thanks
Barry :slight_smile:

Hi Jens

Great pictures.
Can you tell me which solenoid valve you use?


Can you take a picture of the setup? The solenoid valve and everything else. Great work!

Me again Jens , looking at the schematic have you made a mistake with the LTV816 , the anode is going to ground on the diode pins , or am I having a blonde moment :slight_smile:


Me again Jens , looking at the schematic have you made a mistake with the LTV816 , the anode is going to ground on the diode pins , or am I having a blonde moment :slight_smile:


Very great photos :wink:

Can you tell me a site where i can learn more about the tehcnic to take photos like that?

Barry you are right i have made a mistake i have them switch around, the line that goes to the GND should to to arduino and the line with the resistor should go to GND :slight_smile:
To avoid massive flash fire you can change the reset delay on the kit, the assemble instructions will tell you how.

Manfred i bought the valve from here : Magnetventil - 2/2-Wege - Messing - Druckluft/Wasser/Öl - IG G 1/8" bis G 1" - stromlos geschlossen - PN 0 bis 16

part no. M21812Vgl000

MetRo_ you can start by going to :


here is a picture of the current setup

You can see it in a larger on my photo stream on Flickr

Jens Erik Mikkelsen

Here's my photo's on flickr without arduino

There are few ways to photograph them here's one google water drops


I'm building something similair. what do you mean by a photogate? an led + phototransistor pair? will water passing through it trigger it? (never tried it before..

Hi Jens

Thank you for the photo and the valve info.
The only valves which i have found are this: First Sensor - Deutsche Homepage
I sent mail with an inquiry over prices and availability, but i have no answer received at this time.

Currently i use a analog control (with 555 timer IC) with an IR gate and 3 Vivitar 283 flashes. I start the drops manually with pipette.
Images made with this setting: MF Fotogalerie

But now it's time for the arduino ;D

Hi Jens

I have another question: how many ampere the valve need? I doesn't found such information on the esska website.