Beginner An Idiots guide: DIY Water Drop Controller with Arduinos and stuff.

Gareth
Thank you
Yes, single flash with green gel positioned above right, milk in the base, Xanthan gum in drop.
 
Last edited:
That is a terrific shot Jim!(y)
I love those 'separated' collisions...there's just something magical about them.
And yes....your background does indeed need a bit of a clean!!;)

I will hopefully be updating my project very soon, but I'm still a way off actually producing any images!
It seems I'm getting more and more involved with redesigning my drop controller than actually taking photographs!:facepalm:
 
Thanks Gareth
Not getting the time I need as having work done in the house at the moment.
That was a old background lying around
You'll be busy with the sketch, look forward to seeing you final results
 
Haha Gareth I don't know possibly the first jet separated, need to maybe clean the nozzle or the valve, not got much time at the moment renevations at home
 
Haha Gareth I don't know possibly the first jet separated, need to maybe clean the nozzle or the valve, not got much time at the moment renevations at home

I say don't clean it!!;)
I'm having a nightmare building a device that does a triple drop, and you did it accidentally!!:ROFLMAO:

It's a top notch image Jim...I've got to get my act together!
 
Good Work Gareth on this thread, its been a long and interesting read.

Started on making a drop controller Yesterday but did not get very far, the wires where very loose in the breadboard, so I need another one.

Also I loaded the software onto a Uno and only got a chance to enter the first value into the serial console before it display all the values, on another run I got 2 values in. I copied and pasted the code from here. I will have to have a look at this after Xmas.
BTW its the first time I have used an Arduino, so will will be something I have done wrong.

Pete
 
Hi Pete.:)

Thanks for reading it all! It certainly has snowballed a bit for sure!!:LOL:

Indeed, breadboards can be a bit 'floppy' with connections sometimes, especially when they're a bit long in the tooth....which is why I bit the bullet and soldered mine in the end.
But I think you're right, getting another would be an improvement.

With regards to your Serial Monitor query, I think you might need to change the 'line return' setting.
It should read 'No line ending' - see the image below...

No line ending.jpg

This way, it will wait for you to enter the values one by one, and then display what you have entered when you hit the start button.

Hope this helps Pete, keep me posted, and when you have a working setup, I'd love to see some water drop images.
I'm always happy to help if I can.:)

Best of luck!(y)
 
Hi Pete.:)

Thanks for reading it all! It certainly has snowballed a bit for sure!!:LOL:

Indeed, breadboards can be a bit 'floppy' with connections sometimes, especially when they're a bit long in the tooth....which is why I bit the bullet and soldered mine in the end.
But I think you're right, getting another would be an improvement.

With regards to your Serial Monitor query, I think you might need to change the 'line return' setting.
It should read 'No line ending' - see the image below...

View attachment 263860

This way, it will wait for you to enter the values one by one, and then display what you have entered when you hit the start button.

Hope this helps Pete, keep me posted, and when you have a working setup, I'd love to see some water drop images.
I'm always happy to help if I can.:)

Best of luck!(y)


Hi Gareth

That worked, just need to build the hardware, this could take some time.

Just another question or two.

What do you use to drop the drops into, is it a nearly full glass bowl or something similar and you say you are going to buld a multo drop version with 3 drippers, are they going to drop 3 seperate drops at the same time, or are they going to drip in the same spot?

Thanks Pete
 
Gareth
I got a Chromebook for Christmas just have to get the details on it as my camera club has asked me to do a demo sometime :eek:

Nice!:)
Best of luck Jim...I'm sure you'll be fine, your images are outstanding indeed...you're sure to wow them all!(y)
 
Hi Gareth

That worked, just need to build the hardware, this could take some time.

Just another question or two.

What do you use to drop the drops into, is it a nearly full glass bowl or something similar and you say you are going to buld a multo drop version with 3 drippers, are they going to drop 3 seperate drops at the same time, or are they going to drip in the same spot?

Thanks Pete

Glad you got it working Pete!(y)

I use an old wine glass or an old oven tray, depending on which PoV I want:

If I want that 'straight on' look with no reflection, I'll set it up something like this...

(Please excuse the crude nature of these illustrations:LOL:)


drop2.jpg

That gets me this kind of image...

drop1.jpg
 
Last edited:
Or if I want to include the reflections, I'll try for a setup something like this...

drop4.jpg

...which will (hopefully) result in an image like this...

drop3.jpg

