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

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.

Same here!:giggle:
Until about a year ago, I had never even heard of an Arduino!
I too remember that lesson with the bulb etc....ruddy nora....it's 35 years ago!!:eek:
Time does fly!!

seaodyssey also said:
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.

Unfortunately I can't recommend any books, since all that I have learned over the past year or so, has been from the internet....just bits and pieces of info from various sites etc.
Although I will say that 'the bulb lesson' that we both fondly remember is a good starting point to learning about Ohms Law.
I'm sure you've heard of it, it's a fundamental law of electronics, and is invaluable.

In summary:

V=IR

- V = voltage (volts)
- I = current (amps)
- R = resistance (ohms)

This can be rearranged to find any of the values, like so:

I = V/R - to find the current in amps.

or

R = V/I to find the resistance in ohms.

The wire wound resistor you mentioned (if I remember correctly it was called a rheostat wasn't it?) is another kind of potentiometer.
It essentially varies the resistance (a variable resistor?), so that you can control the flow of current through a device, in this case a bulb.

The resistor 'resists' the flow of current, so if we increase it, therefore we decrease the current flowing through the bulb, and it becomes dimmer.

So lets assume a 5V DC bulb (with a 5V DC supply).

And lets also assume that the rheostat is turned all the way down, so that the resistance is about 1 ohm.

What would be the current flowing through the bulb?

I = V/R

I = 5/1

And that would be 5 amps!
(Providing of course the power supply can deliver 5 amps)
Which is a lot of current, and would surely burn the bulb out quickly!

If you turn the rheostat up to say 1000 ohms.

I = V/R

I = 5/1000

so this results in a current of 0.005 amps or 5 milliamps.
Much less current, and so our bulb will not burn out, though it may be dimmer - a bit of fiddling can get a resistance that yields an acceptable brightness and won't burn out the bulb.

These calculations are very important when choosing a 'current limiting' resistor for LEDs etc...or when selecting a resistor for the input of an optocoupler (which has an LED inside it).
If you don't select the correct value, you're likely to burn out the LED if the resistor is too small, or if it is too large a resistor, the LED won't light up.
(The recommended current for LEDs is usually stated on a datasheet)

The value of 330 ohms (in the drop controller circuit) is a reasonably good approximate value for any LED connected to a 5 V DC circuit.
Since the typical recommended current draw for a (typical) LED is between 20 and 30 mA (0.02 to 0.03 amps), so back to our calculation (rearranging to find the resistance):

R = V/I

R = 5/0.02

So that gives us a resistance of 250 ohms...which I've rounded up to 330 ohms (common practice amongst the 'pros' apparently!)- which is an easily obtainable, typical value and works fine.
(Always better to round up the resistor, than round down - better to 'over-limit' than 'under-limit')
This 'current limiting' resistor is crucial for the longevity of LEDs - without them they'll burn out quickly.

These are very basic calculations (I recommend further reading), and they don't go into the power dissipated through a device, but any decent Ohms Law calculator should have this also.

Here is a link to a handy Ohm's Law calculator that I use from time to time:

http://www.ohmslawcalculator.com/ohms-law-calculator

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

Pete

Wow....good catch Pete!!:eek:
I had totally forgotten to add that the 10K resistor should be tied (pulled up) to the 5 V DC on the Arduino and not the 12 V DC rail!

I'm so sorry for the mistake - I think it happened due to me working with the older circuit layout with no switch, and therefore no need for a 'pull-up' resistor...I got confused!:sorry:

I have amended the diagram to show the correction.
I hope it's reasonably clear.

(This of course only relates to 'de-bouncing' of the switch, and you may or may not wish to do it.
It's good practice to de-bounce switches, but in a simple circuit like this, it may not be completely necessary - indeed, I didn't at first, and mine worked reasonably well.
The original circuit without the 'de-bouncing' components -
shown right at the beginning of this lengthy thread, linked here - is still correct however)

Water drop circuit 4.png

I will go back and correct the post earlier in the thread too.
[**Now done!**]

Thanks for the heads up Pete....that could have been disastrous!
You certainly don't want to mix up 12 V DC with 5 V DC!

I hope this has all been helpful.
Like I said, I am no expert (I'm an idiot afterall!:LOL:) and I'm still very much learning myself, but if there's anything that I can do to help, I surely will!(y)
 
Last edited:
Bravo Jim, Bravo!!:clap::clap::clap:

I do love the colours in this image - the orange water really compliments the blue bg very nicely indeed.

Don't what ever you do clean it!!:LOL:
Don't even move it!!:LOL:
Wouldn't want to upset the lovely 'three-drop-goodness' you have going on.;)
 
Thanks, Gareth.
Xantham gum 3-1 mix in the dropper, 3-2 mix in the bath, Tesco food color yellow, blue a4 card bg, I have changed the Delay cycle for 25 seconds to let the bath settle.
Times 61, 57, 50, 101
Jim
 
Thanks, Gareth.
Xantham gum 3-1 mix in the dropper, 3-2 mix in the bath, Tesco food color yellow, blue a4 card bg, I have changed the Delay cycle for 25 seconds to let the bath settle.
Times 61, 57, 50, 101
Jim

Good thinking on the delay times Jim.(y)
I too discovered that the delay was perhaps a bit short, which is when I ventured into the 'start-button' and 'potentiometer variable delay' system, thing!:giggle:
Going down this road, however, has proven to be very addictive.
My projects have snowballed and gone off at all sorts of wonderful tangents now!

I'll get it all back on track soon though....I promise!

In the mean time, I'm so glad you're posting your fantastic images here Jim, keeping this boat a-floating!!;)
 
Hello folks not sure if you are still following this thread or not but here goes!! i have built everything and it seems to be working fine apart from the fact that i have only 2 collisions out of about 500 shots, i'm thinking my dropper is too low so away to play with that today. I'm just using glycerin as have no xanthum gum to try.Don't know if this is relevant Calvin Shrimp about your camera only firing every second time, it wasn't on MUP mode was it ? as that had me stumped for a while until i figured out that was the problem. GartehB absolutely fantastic Tutorial
 
Had a good read through - most- of your thread Gareth, I see you mentioned Martyn Currey - I ordered some kit from him to build his controller a few weeks ago, unfortunately due to CV lockdown in Hong Kong I'm still waiting. I'm building a three valve kit for now - hopefully going to a SFB kit later and possibly side valves. I have dabbled in the past with collisions using a Phototrigger kit I bought from this very forum - about 5 or 6 years ago iirc. I'm building a frame using aluminium extrusion 2020 t-slot - again I'm waiting for kit to arrive, from China! Cant wait to get it setup - keep up the good work, its been great reading up. Looking forward to seeing your images from you and the others :)
 
