What's on my mind!

Schematics

This page contains the schematics of the DIY waterdrop device. It’s a collection of information I found on the internet and used to build my waterdrop device. Credits go to the people who designed it. Sometimes it’s hard to get specific component types. Usually it is okay to use a similar type.

You can download the source code from the application page.

Table of contents:

Arduino Uno
Valve Control
Flash and Shutter Control
Voltage Regulator 5 and 9 volts
LCD display
Keypad using 1 analog input pin
Sound Detection

Arduino Uno

You can find all information necessary on www.arduino.cc. I suggest to just buy it pre-build from some local reseller. If you want to build it yourself, you can find the schematics on this site too. The Uno has just sufficient memory and ports. You have to program this one efficient in case you want to store settings in memory etc. Buying the Mega gives you more memory and ports.
(I have connected a 20×4 LCD, Keypad and the Flash-, Shutter-, Sound- and Valve Triggers and still have ports available on the Uno)

Valve Control

The Shako valve uses 24 volts DC. I would prefer to use 12 volts because it doesn’t heat the voltage regulators that much, but 24 volts will do the job. The Arduino cannot provide the power to activate the valve, therefore you need this electronic circuit:  (check the connection pins of the TIP121 or compatible carefully. I don’t know if the pin numbers are correct in this drawing)

 

Flash and Shutter Control

