water as touch surface

Thread Starter

Sumit Aich

Joined Dec 3, 2016
100
i cooked up an idea for my new project
construction - a cubical bowl of tap water , 2 sheet electrodes for 1 pair (y-axis pair)of opposite face(square wave 10Hz 10v vpp), 2 sheet electrodes for the other pair (x-axis pair)(similar square wave lags by half cycle )
left hand touches adc pin. right hand touches water surface.10v drops linearly with normal distance from pulse electrode
process adc input for realtime x-y coordinates of touch (maybe z also if added 3rd pair electrodes at surface and floor)
so water surface can be used as touch pad .
will this work?
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,337
You are going to need a lot of filtering to separate your wanted signal from all the interference.
Why did you opt for a 10Hz signal?
Does your bowl/electrode system have a reliable ground connection?
What is the approximate resistance between opposite electrodes? (Your ADC may well require a low source impedance).
 

DickCappels

Joined Aug 21, 2008
10,187
That is how the Koalapad touch input device sold for Atari games in the 1980's worked, except it involved plastic sheets with conductive coatings rather than bowls of water. Per Alec_t, you will be in for an interesting filtering experiment.
 

Alec_t

Joined Sep 17, 2013
14,337
The input impedance is not the same thing as the source impedance required for the ADC.
Google "arduino adc impedance" and you'll see that the ADC really wants ~10k as the source impedance. So the water impedance is ~ ten times too high for reliable ADC measurements. A buffer amplifier seems necessary.
 

djsfantasi

Joined Apr 11, 2010
9,163
@ErnieM , was that a real or rhetorical question? An Arduino will only accept up to its supply voltage on an input pin. If the voltage is greater, you need to reduce it, such as with a voltage divider.
 

Thread Starter

Sumit Aich

Joined Dec 3, 2016
100
@ErnieM , was that a real or rhetorical question? An Arduino will only accept up to its supply voltage on an input pin. If the voltage is greater, you need to reduce it, such as with a voltage divider.
Can the Arduino accept 10v at the analog input?
since resistance of water bet opposite electrodes is 100k
voltage divider must have resistors in order of 10 Mohm for 1% error
 

ErnieM

Joined Apr 24, 2011
8,377
@ErnieM , was that a real or rhetorical question? An Arduino will only accept up to its supply voltage on an input pin. If the voltage is greater, you need to reduce it, such as with a voltage divider.
It was a real question asked in the spirit of getting the TS to perform his due diligence in reading the specs of the intended device.

since resistance of water bet opposite electrodes is 100k
voltage divider must have resistors in order of 10 Mohm for 1% error
If instead you use a 5 v source you need not use a divider, but you are still left with the impeadance issue raised by Alec up above.
 

Thread Starter

Sumit Aich

Joined Dec 3, 2016
100
The input impedance is not the same thing as the source impedance required for the ADC.
Google "arduino adc impedance" and you'll see that the ADC really wants ~10k as the source impedance. So the water impedance is ~ ten times too high for reliable ADC measurements. A buffer amplifier seems necessary.
shouldnt the source impedance be equal to skin impedance , not the water impedance as you said
 

Thread Starter

Sumit Aich

Joined Dec 3, 2016
100
Build it and see....
You are going to need a lot of filtering to separate your wanted signal from all the interference.
Why did you opt for a 10Hz signal?
Does your bowl/electrode system have a reliable ground connection?
What is the approximate resistance between opposite electrodes? (Your ADC may well require a low source impedance).
That is how the Koalapad touch input device sold for Atari games in the 1980's worked, except it involved plastic sheets with conductive coatings rather than bowls of water. Per Alec_t, you will be in for an interesting filtering experiment.
I did it , I built a water touchpad sensor to track the position of my right index fingertip on a water surface! . Here's the Youtube video link -
 

Thread Starter

Sumit Aich

Joined Dec 3, 2016
100
Here's the Arduino c++ code for the project DIY Water Touchpad
Code:
/* Project Title- DIY WATER TOUCHPAD
   Author- Sumit Aich
   Project Summary- The basic idea behind this sensor is the use of a parallelopiped 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.
   */

#define ELECTRODE_0  2  //left water electrode
#define ELECTRODE_1  3  //right water electrode
#define SENSOR_ADC   0  //right index fingertip (Vout of water potentiometer)
#define OFFSET_0     1  //left offset pin
#define OFFSET_1     2  //right offset pin
#define BAUDRATE 2000000

long offset_0,  //voltage at left offset pin
     offset_1,  //voltage at right offset pin
     read_0,    //fingertip voltage
     m, m1; //horizontal displacement of fingertip from OFFSET_0 pin (range from 0 to 50000)

void setup() {
  pinMode(ELECTRODE_0, OUTPUT);
  pinMode(ELECTRODE_1, OUTPUT);

  //set both water electrodes to +5V to pause electrolysis for a while
  digitalWrite(ELECTRODE_0, 1);
  digitalWrite(ELECTRODE_1, 1);
  Serial.begin(BAUDRATE);
  analogReference(DEFAULT);

}

void loop() {

  //Phase 1
  //swap polarity of voltage drop across water
  digitalWrite(ELECTRODE_0, 0);
  offset_0 = analogRead(OFFSET_0);
  offset_1 = analogRead(OFFSET_1);
  read_0 = analogRead(SENSOR_ADC);

  //check whether fingertip is inside or outside water
  digitalWrite(ELECTRODE_0, 1);
  if (analogRead(SENSOR_ADC) != 1023)
  {
    m = 51000;
  }
  else {
    m =  constrain((50000 * (read_0 - offset_0) / (offset_1 - offset_0)), 0, 50000);
  }
  Serial.print('$');//format requirement for SerialPortPlotter.exe
  Serial.print(m);//print horizontal displacement of fingertip from OFFSET_0 pin (range from 0 to 50000)
  Serial.println('\;');//format requirement for SerialPortPlotter.exe

  /*this delay is just a frequency restriction imposed by SerialPortPlotter.exe
    otherwise, it is not required if you are NOT using SerialPortPlotter.exe.
  */
  delay(10);

  //Phase 2
  //swap polarity of voltage drop across water
  digitalWrite(ELECTRODE_1, 0);
  offset_0 = analogRead(OFFSET_0);
  offset_1 = analogRead(OFFSET_1);
  read_0 = analogRead(SENSOR_ADC);

  //check whether fingertip is inside or outside water
  digitalWrite(ELECTRODE_1, 1);
  if (analogRead(SENSOR_ADC) != 1023)
  {
    m = 51000;
  }
  else {
    m1 = constrain((50000 * (offset_0 - read_0) / (offset_0 - offset_1)), 0, 50000);
  }
  Serial.print('$');//format requirement for SerialPortPlotter.exe
  Serial.print(m);//print horizontal displacement of fingertip from OFFSET_0 pin (range from 0 to 50000)
  Serial.println('\;');//format requirement for SerialPortPlotter.exe

  /*this delay is just a frequency restriction imposed by SerialPortPlotter.exe
    otherwise, it is not required if you are NOT using SerialPortPlotter.exe.
  */
  delay(10);

}
 
Top