Hi GarethB, I am new here and don't know my way around as yet, but I have to say that your post is just fantastic. I am a complete newb to electronics but have been inspired by your post and have started building my own Water Drop setup. Currently waiting for the electronic kit to arrive so in the mean time have started on the woodwork part, the Mariotte Bottle and looking at some of the videos by Paul McWhorter, another fantastic resource.
I am sure I will have nightmares and some fun when the Arduino Kit arrives!
Thanks so much for all your effort and sharing of your experience, it is greatly appreciated.
 
Hello all
I am also new here, and have built the basic water drop circuit by Gareth B using an Elegoo Uno, It does work using the solenoid valve, but my problem is that when I enter the code into the serial monitor, it only allows me to put in two of the four timing inputs, in this case
"Enter the first drop size in milliseconds" I enter a number,
It then prints "Enter 2nd drop size in milliseconds" and doesn't pause to let me enter a number?
then prints "Enter the delay between drops in milliseconds" I enter a number
It then prints "Enter camera delay in milliseconds" again with no chance to enter a number

The code now shows the four inputs but two are zero

I am pretty sure the code was downloaded correctly, as I have replaced it several times with same result

I do not understand code and have searched all the help recommended but still cannot figure out what is wrong, I would be most grateful if someone could help?

This is the original code from Gareth B

