Project tutorial

DIY $0 Water Trackpad © GPL3+

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

  • 2,491 views
  • 4 comments
  • 15 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
Tens70
9V battery (generic)
×1
aluminum foil
kitchen aluminum foil
×1
plastic container
rectangle-base or square-base container
×1
bare copper wire
non-insulated copper wire
×1

Apps and online services

About this project

Description

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 aluminum 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.

External Links -

Details

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

  • COST = $0 (excluding Arduino Uno)
  • BUILD TIME = 5 minutes
  • PRECISION = 10 microns (1/100000th of a meter)
  • DIFFICULTY = none
DIY Water Touchpad prototype

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 -

  • The microcontroller C++ code constantly keeps swapping over the polarity of voltage drop across the water, to cancel out the disturbance in its composition.
  • 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).

Build Instructions

Step 1: Flash Arduino Code to Arduino Uno

Download the Arduino IDE from https://www.arduino.cc/en/Main/Software. Download diy_water_touchpad.ino  from the Code section. Now Verify and Upload the C++ code to the Arduino Uno's microcontroller.

Step 2: Construct the Sensor

Cut 2 square pieces from the aluminum 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.

Step 3: Hook Up the Sensor Wires

Connect a wire from from one of those electrode plates to digital pin 2 of the Arduino Uno. Now this electrode plate becomes ELECTRODE_0. Connect another wire from from the other of those electrode plates to digital pin 3 of the Arduino Uno. Now this electrode plate becomes ELECTRODE_1.

Now, fix one wire to the inner side of the plastic cuboidal container box at some distance from ELECTRODE_0. Connect this wire to analog pin A1 of the Arduino Uno. Now, this pin becomes OFFSET_0. Now, fix another wire to the inner side of the plastic cuboidal container box at some distance from ELECTRODE_1. Connect this wire to analog pin A2 of the Arduino Uno. Now, this pin becomes OFFSET_1.

Step 4: Tie Bare Copper Wire

Tie bare (non-insulated) copper wire to your left wrist (or right wrist, if you are left-handed). The bare copper wire must be wrapped VERY tightly multiple times to make good contact with the skin. Connect the other end to analog pin A0 of the Arduino Uno.

Step 5: You're All Set!

Wipe the 2 aluminum electrodes and the interior of the plastic water container with a wet cloth to clean it of dust and impurities. Fill the water container with water from your home water purifier The water must be at room temperature. Salt or any other substances/impurities must NOT be added to it. Disconnect your laptop charger (this sensor won't work with a desktop PC), to eliminate noise due to AC-mains hum. At last, power the Arduino Uno with a 9V heavy-duty battery and connect it to your laptop via a USB cable.

FORMAT of serial output from Arduino Uno -

$34675;\n

RANGE of serial output is 0 to 50000.

When stylus is outside water, only then serial output is 51000.

BAUDRATE : 2000000 bits per sec

The x-coordinate of the fingertip can be used for any fun application like controlling the laptop screen brightness, controlling the laptop's speaker volume, among others. In the Youtube video, I've used a software called SerialPortPlotter.exe to plot a graph of the fingertip's x-coordinate versus time. You can download SerialPortPlotter.exe from here - https://os.mbed.com/media/uploads/borislav/serialportplotter.zip, or you can visit SerialPortPlotter's main page here - https://os.mbed.com/users/borislav/notebook/serial-port-plotter/

In SerialPortPlotter.exe, make the following modifications -

  • BAUD = 2000000 bits per second
  • DATA = 8 bits
  • PARITY = 0 bits
  • STOP = 1 bit
  • POINTS = 1000
  • Y STEP = 1500
  • MIN = 0
  • MAX = 51000

Code

diy_water_touchpad.inoArduino
No preview (download only).

Schematics

DIY Water Touchpad circuit schematic - 1
Flowchart m5cz9kskay
DIY Water Touchpad circuit schematic - 2
Diy water touchpad circuit 53ta8brqj3
Arduino Uno pinout
Diy water touchpad schematic gotrza5cji
Arduino Uno pinout
3d_sensor_schematic_2w1q0GMWLx.fzz

Comments

Similar projects you might like

Arduino Uno-Based, Easy-to-Build Pet Feeder

Project tutorial by edr1924

  • 1,768 views
  • 2 comments
  • 17 respects

HOW PIR SENSOR WORK

Project tutorial by DIY Partners

  • 2,340 views
  • 6 comments
  • 21 respects

4-Stroke Digital Clock With Arduino

Project tutorial by LAGSILVA

  • 7,358 views
  • 8 comments
  • 30 respects

RGB Camera Backlight Control with Android Mobile

Project tutorial by DIY Partners

  • 116 views
  • 0 comments
  • 2 respects

"Living Art" Arduino-Controlled Desk Lamp

Project tutorial by Modustrial Maker

  • 1,424 views
  • 0 comments
  • 5 respects
Add projectSign up / Login