I will fill the the wine glass to the brim with my water mix, and nearly fill the tray with the same mix...which can be quite a volume.
(It's a good idea to place the full wine glass on a saucer, because there will be some overflow)
I have found that the bigger the tray the better...to give some cropping room in post.
Ideally I would like to get the drop, collision and the reflection in the frame, without any of the edges of the tray.

Also, I have tried with textured oven trays (the ones with that mottled effect) and the pattern can sometimes show through into the image, which for me spoils it.

I have found a large plastic tray which just fits between the legs of my support, but it's clear, so I might look into seeing if I can spray paint it black somehow.
But it's more than big enough to capture an entire drop collision and the reflection...though I haven't tested it yet.
 
Last edited:
....you say you are going to build a multi drop version with 3 drippers, are they going to drop 3 seperate drops at the same time, or are they going to drip in the same spot?

Thanks Pete

It will hopefully dispense three drops onto the same spot, so that I can use three different coloured water reservoirs (mariotte bottles) to achieve a more colourful effect.
I was inspired by Corrie White's amazing triple drop images...

Here is a link to her 'Liquid Drop Art' website and one of her 'Classic Three Drop' images: LINK

Here is a link to how she set this up with a triple drop system using different coloured water: LINK

Of course, this is going to take quite a long time to set up the valves so that they drop their drops at exactly the right spot, but I think it's worth the effort!

I have become quite badly sidetracked recently...getting quite involved in the electronics side of things, even going as far as designing and printing my own printed circuit boards!
I'm not sure if I should put all that into this thread....I'm sure there isn't anyone that would find anything remotely interesting about it!!:LOL:

But I am hoping to get an update posted very soon.
 
Last edited:
Your work is always interesting:banana::banana: Gareth

Thanks Jim, appreciated!(y)

Tried some different liguids acrylic paint and Xantham gum mixView attachment 264421View attachment 264421

Outstanding Jim!!:clap::clap::clap:

However....are you sure that's not tomato soup??:LOL:

I'm joking of course...it's a terrific image...well done indeed!

Funny you should mention acrylic paint...I have some white acrylic paint tucked away somewhere, waiting to stand in for milk.
I'm always reluctant to use milk because it spoils so quickly (and the valves need to be cleaned thoroughly), and you have now confirmed that acrylic paint seems to work very well, so a big thank you Jim!(y)

You'll have to let me know how it cleans up though...will you dismantle/clean your valve?
I would think you would have to...I'm sure it would clog up fairly quickly.
Not a huge problem for us though...I'm sure we're both pretty used to pulling our valves apart now...that Xanthum gum clogs them up perfectly well on it's own!:LOL:

Great work Jim!!(y)
 
Last edited:
Gareth I have developed an odd trait, that the system triggers the camera every second time in other words Drops, no camera, drops and the camera drops no camera, this continues I have changed the optocoupler still the same, have you experienced anything like this?
 
Last edited:
Hi Jim, and Happy New Year!(y)

Your issue does sound familiar, yes.
I think what you're seeing is called 'switch bounce'.

All mechanical switch devices do it to some extent.
When you press the button, the metal contacts don't close cleanly...they continue to 'bounce' for a short time afterwards - maybe only for a few milliseconds, but enough to send a number of confusing pulses to the Arduino, rather than the desired single, clean pulse.

Switch debouncing is a big topic all on it's own, and I'm not an expert by any means (as the title to this thread shows!:LOL:), but suffice to say that there are several ways to deal with it.

- Software debouncing
- Hardware debouncing

Here is a link to a very helpful Hackaday page which neatly sums up the possible options - LINK
The author (Elliot) discusses that the best method is hardware debouncing using a combination of an RC circuit and a Schmitt trigger.
But for our purposes we could probably get away with just a simple RC circuit.

"What's an RC circuit?"

It's a very simple circuit that combines specific values of a resistor and a capacitor (R=resistor, C=capacitor)
Depending on the values chosen, you will get a different time constant...this is the bit we're interested in.

The forumula looks like this:

τ = RC

(Where τ is the time constant)

So, lets say that we want a time constant of 1 millisecond (which should be enough time for the switch contacts to settle down)

Lets put a 10 KΩ resistor and a 0.1 μF (100nF) capacitor into the formula...

That gives us our desired 1 millisecond time constant...perfect!

Here is a link to a handy Digikey RC time constant calculator (the one I've just used to do this calculation:giggle:) - LINK

Now simply add these components to your switch as in the following diagram:

RC time constant 1.jpg

This is the simplest (but least effective) method of debouncing...but I think it should be fine for our purposes...though, as I said, I'm no expert!!
It relies on the discharging of the capacitor to create a 'pulse' for the Arduino (yes...it's not a pulse as such - it's a discharge curve), and so the Arduino will only see one 'pulse' and while the capacitor is recharging, any other pulses (or bounces) will not be seen by Arduino.
The bigger the value of capacitor (and/or resistor), the longer the time constant.

I have tried messing around with Schmitt triggers, and while they do work well, it's yet another IC component and associated jumpers etc, that my tiny brains have trouble with!!:LOL:
But briefly, they create a clean, single rising or falling edge, 'filtering' out all the bounces, depending on thresholds etc....it gets a bit complicated, so I'll stop there!!

This might seem like too much hard work, and you might elect to just go with repeated presses of the button til you get a nice collision (I did with my MK I drop controller :giggle:)

Hope this has been helpful Jim, best of luck!(y)
 
Last edited:
Gareth happy new year
On your diagram for the camera control where there is a 330-ohm resistor pin 9 on the Arduino cable for the Vcc to the Optocoupler do I change it to 10K one as per your draw for debouncing and include a capacitor?
 
Gareth happy new year
On your diagram for the camera control where there is a 330-ohm resistor pin 9 on the Arduino cable for the Vcc to the Optocoupler do I change it to 10K one as per your draw for debouncing and include a capacitor?


Hi Jim.:)

I assume you mean this diagram?

full


That 330 ohm resistor is a current limiting resistor for the LED inside the optocoupler.
You shouldn't replace that with a 10K resistor.

Instead, put the 10K resistor from the Arduino side of the switch to 5 V DC, and a 100nF capacitor from the same side of the switch to GND.
(You'll need to connect the upper breadboard power rail to the Arduino 5V Pin - and most importantly don't mix up 12VDC and 5VDC!!)

Like so:

Water drop circuit 4.png


I hope my diagram is ok....it's getting a bit congested!!;)
 
Last edited:
Gareth
The miss timings are after I enter the drop time and delay then the flash time hit enter! It starts the repeat cycle and then the miss camera fault occurs but always drops every time
 
Gareth
The miss timings are after I enter the drop time and delay then the flash time hit enter! It starts the repeat cycle and then the miss camera fault occurs but always drops every time

Ahh, I misunderstood the question...sorry Jim!:sorry:

So you have it set up without the start button?
And it cycles every 5 seconds?

Then all of that waffle about debouncing is completely irrelevant!!:LOL:

Just so I'm clear on what your problem is:

1 - enter time values
2 - valve activates, dispensing two drops
3 - camera does not fire
4 - five second pause
5 - valve activates, dispensing two drops
6 - camera does fire, capturing the collision

...repeat...

And this happens every time?
It misses one camera activation every two sets of drops?

That's curious!

I assume this is the code you're using?

C++:
/*  Water Drop Controller V4
*
*  By Gareth Bellamy
*/

//This is where we assign our Arduino pins and declare our variables

const int camPIN = 9;        //Set camPIN (camera) to pin 9
const int solPIN = 10;         //Set solPIN (soleniod valve) to pin 10

int DropOneSize;             //1st drop size input variable (milliseconds)
int DropTwoSize;             //2nd drop size input variable (milliseconds)
int SolDelay;                //Set delay between drops (milliseconds)
int CamDelay;                //Set delay between drops and camera activation (milliseconds)

void setup() {

//Here is where we turn on the serial monitor and tell the Arduino

   Serial.begin(9600);                //Start the Serial Monitor
   pinMode (camPIN, OUTPUT);          //Set camPIN to an output
   pinMode (solPIN, OUTPUT);          //Set solPIN to an output

//Here is where the time delays will be entered into the serial monitor

   Serial.println(" ");                                                  //Print a space for ease of reading the text

   Serial.println("Enter 1st drop size in milliseconds ");               //Print text asking for 1st drop size
   while(Serial.available()==0) {}                                       //Wait for user input for 1st drop size
   DropOneSize=Serial.parseInt();                                        //Read user input

   Serial.println("Enter 2nd drop size in milliseconds ");               //Print text asking for 2nd drop size
   while(Serial.available()==0) {}                                       //Wait for user input for 2nd drop size
   DropTwoSize=Serial.parseInt();                                        //Read user input

   Serial.println("Enter the delay between drops in milliseconds ");     //Print text asking for time delay between drops
   while(Serial.available()==0) {}                                       //Wait for user input for delay between drops
   SolDelay=Serial.parseInt();                                           //Read user input

   Serial.println("Enter camera delay in milliseconds ");                //Print text asking for camera delay
   while(Serial.available()==0) {}                                       //Wait for user input for camera delay 
   CamDelay=Serial.parseInt();                                           //Read user input

//This section will print the value entered above for clarity and record keeping

   Serial.println(" ");                               //Print a blank line for neatness
   Serial.print("1st drop size     ");                //Print 1st drop size
   Serial.println(DropOneSize);                       //Print value DropOneSize
   Serial.print("2nd drop size     ");                //Print 2nd drop size
   Serial.println(DropTwoSize);                       //Print value DropTwoSize
   Serial.print("Valve delay       ");                //Print Valve delay
   Serial.println(SolDelay);                          //Print value SolDelay
   Serial.print("Camera delay      ");                //Print Camera delay
   Serial.println(CamDelay);                          //Print value CamDelay

}

void loop() {


//This next section is where we will use the times entered above to activate the solenoid and camera

       digitalWrite (solPIN, HIGH);            //Opens solenoid valve
       delay (DropOneSize);                    //Valve stays open for time value DropOneSize - 1st drop size
       digitalWrite (solPIN, LOW);             //Closes solenoid valve
       delay (SolDelay);                       //Time delay between drops
       digitalWrite (solPIN, HIGH);            //Opens solenoid valve
       delay (DropTwoSize);                    //Valve stays open for time value DropTwoSize - 2nd drop size
       digitalWrite (solPIN, LOW);             //Closes solenoid valve

       delay (CamDelay);                       //Time delay for camera activation

       digitalWrite (camPIN, HIGH);            //Sets camPIN to high - fires camera
       delay (100);                            //Holds camPIN high for 100 milliseconds to ensure signal
       digitalWrite (camPIN, LOW);             //Sets camPIN to low -
   
       delay (5000);                           //Delays the cycle for 5 seconds
}

The camera part is right down near the bottom:

C-like:
       digitalWrite (camPIN, HIGH);            //Sets camPIN to high - fires camera

       delay (100);                            //Holds camPIN high for 100 milliseconds to ensure signal

       digitalWrite (camPIN, LOW);             //Sets camPIN to low -

I (arbitrarily) wrote in a 100 millisecond delay to allow a nice long signal to which the camera can respond.
I cannot think why it's missing every other cycle though.
Perhaps you could try changing this delay value....increase or reduce...see what happens.


If you don't mind hanging on for a while (got some family stuff going on at the moment! ), I will put the circuit together shortly, and run that same code with my Canon 7D MKI to see what happens.

Maybe (hopefully) I can recreate the same issue, and we can chase the problem down.



I should be back in an hour or so.(y)

Hope that's ok Jim.:)
 
Gareth
its a camera problem was using my 6D and when you said you were going to try your 7D I thought I'll try my other camera the 5D MKlll, put it on and it never missed a shot.
I'm sorry for causing you all that trouble going well now will let see the results soon:ty:
 
Last edited:
Gareth
its a camera problem was using my 6D and when you said you were going to try your 7D I thought I'll try my other camera the 5D MKlll, put it on and it never missed a shot.
I'm sorry for causing you all that trouble going well now will let see the results soon:ty:

No trouble at all Jim:)...I quite like troubleshooting....I had just done some quick tests and found that it worked fine for me, so I knew it might have been some other reason.