/* 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
}
 
Hello all
I am also new here, and have built the basic water drop circuit by Gareth B using an Elegoo Uno, It does work using the solenoid valve, but my problem is that when I enter the code into the serial monitor, it only allows me to put in two of the four timing inputs, in this case
"Enter the first drop size in milliseconds" I enter a number,
It then prints "Enter 2nd drop size in milliseconds" and doesn't pause to let me enter a number?
then prints "Enter the delay between drops in milliseconds" I enter a number
It then prints "Enter camera delay in milliseconds" again with no chance to enter a number

The code now shows the four inputs but two are zero

I am pretty sure the code was downloaded correctly, as I have replaced it several times with same result

I do not understand code and have searched all the help recommended but still cannot figure out what is wrong, I would be most grateful if someone could help?

This is the original code from Gareth B


I had the same problem

See this link for answer.

Gareth has not been around here or flicker since Jan this year, We have no idea why but hope for the best..

Pete
 
  • Like
Reactions: SeC
I had the same problem and had a okay around with delays and couldn't fix the problem. I then moved onto the LCD and Pots so that took the the serial console out of the loop and I got it working.. Had a lot of problems with the LCD, ended up going with the 20x4 LCD and still had problems.. Changed the code for the LCD and added the delays and print space and got it working now and it's built and in a box. I will test it out today at some point, it's been great fun learning arduino and starting to get a hang of it but obviously a long way to go ha ha
 
Hi guys. I have just made a rig based on Gareth's instructions and I have a couple of questions. 1. For double drops, is there any tricks to getting the second drop to land on the first? As the 2nd nozzle is offset, does it arc or just fall straight down from the angled nozzle? 2. I am being told elsewhere that a larger nozzle is better for getting good collisions, which is the opposite of what is recommended here? Any comments? 3. The way the code is written, the flash/shutter delay CD is actually D2+DD+CD. Therefore, if you change say DD, CD will also change. Would it not be better to make CD independent of the other settings for consistency? Thanks guys for a great project
 
I had the same problem and had a okay around with delays and couldn't fix the problem. I then moved onto the LCD and Pots so that took the the serial console out of the loop and I got it working.. Had a lot of problems with the LCD, ended up going with the 20x4 LCD and still had problems.. Changed the code for the LCD and added the delays and print space and got it working now and it's built and in a box. I will test it out today at some point, it's been great fun learning arduino and starting to get a hang of it but obviously a long way to go ha ha
From my experience with Arduino, the serial monitor causes all sorts of delay issues, and I never use it unless I need to debug code.
 
Hi guys. I have just made a rig based on Gareth's instructions and I have a couple of questions. 1. For double drops, is there any tricks to getting the second drop to land on the first? As the 2nd nozzle is offset, does it arc or just fall straight down from the angled nozzle? 2. I am being told elsewhere that a larger nozzle is better for getting good collisions, which is the opposite of what is recommended here? Any comments? 3. The way the code is written, the flash/shutter delay CD is actually D2+DD+CD. Therefore, if you change say DD, CD will also change. Would it not be better to make CD independent of the other settings for consistency? Thanks guys for a great project
I have been doing another dropper so have been away from this one for a while. You are right about the camera delay changing when you add drop delay and that changes everything. I ended up adding a variable? Not been using arduino for long ha ha. I set the second drop to 0 so that i would have just the one drop and set my camera delay at the top of the jet. This worked 90% of the time but when I added drop delay without 2nd drop size I would lose the jet. I took slow motion video of it and saw that the camera delay was just after the jet!,that shouldn't be happening as my settings for the jet should be the control if that makes sense? I don't even remember how I fixed the problem as I have lost the sketch! All I did was added another variable for the camera delay and it was camera delay - drop delay.. So if I had camera delay set at say 300 and added 50 to the drop delay the camera delay would then be 250. By the sounds of it you know what you are talking about so hopefully you will understand what I'm saying.. The end result was a 2 drop system that I could get dialed in in no time at all. Just set drop 2 to 0 and drop delay to 0 and get your camera delay set at the top of the jet then start adding the 2nd drop and it works flawlessly
 
After some head scratching, I ended up with this:

I used some short bits of single core wire (lying around) for the grounds, but jumper wires would have been fine, though a bit 'bird-nesty', and I didn't add the switch yet, but it worked!
Note judicious use of masking tape to label stuff.
You'll also notice that there is a red LED in there...I took that out eventually - it's not really needed.

full


I created a diagram in the style of a Fritzing diagram (free circuit layout tool that I couldn't get to work!)

full


(Note the orientation of the diode, it's directional and the circuit won't work if it's put in the wrong way round.)

Here are some closeups of the two sides of the circuit
The Solenoid valve side:

full


And now the camera side - refer to the main diagram for Arduino pin details and power etc

full


I haven't created a proper circuit diagram for this circuit...I apologise - if anyone would like one I will try to make one.

To connect the power supply, I used the croc leads and the 2.1mm power socket. (Click here for Addendum II)
I carefully bent the two pins apart to make sure I didn't get any shorts.
Then I attached jumper wires to the relevant section of the breadboard.

I also snipped the button part off the shutter cable and stripped the necessary wires.
What are the necessary wires?
Canon cameras are remotely operated by shorting either the focus wire or the shutter wire to ground.
This is in fact what is going on inside the button bit...it's just a simple contact switch.
I will only need the shutter wire, because I shall be manually focusing.
For my cable it was orange and white wires, but it's easy to check...just connect the cable to the camera and touch the wires,
whichever ones trigger the shutter are the important ones.
So, with the right wires stripped and connected with croc leads, and hooked up to jumper wires onto the breadboard, it's almost complete.

Below is the Canon N3 style shutter release plug (OoF!!)
You'll see that I have used a phono/RCA connector on the other end...makes life a bit easier, but not strictly necessary for the basic build.

full


I connected up the solenoid valve in a similar way...croc leads and jumper wires onto the breadboard.
I eventually did something similar to the shutter cable, namely used a phono connector...and a much longer wire...for safety and convenience...in my small (microscopic) home studio!

full


So, that's the wiring done...felt quite pleased with it!
great setup,do you have o
a code that is completely filled in
 
hi gareth
im completely new to this
i have set up the pinboard and copied and pasted
your code,im having problems with the serial monitop should it have an ensd line etc also do i just type a number ot do i need a semi colon after
and finally do i need to put anything into the code or is it good to go
many thanks complete novice
im using your first code can it be filled in and posted so i have an idea what to do
 
Hi Gavin
I got the drip going but can't seem to get it to fire the camera,I'm using your first code and putting everything in from the serial port.all working fine except the camera 2 cables while yellow and red,white and yellow connect to focus then the red takes the shot
 
Hi Gavin
I got the drip going but can't seem to get it to fire the camera,I'm using your first code and putting everything in from the serial port.all working fine except the camera 2 cables while yellow and red,white and yellow connect to focus then the red takes the shot
Gareth hasn't been on this site for about a year now, he just seems to have disappeared (I hope he's alright). So you may have to wait for someone else to answer your question.
 
This is a very interesting and well detailed project that I'm looking to adapt to use my four channel WiFi controller app, although might change to esp8266 to provide WiFi interface instead of the LCD. However I'm falling at the first hurdle, a while back "as you do" a bought a water valve solenoid on eBay that was potentially going to be used for a light painting / water project but it never made it off the "starting blocks". I've subsequently found the valve in amongst a myriad of bits of pieces and now trying to test it and confirm it will control water flow. This is where I have hit the problem, although I can hear the solenoid triggering it never passes the water from the input side. I've looked on line and found information about the pilot hole pressure but can't workout how to test it further. I was wondering if anyone who has constructed this project can confirm if water should flow from the input to the output regardless of how it's connected. I would get the valve listed in the component parts but not convinced I will not have the same issue.
This is my test setup (shown without wiring) which at the most has a few drops generated but this occurs when the valve is shut off.

3DAD86DA-966B-4EE6-925D-C36B444C4F8E.jpeg
 
This is a very interesting and well detailed project that I'm looking to adapt to use my four channel WiFi controller app, although might change to esp8266 to provide WiFi interface instead of the LCD. However I'm falling at the first hurdle, a while back "as you do" a bought a water valve solenoid on eBay that was potentially going to be used for a light painting / water project but it never made it off the "starting blocks". I've subsequently found the valve in amongst a myriad of bits of pieces and now trying to test it and confirm it will control water flow. This is where I have hit the problem, although I can hear the solenoid triggering it never passes the water from the input side. I've looked on line and found information about the pilot hole pressure but can't workout how to test it further. I was wondering if anyone who has constructed this project can confirm if water should flow from the input to the output regardless of how it's connected. I would get the valve listed in the component parts but not convinced I will not have the same issue.
This is my test setup (shown without wiring) which at the most has a few drops generated but this occurs when the valve is shut off.

View attachment 320067

Hi Stuart,
Can you post the part number of the valve please or a close photo of it. That may assist diagnosing the problem.
Cheers
Lee
 
Thanks for posting the details and the video. It seems to me that there isn't enough 'head' of water to fully activate the valve diaphragm. Can you increase the pressure that the valve experiences by squeezing the bottle a bit and see if that works?
 
Can you increase the pressure that the valve experiences by squeezing the bottle a bit and see if that works?
I didn't try squeezing the bottle but did connect the valve to an outside tap, it worked correctly when activated. This means I just need to sort out the pressure of the water connected to the valve.
 
After some head scratching, I ended up with this:

I used some short bits of single core wire (lying around) for the grounds, but jumper wires would have been fine, though a bit 'bird-nesty', and I didn't add the switch yet, but it worked!
Note judicious use of masking tape to label stuff.
You'll also notice that there is a red LED in there...I took that out eventually - it's not really needed.

full


I created a diagram in the style of a Fritzing diagram (free circuit layout tool that I couldn't get to work!)

full


(Note the orientation of the diode, it's directional and the circuit won't work if it's put in the wrong way round.)

Here are some closeups of the two sides of the circuit
The Solenoid valve side:

full


And now the camera side - refer to the main diagram for Arduino pin details and power etc

full


I haven't created a proper circuit diagram for this circuit...I apologise - if anyone would like one I will try to make one.

To connect the power supply, I used the croc leads and the 2.1mm power socket. (Click here for Addendum II)
I carefully bent the two pins apart to make sure I didn't get any shorts.
Then I attached jumper wires to the relevant section of the breadboard.

I also snipped the button part off the shutter cable and stripped the necessary wires.
What are the necessary wires?
Canon cameras are remotely operated by shorting either the focus wire or the shutter wire to ground.
This is in fact what is going on inside the button bit...it's just a simple contact switch.
I will only need the shutter wire, because I shall be manually focusing.
For my cable it was orange and white wires, but it's easy to check...just connect the cable to the camera and touch the wires,
whichever ones trigger the shutter are the important ones.
So, with the right wires stripped and connected with croc leads, and hooked up to jumper wires onto the breadboard, it's almost complete.

Below is the Canon N3 style shutter release plug (OoF!!)
You'll see that I have used a phono/RCA connector on the other end...makes life a bit easier, but not strictly necessary for the basic build.

full


I connected up the solenoid valve in a similar way...croc leads and jumper wires onto the breadboard.
I eventually did something similar to the shutter cable, namely used a phono connector...and a much longer wire...for safety and convenience...in my small (microscopic) home studio!

full


So, that's the wiring done...felt quite pleased with it!
I can`t access any of your images, they are listed as full. Also do you have a full circuit diagram, I am a rank beginner in electronics and this would be much appreciated.
 
Project Updates.

It's been a little while, so I thought I'd get up to date as to where this project is and where it's going.

When I first decided to build a water drop controller, I originally wanted it to be nice and neat, in a box with buttons and control knobs.
I have recently taken a step closer to this goal.
I thought it was going to be way too advanced for me, but it turned out to be not too bad....I was forced, however, to break out the soldering iron!
My soldering isn't pretty, but it works!

So, the plan is to have a set of four control knobs to adjust the time delays 'on the fly' and so that the whole controller can be independent of a computer, since at the moment it will only work when powered through my old laptop, and I am only able to adjust the time values using the serial monitor through the Arduino IDE software.

I also wanted to see the time delay values as they are adjusted, so I will need some sort of display.

And finally, because the Arduino UNO is rather bulky, and is only really suitable for prototyping with a breadboard, I wanted to use a much smaller version of the Arduino, but with the same functionality.

This is what was needed:

  • 4 X 10 kilo ohm linear potentiometers - these are rotary adjustable resistors, used to vary the time delay values. - BITSBOX LINK
  • A 16X2 LCD display panel - used to view the adjusted time delay values. - BITSBOX LINK
  • An Arduino NANO - a tiny version of the Arduino micro controller (PCB headers are included in the ones I bought) - AMAZON LINK
  • A length of trimmable PCB header - this is to solder to the LCD screen, so that it can be connected to either the breadboard or the PCB when I get to that stage. - BITSBOX LINK
  • Another, larger breadboard, it's getting quite large now!! - BITSBOX LINK
  • A soldering iron and some leaded solder....and some patience!!
Here is the complete, working prototype on (a few) breadboards.
The nearest breadboard has the original circuit, which is essentially unchanged, except that I've added a start button so that it doesn't cycle the drop program continuously.

full


This next pic shows the Arduino Nano....you can see how small it is - it's amazing that it can do exactly what the bigger UNO board can do.
It does, however, need to be set up correctly in the Ardiuno IDE software - CLICK HERE - to see the page on how to do it.
This needed to have the header pins soldered to it, to allow it to be mounted to the breadboard and later to the PCB.
My soldering is not very pretty, but it works!

full


Next is the LCD display that I'm using...it's a bog standard, dirt cheap 16X2 LCD screen, compatible with the Arduino libraries.
I needed to buy a length of standard PCB header and solder it to the LCD, again to mount to the breadboard and later the PCB.

full


If you are a professional electronic engineer, I urge you to look away now!!!
This pic shows a close up of some rather dodgy soldering!!
Oh well....practice makes perfect....maybe!

full


Next is a pic of the 10K potentiometers, or 'pots' as I believe they are called by the pros!
They are essentially variable resistors - at one end of their travel they have very low resistance, and at the other end they have 10 kilo ohm resistance.
I will use these to vary the time delays, and the Arduino will read the analogue resistance values from the pots, and translate them into a digital signal that is then fed back into the controller to change the time delay.

full


It works!!
This pic shows the LCD with the time delay values that I can change on the fly using the potentiometers
The top line shows my abbreviations:

  • D1 - 1st drop size
  • D2 - 2nd drop size
  • DD - drop delay, this is the time between the two drops
  • CD - camera delay, the time delay between the last drop and the camera firing.
full


I had to make some tweaks in the program so that I would get meaningful and accurate readings since all the values are in milliseconds.
I found that without some programming adjustments, you need only breathe on the pots to change a value....they were far too sensitive.
I can`t open any of your images, could you possibly send me a circuit diagram of your system?
 
Revised Arduino sketch....again.

I wish to thank Lee, Sérgio and Bill for their advice on the subject of the annoying problem of 'ghost' numbers on the LCD screen.
After noticing that the 'ghost' number problem still existed, I tried both the fixes that were suggested by Lee @Leebert (confirmed by Sérgio @Picareto ) and Bill @billbillbill
The combination of the two fixes has successfully corrected the issue completely.

More specifically, Lees suggestion of writing a line of spaces before each number and resetting the position of the cursor, and Bills suggestion of using the map command to more precisely control the position and values from the pots both worked a treat!

Here is the (final?) sketch:

C-like:
/*Water Drop Controller V7
 * Cleaned up LCD screen display by inserting spaces appropriately
 * Cleaned up pot control using the 'map' command
 * Added a name for the device - 'Drop-O-Matic'
 * By Gareth Bellamy
 *
*/

