Water drops – Raspberry Pi


Some details:

2014-08-05 21.18.21   2014-08-05 21.19.31   waterdrops_fritzing 2014-08-08 15.34.20 bearbeitet  putty Raspberry_Pi_Pins



The python – flask – web server.

I told you that I will publish the program code to communicate with the Raspberry Pi via web interface. This is part one. I show you the requirements.

I decided me to use python and flask, because I know how can I control the Raspberry GPIO pins with python. And the web server is a python web server! We need no java or javascript, no php or other languages for our project.

We need python (already installed) and an additional package, named flask. Flask is a powerful framework for python. No worry, it’s easy to use.

To install flask, we need the python pip module. So, you must install two packages (as root, or using sudo):

      apt-get install python-pip
      pip install flask

The next step is creating the folder structure. For our project, we need a main folder. I name this folder waterdrops.
In this folder we need the following subfolder: static and templates.

    |-- waterdrops
           |-- static
           |-- templates

In the subfolder static we store images, which we use at the web page. The html pages are stored into the template subfolder.
The main program is stored in the main folder (waterdrops).

The files we use:
– index.html   (the main web page)
– layout.html  (the master web page )
– favicon.ico   (a small icon  like google, not necessary)
– wassertropfen.JPG (a picture for our web page)
– drops.py (the main python program)

    |-- waterdrops
           |   drops.py
           |-- static
           |       favicon.ico
           |       Wassertropfen.JPG
           |-- templates

So, that’s are all requirements we need.
In the next part I show you the complete program codes of the project.

I’m so sorry, but it’s not possible to upload pdf files or show the html code.
Feel free to contact me to get the code via mail.













Here is the update of the control panel.
The first experiences showed me, it’s better to set each droplet size separately.





This is my structure for photographing water drops.



6 thoughts on “Water drops – Raspberry Pi

    1. Sorry, I was first today in the afternoon online.
      No problem, I can deliver you all the informations.

      For the autofocus and the shutter I use normal BC548C NPN transistors. There are no high current.

      For the solenoid valve I use the BD139 NPN transistor and a 1N4001 diode. You can also use a BD135 or a BD137. They are similar. The solenoid valve is with 12V, not more. To generate a water drops, we need approximate 20ms. During this time, the transistor will not be hot. Nevertheless, I use a heatsink for the BD139. Better is better. As a series resistor I use only 470 Ohm.

  1. Hi joker5689,
    please, look at the other picture. For the shutter, you need a 2k2 resistor. For the Autofocus too.
    The solenoid valve needs two resistors – 1k and 2k2.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s