I was going to get all fancy and upload some scope traces of the signals:LOL:
Don't need to now!

I'm glad you've got it all sorted now though....wonder why your 6D doesn't like it?

Nevertheless, it always good to have a backup though....have a great day with your family Jim!:)
 
Gareth green Acrylic and Xantham gum in the reservoir,
 

Attachments

  • 5D3_9211-Edit.JPG
    5D3_9211-Edit.JPG
    42.8 KB · Views: 14
  • IMG_9507.JPG
    IMG_9507.JPG
    91.1 KB · Views: 15
@Calvin Shrimp

Hi Jim

These are just wonderful images, truly exceptional!:clap:

But there you go again stealing the show with your 'malfunctioning' two drop controller that is somehow creating perfect three drop images!!:LOL:
Seriously though, this is terrific work Jim...keep 'em coming.(y)

And thanks for sharing your mix formula too...I haven't had a great deal of time recently to make any drop images, let alone experiment with mixes.
It's a science all on it's own, with some 'droppers' guarding their recipes very closely indeed.
 
Last edited:
Thanks Gareth.
True I don't know how it's managing to do the thee drops, but I not questioning it, as it is making great images
I'm only to happy to share what I've discovered with you after all the work you have put into the thread, only for you I may have not even made a dropper
 
Thanks Gareth.
True I don't know how it's managing to do the thee drops, but I not questioning it, as it is making great images

"If it aint broke...etc" :LOL:

Calvin Shrimp said:
I'm only to happy to share what I've discovered with you after all the work you have put into the thread, only for you I may have not even made a dropper

You're too kind Jim, many thanks!:)
 
Hi Jim.:)


That 330 ohm resistor is a current limiting resistor for the LED inside the optocoupler.
You shouldn't replace that with a 10K resistor.

Instead, put the 10K resistor from the Arduino side of the switch to Vcc, and a 100nF capacitor from the same side of the switch to GND.

Like so:

View attachment 264549


I hope my diagram is ok....it's getting a bit congested!!;)

Hi Gareth

I know nothing of Electronics, they had not been invented when I was at school:), the only thing I remember from school was connecting a battery and bulb and using a wire round resister to alter the brightness.

Can you recommend a good book about Electronics, mind you my brain is full and there is no room for any thing too complicated in it.

Just Checking, does that resistor connect to the 12v line of your Diagram, cos it then goes to the 5v Arduino.

Pete
 
Back
Top