#include <LiquidCrystal.h>         //open LCD library
LiquidCrystal LCD(10,9,5,4,3,2);   //LCD to use pins 10, 9, 5, 4, 3, 2

const int solPIN = 7;              //assign pin 7 to solenoid
const int camPIN = 6;              //assign pin 6 to camera
const int potONE = A1;             //assign pin A1 to potentiometer 1
const int potTWO = A2;             //assign pin A2 to potentiometer 2
const int potTHREE = A3;           //assign pin A3 to potentiometer 3
const int potFOUR = A4;            //assign pin A4 to potentiometer 4
const int startBUTTON = 11;        //assign pin 11 to startBUTTON

int solDEL;                        //declare solDEL variable
int camDEL;                        //declare camDEL variable
int dropONE;                       //declare dropONE variable
int dropTWO;                       //declare dropTWO variable

int dropONEval;                    //declare dropONEval variable
int dropTWOval;                    //declare dropTWOval variable
int camDELval;                     //declare camDELval variable
int solDELval;                     //declare solDELval variable

int buttonSTATE=HIGH;              //set buttonSTATE variable to HIGH

void setup() {
 
  pinMode(solPIN, OUTPUT);          //set solPIN to output
  pinMode(camPIN, OUTPUT);          //set camPIN to output
  pinMode(potONE, INPUT);           //set potentiometer 1 as input
  pinMode(potTWO, INPUT);           //set potentiometer 2 as input
  pinMode(potTHREE, INPUT);         //set potentiometer 3 as input
  pinMode(potFOUR, INPUT);          //set potentiometer 4 as input
  pinMode(startBUTTON, INPUT);      //set startBUTTON as input
 
  LCD.begin(16,2);                  //start LCD with column/row parameters
  LCD.setCursor(0,0);               //set cursor position as 0,0 - top left
  LCD.print(" Drop-O-Matic ");      //print the name of the device - 'Drop-O-Matic'
  delay(2000);                      //hold the device name on screen for 2 seconds
  LCD.setCursor(0,0);               //reset the cursor position
  LCD.print("D1  D2   DD  CD ");    //print the line "Time Value "

}

