DIY $0 Water Touchpad

A sensor to compute the x-coordinate of right index fingertip on a water surface.

Similar projects worth following
The basic idea behind this sensor is the use of a cuboidal water container as a water potentiometer device. It is similar to a 3-pin slide pot used in electronic circuits, with the 2 aluminium electrodes equivalent to the 2 end pins of a slide pot, and the right index fingertip is equivalent to the middle pin (voltage output) of a slide potentiometer. The output voltage is read by Arduino Uno's ADC and the displacement is computed. This data is serially printed by Arduino Uno to my laptop and plotted by the software SerialPortPlotter.exe.

This is a fun Arduino project that everyone must try sometime in their life! Here's why -

  1. COST = $0 (excluding Arduino Uno)
  2. BUILD TIME = 5 minutes
  3. PRECISION = 10 microns (1/100000th of a meter)

  Explanation of Tracking Algorithm

Since water is an electrolyte, its composition, hence, conductivity does not remain uniform on passing current through it. Thus, to retain uniform composition, electrolysis must be minimized. In order to minimize electrolysis, the following adaptations have been made -

  1. The microcontroller C++ code constantly keeps swapping over the polarity of voltage drop across the water, to cancel out the disturbance in its composition.
  2. The microcontroller C++ code has been optimized for minimum cycle time period, to maximize the frequency of swapping of the voltage drop polarity.

Owing to the above adaptations, the water always has uniform composition and hence, uniform conductivity at all points inside water. Thus, the voltage drops linearly with respect to the displacement from one electrode.

A parallel pair of aluminum sheet electrodes are attached to the water container at two opposite faces. These two apply a voltage drop of 5 volt across the water. A bare copper wire, connected to Arduino Uno's ADC input, is tied to the left wrist. This pin tracks the voltage at the right index fingertip, i.e., output voltage of the water potentiometer, when dipped into the water.

Due to electroplating on the aluminum electrodes, some voltage drop is consumed at the 2 electrodes, so this offset in voltage at the ends of the potentiometer needs to be corrected, or else voltage would not be linear, i.e., directly proportional to the horizontal displacement. Thus, 2 offset pins are attached to the water container and connected to Arduino Uno's ADC input. In other words, the voltage drops linearly between the 2 offset pins (and NOT between the 2 electrodes, due to electroplating on the 2 electrodes).


2nd revision of Arduino C++ code for Arduino Uno's Atmega328 microcontroller. Download the Arduino IDE from here -

x-arduino - 2.91 kB - 01/14/2018 at 05:02


  • 1 × Arduino Uno Rev3 Buy one from the Arduino store here -
  • 1 × 9V heavy-duty battery 9V battery to power the Arduino Uno
  • 1 × aluminum foil kitchen aluminum foil
  • 1 × plastic container rectangle-base or square-base container
  • 5 × wires 2 for electrodes, 2 for offset , 1 for left wrist

  • 1
    Gather All Components
    1. Arduino Uno R3
    2. 9V heavy-duty battery
    3. aluminum foil ( kitchen aluminum foil )
    4. plastic water container ( The water container must be a parallelopiped , open at the top, base angles equal to 90 degrees and it dimensions 20cm x 10cm x 8cm )
    5. 5 wires (2 for electrodes, 2 for offset , 1 for left wrist)
  • 2
    Flash C++ Code to Arduino Uno

    Download the Arduino IDE from Download diy_water_touchpad.ino  from the Files section. Now Verify and Upload the C++ code to the Arduino Uno's microcontroller.

  • 3
    Construct the Sensor

    Cut 2 square pieces from the aluminium foil having breadth of the plastic cuboid container box and height a little greater than that of the container. Stick each square lamina on a plastic base of exactly equal dimensions as the lamina. Fix these 2 plates to the plastic cuboidal container box at an angle of 90 degrees or PI/2 radians to the horizontal base.

View all 6 instructions

Enjoy this project?



Sumit Aich wrote 01/14/2018 at 05:24 point

If you face any issues while reconstructing this DIY Water Touchpad sensor, feel free to ask here.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates