dropcontroller2
For photographing water drops ![]()
Controls a relay connected to digital pin 9, when pressing a pushbutton attached to pin 2, to open and close a selonoid valve for controlled water drop size and formation times, and simultaniously controlling another relay connected to digital pin 8 to fire a flash at the desired collision time.
As no flash unit was handy at the time of this experiment i used a powerled as a flash unit lighting it only 5 miliseconds.
If you have a speed flash handy drop its power to 1/128 , or 1/64 to get 1/20000 to 1/40000 second time freezes . Other flashes vary, best to google.
To connect a flash unit to Arduino board better use a optical coupler to prevent any power surge feedback from flash.
To connect the flash unit better use a digital out pin , rather then a relay.
İf you connect a flash unit to your drop controller probably the 308 delay time will be different, best fire the flash and observe by eye the collision time.
The circuit:
-
LED attached from pin 13 to ground
-
pushbutton attached to pin 2 from +5V
-
10K resistor attached to pin 2 from ground
-
a four relay module, two of which connected to digital pins 8, 9.
-
the power to the relay module comes from Arduino 5V pin
-
Note: on most Arduinos there is already an LED on the board
attached to pin 13.
here is my code
/*
dropcontroller2
For photographing water drops :o)
Controls a relay connected to digital
pin 9, when pressing a pushbutton attached to pin 2, to open and close a selonoid valve for controlled water drop size and formation times, and simultaniously controlling another relay connected to digital pin 8 to fire a flash at the desired collision time.
As no flash unit was handy at the time of this experiment i used a powerled as a flash unit lighting it only 5 miliseconds.
İf you have a speed flash handy drop its power to 1/128 , or 1/64 to get 1/20000 to 1/40000 second time freezes .
Other flashes vary, best to google.
To connect a flash unit to Arduino board better use a optical coupler to prevent any power surge feedback from flash.
To connect the flash unit better use a digital out pin , rather then a relay.
İf you connect a flash unit to your drop controller probably the 308 delay time will be different, best fire the flash and observe by eye the collision time
The circuit:
* LED attached from pin 13 to ground
* pushbutton attached to pin 2 from +5V
* 10K resistor attached to pin 2 from ground
* a four relay module, two of which connected to digital pins 8, 9.
* the power to the relay module comes from Arduino 5V pin
* Note: on most Arduinos there is already an LED on the board
attached to pin 13.
created 2005 as Blink
by DojoDave <http://www.0j0.org>
modified 15 Jan 2015
by Argu Sagturk as dropcontroller1
*/
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
#define RELAY4 9 //define name for the 4 Digital pin On the Arduino 9 ,
//this data pin link to 1 Relay board pin IN4
#define RELAY3 8 //define name for the 3 Digital pin On the Arduino 8
//this data pin link to 1 Relay board pin IN3
void setup() {
// Initialise the Arduino data pins for OUTPUT
pinMode(RELAY4, OUTPUT);
// Initialise the Arduino data pins for OUTPUT
pinMode(RELAY3, OUTPUT);
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
digitalWrite(ledPin, HIGH); // turn LED on:
digitalWrite(RELAY4,LOW); // Turns ON Relays 4 , first drop begins building
delay(50); // wait for 50 miliseconds, this time determines the drop size
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
digitalWrite(RELAY4,HIGH); // Turns Relay Off ,first drop ends forming , drops
delay(64); // wait for a 64 miliseconds, wait for the first drop to fall,
//hit the water surface and bounce forming a beautiful column and a drop over it
digitalWrite(ledPin, HIGH); //turn LED on
digitalWrite(RELAY4,LOW); // Turns ON Relays 4 , second drop begins building
delay(50); //wait for 50 miliseconds , this time determines the drop size
digitalWrite(ledPin, LOW);
digitalWrite(RELAY4,HIGH); // Turns Relay 4 Off, first drop ends forming , drops
delay(308); // wait for 308 miliseconds, meanwhile as the second drop falls unto
// the first bouncing drop, this delay time waits for the best picture catching moment to fire the flash,
// by playing with this time you can catch different moments of collision
digitalWrite(RELAY3,LOW); // Turns ON Relays 3 lighting the powerled
delay(5); // wait for 5 miliseconds , 5 miliseconds is
//the shortest response time for my power led, letting it behave as a crude flash
digitalWrite(RELAY3,HIGH); // Turns Relay Off , powerled off
delay(2000); //wait for two seconds, this prevents uncontrolled ,
//multiple drop formation
}
// else { //this is a leftover from the original Blink sketch
// turn LED off:
// digitalWrite(ledPin, LOW);
//digitalWrite(RELAY4,HIGH); // Turns Relay Off
}
//}