void loop() {

  dropONE=analogRead(potONE);               //read analogue value from potentiometer 1
  dropONEval=map(dropONE,0,1023,10,100);    //use map to increase accuracy of pot
  LCD.setCursor(0,1);                       //set cursor position as bottom left
  LCD.print("   ");                         //print a line of 3 spaces to keep LCD clean
  LCD.setCursor(0,1);                       //reset cursor position
  LCD.print(dropONEval);                    //print the calculated time value dropONEval

  dropTWO=analogRead(potTWO);               //read analogue value from potentiometer 2
  dropTWOval=map(dropTWO,0,1023,10,100);    //use map to increase accuracy of pot  
  LCD.setCursor(4,1);                       //set cursor position as bottom line, 4 characters from left
  LCD.print("   ");                         //print a line of 3 spaces to keep LCD clean
  LCD.setCursor(4,1);                       //reset cursor position
  LCD.print(dropTWOval);                    //print the calculated time value dropTWOval

  solDEL=analogRead(potTHREE);              //read analogue value from potentiometer 3
  solDELval=map(solDEL,0,1023,20,200);      //use map to increase accuracy of pot                  
  LCD.setCursor(9,1);                       //set cursor position as bottom line, 9 characters from left
  LCD.print("   ");                         //print a line of 3 spaces to keep LCD clean
  LCD.setCursor(9,1);                       //reset cursor position
  LCD.print(solDELval);                     //print the calculated time value dropTHREEval

  camDEL=analogRead(potFOUR);               //read analogue value from potentiometer 4
  camDELval=map(camDEL,0,1023,20,200);      //use map to increase accuracy of pot                  
  LCD.setCursor(13,1);                      //set cursor position as bottom line, 13 characters from left
  LCD.print("   ");                         //print a line of 3 spaces to keep LCD clean
  LCD.setCursor(13,1);                       //reset cursor position
  LCD.print(camDELval);                     //print the calculated time value dropFOURval
 
  LCD.print("                ");            //print a blank line (16 spaces) to keep LCD clean

  buttonSTATE=digitalRead(startBUTTON);       //monitor state of start button
    if(buttonSTATE==LOW) {                    //wait for start button to be pressed
 
    digitalWrite(solPIN, HIGH);               //set solPIN to HIGH - open the solenoid for first drop
    delay(dropONEval);                        //delay for time value dropONEval - first drop size
    digitalWrite(solPIN, LOW);                //set solPIN to LOW - close the solenoid
 
    delay(solDELval);                         //delay for time value solDELval

    digitalWrite(solPIN, HIGH);               //set solPIN to HIGH - open solenoid for second drop
    delay(dropTWOval);                        //delay for time value dropTWOval - second drop size
    digitalWrite(solPIN, LOW);                //set solPIN to LOW - close the solenoid
 
    delay(camDELval);                         //delay for time value camDELval - delay between second drop and camera activation
 
    digitalWrite(camPIN, HIGH);               //set camPIN to HIGH - trigger camera shutter
    delay(100);                               //delay for 100 milliseconds to ensure clean signal
    digitalWrite(camPIN, LOW);                //set camPIN to LOW - reset shutter button

 
  }
  else{
    digitalWrite(camPIN, LOW);              //set camPIN to LOW - reset pins
    digitalWrite(solPIN, LOW);              //set solPIN to LOW - reset pins
  }
}