Use 3 optocouplers of type 4N25 or equal to trigger the flash and shutter. The benefits of an optocoupler is an optical isolation between the flash- and cameracircuits from the electronic part of the microcontroller. The schematic created for 1 flash and 1 camera. The shutter requires two optocouplers (1 for autofocus and 1 for shutter. Even when you don’t use autofocus. You have to imitate the functionality of the shutter button of your camera which is half way press = autofocus and full press is shutter.) The other optocoupler is to trigger your external flash. In case you need more flashes, just extend the schematic. Remember keep the electronic circuits of the microcontroller and camera and flash seperated from each other (so do not connect the GND between Microcontroller and/or Camera and/or flash.

Each optocoupler is connected to one digital pin on the arduino. Making the pin high will turn on a led inside the optocoupler which makes the optical transistor inside the optocoupler to switch. No other external power is necessary for the optocoupler to work. Build as many optocoupler circuits as devices (or switches) you need.  An optocoupler can handle a very limited amount of current so don’t switch heavy currents. Modern flashes use about 6 volts to be triggered. Older flashes may use up to 300 volts which might damage the optocoupler. I don’t know if there are optocouplers that can handle this voltage, but I think they exist.

 

Voltage Regulator 5 and 9 volts

The Arduino can handle voltages between 5 and 12 volts but only works stable between 7 and 12 volts (above 12 volts the onboard voltage regulator will overheat). The input voltage of my system is 24 volts because I need 24 volts for the valve. I created 3 voltages in my system:
- 24 volt DC;
- 9 volt DC for powering the Arduino Uno;
- 5 volt DC for powering external circuits like the sound trigger.

The 9 volt is chosen because it’s within the limits of the Arduino Uno specs and I wanted a high as possible voltage to make the difference with 24 volts as little as possible. (The bigger the difference, the hotter the regulator will be). I could choose 12 volts, but that is on the limit of the Arduino.
The Arduino has its own voltage regulator and will output 5 volts on the digital pins which is perfect for all the other components like the optocouplers and so on.

The 5 volt regulator is used to power external devices like a sound trigger. I didn’t want to load to much on the Arduino and this circuits costs a couple of euro’s.

The voltage regulator used are a 7805 for 5 volts and the 7809 for 9 volts. Make sure you get the 1A version or even the 2A version. Mount a heatsink on the 780x component.
The capacitor C3 is an electrolitic (ELCO), the others are regular (ask your supplier, they can advise you).

 

LCD displayJust buy a nice LCD display on ebay based on the HD44780 driver IC.  Use one of the size you like 16×2 or 20×4.
connect pins RS, Enable, D4, D5, D6 and D7 to the Arduino. Connect pin R/W to ground so you can write info to the display.
Use Google to find one of the many explanations on how to connect the LCD Display.

This is a PDF manual of the LCD I used. All LCD’s look like the same approach so it might be valid for yours too.

Keypad using 1 analog input pin

A matrix keypad can also be bought on ebay for a couple of dollars. Normally you need several digital input pins to read the matrix. By using a voltage divider you only need 1 analog input. This works great even on a 16 button keypad. In software, read the value of the analog port while pushing a key. Then you know the approximate value that that specific keypress will provide.  The pins on the keypad are probably 4 rows + 4 columns (or 4 col + 4 rows). Just use your multimeter to see which pins are connected when pushing a button. I used the 5 volts of the Arduino board to ‘power’ this matrix.

More info on Arduino Forum and on this site.

Sound detection

I also build a sound detection interface to trigger the flash when a noise occurs. I used the circuit found in this PDF which I did not designed myself. It does work but I think there are better solutions which are more accurate. Search for it !

41 Comments

  1. Tony Poole's Gravatar Tony Poole
    February 6, 2012    

    Hi
    I have just started to set up a water drop rig. I am using an Adruino Uno. I would be very interested in your offer as I don’t have much foor to use the laptop to control everything.
    Regards
    Tony

    • Alexander's Gravatar Alexander
      February 6, 2012    

      Hi Tony,
      I’ve send the sourcecodes by email.
      Good luck,
      Alex

  2. kbottema's Gravatar kbottema
    February 25, 2012    

    I have started to build the same set-up as you have and already got the hardware required. Now i just wonder where you got the software from or did you write it yourself?

  3. Norad's Gravatar Norad
    April 18, 2012    

    Hello
    I am currently building an assembly identical
    would it be possible to have your code to test
    cordially

  4. October 27, 2012    

    Hi there, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam comments?
    If so how do you reduce it, any plugin or anything you can suggest?
    I get so much lately it’s driving me crazy so any help is very much appreciated.

    • Alexander's Gravatar Alexander
      October 28, 2012    

      Hi,
      I just use Akismet and Conditional Captcha plugin. Within Conditional Captcha I configured ReCaptcha. Seems to be sufficient for my site.
      ReCaptcha
      Alex

  5. Victor's Gravatar Victor
    October 29, 2012    

    I have been torturing my brain for a while now how to setup a project like this and would really appreciate receiving your source code.

    • Alexander's Gravatar Alexander
      October 29, 2012    

      Source code is in your email ;-)
      Enjoy building

  6. Tony Buz's Gravatar Tony Buz
    November 16, 2012    

    Thank you for sharing your building plans and schematics…….could I too bother you for your source code? It would be greatly appreciated.
    Thank you,
    Tony

    • Alexander's Gravatar Alexander
      November 16, 2012    

      Hi, Source is in your mail.

  7. Tony Poole's Gravatar Tony Poole
    January 11, 2013    

    Hi
    I’m sorry to ask again but I have lost the source codes you sent me. I have had to rebuild my computer because of a hdd failure. Sadly your code was on that drive.
    Kind regards

    Tony Poole

    • Alexander's Gravatar Alexander
      January 11, 2013    

      Hi Tony,
      link should be in your mail now.

  8. February 11, 2013    

    Is it possible to see your source code so I can try and base my own off it?

    Appreciate the work your doing!

    • Alexander's Gravatar Alexander
      February 11, 2013    

      Source is in your mailbox ;-)

      alex

  9. David's Gravatar David
    March 5, 2013    

    Great page and very informative. I had set up something similar but used interrupt routines on the arduino to capture the camera shutter being triggered via a hot shoe contact. So I’d use a wireless trigger for the camera on a 1 sec shutter, this would be detected by the arduino and trigger the water drops and flash at the appropriate times.

  10. Daniel's Gravatar Daniel
    August 13, 2013    

    Could you tell me exactly what kind of resistance did you use?
    Many thans!
    Daniel

  11. Daniel's Gravatar Daniel
    August 13, 2013    

    Sorry, I forget to valve control.
    :)

    • August 14, 2013    

      Hi Daniel,
      The resistance values are displayed in the schematic. R1 = 1 kOhm. Just a regular 0.25 watts resister should do.
      The other two resistors are part of the TIP121 component.

      This answers your question?

      Best regards,
      Alexander

      • Daniel's Gravatar Daniel
        August 20, 2013    

        Hi Alexander!

        Yes, it was.and Thanks for your answer.

        Daniel

  12. October 11, 2013    

    Thanks for all the time and effort in writing this.. Appreciate it and enjoyed reading it… In process of building would love to see the source as well

    regards
    Steve

    • October 11, 2013    

      Hi Steve, check the application page (I’ve also added a link on the schematics page to the application page now). You can download the source code from there.
      Enjoy Building

  13. andrea's Gravatar andrea
    October 11, 2013    

    Hi, very interesting description!! I would like to start off with a project similar to this, is it possible to have a look at your code so I can try and base my own on it?

    Appreciate the work your doing!

    andrea

    • andrea's Gravatar andrea
      October 11, 2013    

      sorry, I think I found it!!! :)

  14. Robert's Gravatar Robert
    December 16, 2013    

    Hello Alexander,
    I decided to do according to your design controller drop of water. Unfortunately, I encountered a problem with the keyboard. It does not work the whole row *, 0, #, D. If you did not cause trouble to those parts you please help me? Thank you in advance for your response. Robert

    • December 16, 2013    

      Hi Robert,
      The keyboard using one analog pin is based upon the voltage divider principle. First, check if you keyboard is not broken by checking the row using a multimeter. Next, connect the keyboard as described and measure the voltage at the connection to the analog output. It might be that the chosen resistor values are not the best for your situation. You should at least get some voltage when pushing one of the buttons on the row *,0,#,D.

      let me know if you get it to work.

      best regards,
      Alex

  15. Robert's Gravatar Robert
    December 16, 2013    

    Thank you very much for your response. Keyboard tested, it is efficient. Tomorrow is measure the voltage on the analog input. If it is not a problem for you, then tomorrow I’ll know.
    Best regards,
    Robert

  16. Robert's Gravatar Robert
    December 17, 2013    

    Hello Alexander,
    I measured the voltage on the analog input when you press the keys.
    row 1 (1) 0.24V (2) 0.43 V (3) 0.63V (A) 0.79V
    row 2 (4) 0.94V (5) 1.52V (6) 2.00V (B) 2.31V
    row 3 (7) 2.57V (8) 3.35V (9) 3.79V (C) 4.00V
    row 4 (*) 4.06V (0) 4.46V (#) 4.65V (D) 4.71V
    Unfortunately, the government * 0 # D does not work.
    Please help. Unfortunately, the same can not handle it.
    Best regards,
    Robert

    • December 17, 2013    

      Hi,
      Okay, your keyboard and voltage dividers work. Now create a simple program that only reads the value of the analog pin. You want to see the analog value (0-1024) that is received on the analog pin. You should see different values for each key press. If you see the same value for *,0,#,D then the analog input cannot handle the resolution (which it should). You have to adjust my/your source code to the values you see at each button press.

      You can also try to change resistor 180 ohms on pin D. Just for the sake of testing, make it 300 ohm or so. Then the voltages will be lower at a key press on Row 4 (please check with multimeter). If the lower voltages are measured by the analog pin, then the resolution of the analog pin is the issue.

      Let me know if you can read different values for each key press at the analog pin and if you have modified the code accordingly.

  17. Robert's Gravatar Robert
    December 17, 2013    

    Hi Alexander,
    Thank you very much. Your help is invaluable. I read the value of an analog port for each key. Adjusted the your source code to my needs, and now the keyboard works very well. You made me great joy. Thank you once again.
    Best regards,
    Robert

    • December 17, 2013    

      Good to hear. Enjoy building!

      best regards,
      Alexander

  18. Robert's Gravatar Robert
    December 18, 2013    

    Hello Alexander,
    The entire electronic system have already assembled. And again, unfortunately, is a problem. Why the Arduino pins 8,9,10,11 goes out no signal. Or do you I type a bad parameters in the program, or you may need to configure it?
    Best regards, Robert

    • December 18, 2013    

      Hi,
      The source code contains:

      //Definition of the pins.
      const int ValvePin = 11; // the number of the Valve pin
      const int FlashPin = 10; // the number of the Flash Trigger pin
      const int ShutterPin = 9; // the number of the camera shutter pin
      const int AutoFocusPin = 8; // the number of the Autofocus pin

      //set digital pins to output
      pinMode(ValvePin, OUTPUT);
      pinMode(FlashPin, OUTPUT);
      pinMode(ShutterPin, OUTPUT);
      pinMode(AutoFocusPin, OUTPUT);

      So the digital pins 8, 9, 10 and 11 are set as output.
      How did you test to see if there is output? Please first disconnect any hardware connected to the output pins (except the LCD and Keypad). The pins are active for very short periods. ShutterPin is only 50 mSeconds active or so. A multimeter might miss a signal of this length.
      The best chance to measure anything is to measure ValvePin and set Dropsize for 500 or even 1000 milliseconds. Then during a run of the program you should see 5 volts for 500 or 1000 milliseconds.

      When you run the program, does the LCD tell you it is running and taking shots? I have not used the waterdrop device for about 2 years so I don’t remember exactly how it works. I do know that it should tell you when the parameters entered are not valid. A quick look at the source suggest using menu 0. The menu will ask you for some parameters. Try those:
      Photocounter – Doesn’t matter, it’s just the number of your latest photo in your camera.
      Dropsize – try 500 or 1000 (when the program accepts, try even 2000 or 4000).
      Number of Drops – The number of drops you want. Try 4 (so it will open 4 times in one run)
      Time between drops – try 10 mSeconds so 10 milliseconds between each drop. So you should be able to see effect on the multimeter on valve pin
      Second drop size – again 500/1000/2000 or more
      shot delay – I believe this is between pressing shutter and trigger of flash. So make it more than the total run time (drop size x number of drops)- Otherwise you’ll probably get an error telling you that values are to short.
      number of cycles – enter 5 (so it will perform 5 photo cycles after each other)

      At least you should see something now on the valve pin now (11).

      I ask you to disconnect all electronics like the optocouples because they might make a shortcut when they are not build correctly and you can’t measure anything on the pins.

      Don’t take it to hard, but this source works so it is probably a wrong parameter or mistake in the other electronics.
      Good luck again ;-)
      Alex.

  19. Robert's Gravatar Robert
    December 18, 2013    

    Hi Alexander,
    You very sorry for the confusion, you were right I made a small mistake in the electronic system. I think too much time spent on the construction of the device and could not find fault. Tomorrow I’ll have a solenoid valve and try to make sure everything is OK. I’m sorry once again and thank you very much I appreciate your help.
    Best regards, Robert

    • December 18, 2013    

      No problem. Let me know your results !

  20. Robert's Gravatar Robert
    December 22, 2013    

    Hello Alexander,
    It’s one of my first attempts. http://app.box.com/s/1bz9yeiqai37wwor8q7y
    Thank you very much.
    Merry Christmas.

    • December 25, 2013    

      Looks good for a first attempt ;-)
      I’ve also used Glycerin in the water bucket and using a straw you can slowly blow a bubble which will hold even when a waterdrop falls down thru it. So yo get an waterdrop explosion inside a bubble. I think I used only Glycerin, but maybe mix it with water too.
      Enjoy!!

      Merry Christmas to you too!
      Alex.

  21. Robert's Gravatar Robert
    December 30, 2013    

    Hello Alexander,
    Whether change on the possibility of the introduction of the third volume drops and the time between a drop of 2 and 3 is associated with significant changes to in the source code?
    Happy New Year 2014.

    • December 30, 2013    

      Hi Robert,
      The change would be to duplicate the code used for the time between drop 1 and 2 and make it the time between drop 2 and 3. It means modifications to the menu, valve trigger and EEPROM contents (all the text in the menu). It should be possible but I don’t have the time to build it.

      Happy new year to you too!

  22. Ulas's Gravatar Ulas
    August 26, 2014    

    Thank you for share this. I want to build this but I wonder could I use that with 2 valve.
    Best regarda

    • August 26, 2014    

      If the TIP121 can handle the amount of current of 2 valves, you could just put two valves in parallel. They will activate both at the same time. You could create twice the circuit and hook them to the same Arduino pin. I think the Arduino can handle this.

      If you want to control two valves independent from each other you have to modify the application to control the second valve.

  1. Alexander's Blog » Waterdrop Device Ready on December 19, 2010 at 22:04

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>