So thank you once again Lee @Leebert , Sérgio @Picareto , and Bill @billbillbill - my controller is working very nicely indeed and is easy to read and vary the values!

Stay tuned for some water drop images!!

:)

I'd love to build this, but the schematics to connect all the components are not clear! I saw one schematic but that is without LCD screen. Can you share the circuit that goes with this program. (I've got almost all the stuff I need and the program but don't want to mess with wrong wiring and blow it all :D)
 
Lets build this thing.

This is what the Elegoo UNO R3 basic starter kit looks like

full


It comes in a neat little box and the bits I'll use are:

  • The Elegoo UNO R3 board
  • The small breadboard
  • A 220 ohm resistor
  • A 330 ohm resistor
  • A 2 kilo ohm resistor
  • A momentary switch (little bag bottom left...it's tiny!)
  • Jumper wires
  • The supplied USB cable
Here's my workplace showing the jumper wires and some other stuff:

full


This is how the rows and columns are connected on the breadboard:
full

The top red row is connected the entire length of the breadboard - used for power supply
The same with the blue row - used for ground
These are mirrored along the bottom of the breadboard
The middle is seperated into columns.
Each hole in the column (circled) is only connected to other holes on the same column.
There is a gap (grey line in the image) through the middle of the breadboard, the columns are not connected across this gap.

Now I will need some of the other bits:
(images are not acual size!)

A TIP 120 Darlington Transistor
full

A 1N4007 rectifier diode (note the grey bit on the right - must be connected the right way round)
full

A 4N35 optoisolator (note the dot bottom left, this is to identify the correct orientation)
full

And the momentary switch looks like this - it's used as a reset button to restart the program
full
Can't see the pictures under the "Let's build the thing" section
 
It would be really helpful to me a beginner to see Gareth's pictures, does anyone have these saved? I have all the parts but need help assembling, any assistance would be gratefully received.
 
It would be really helpful to me a beginner to see Gareth's pictures, does anyone have these saved? I have all the parts but need help assembling, any assistance would be gratefully received.
I made this and have used it successfully. What do you need to know?
 
Hello, is there anybody here to repost electronic schematics and carpentry setup ?
It would be great and helpful
Regards from France ;)
 
Back
Top