Experiment #7: Comparison of grounded and un-grounded sensors

Some research had indicated that sensor readings may be more stable when the sensor has a grounding “plate” connected to the microcontroller ground. This experiment tests that hyphothesis by comparing the performance of two different versions of the vinyl covered sensor: one grounded and the other not.

The ungrounded sensor used in experiment #6 was reused in this experiment. A new sensor was created, similar to the ungrounded sensor, except that it has a second 6×4cm sheet of foil glued to its rear. This grounding foil is attached with UHU glue. It has a piece of adhesive copper tape stuck to it that, in turn, has a piece of single core wire soldered to it. This wire can be connected to a microcontroller ground pin via a DuPont cable. The foil was the same type as that used on the front of the sensor.

The following photos illustrate the front and rear of both sensors. The rear view was photographed before the backing material was applied:

Photo of grounded and ungrounded vinyl covered sensors, rear

Photo of grounded and ungrounded vinyl covered sensors, rear

The ungrounded sensor is labelled as sensor 9 and the grounded version is sensor 9G. The resistances between the bottom of the (front) foil to the end of DuPont cables connected to the (front) pins of each sensor are 0.8Ω and 0.9Ω respectively (including the multimeter’s native resistance).

Methodology

Both sensors were tested as in experiment #6, at both 25 and 50 samples per reading. The right hand index finger was tapped on the sensor in a pattern of three long taps followed by three short taps. The resulting sensor readings were written to an Arduino Uno’s serial port and captured to text files using CoolTerm.

Note that the uncovered control sensor used in experiment #6 was not used here.

Circuit

The circuit was based on that used in experiment #6, except that it has a connection to the Arduino's ground pin that is attached when the grounded sensor is in circuit, and detached when the ungrounded sensor is connected:

Generic circuit schematic

The following photos shows the circuit adapted for use with the ungrounded and grounded vinyl sensors, 9 and 9G respectively:

Photo of actual circuit with ungrounded sensor #9 attached

Photo of actual circuit with grounded sensor #9G attached

Note that the grey DuPont cable, connected to ground that is present in the second photo is not present in the first photo.

Code

Once again the Arduino sketch GuidedSensorTouchDataLogger is used. This code takes repeated sensor readings using the CapacitiveSensor library and reports the results over the Arduino’s serial port, while indicating when the user should touch the sensor by means of tones emitted though a speaker or buzzer.

Results

The contents of the text files containing results for both sensors were analysed in a Libre Office Calc spreadsheet. Results were tabulated in two different ways. Firstly, the sensor readings at each sample rate were collected together, analysed and graphed. Secondly, the results for each sensor were grouped by sample rate and again analysed and graphed.

The following statistics were calculated, again as per experiment #6:

  1. The maximum reading
  2. The average of all readings
  3. The lower average, i.e. the average of the lower readings, where “lower” is taken to be values between 0 and the average of all readings, inclusive.
  4. The upper average, i.e. the average of the higher readings, where “upper” is taken to be values greater than the average of all readings.

To see all the data and the analysis, download the spreadsheet (zipped).

Comparison of sensors to each other

The following image carousel shows two graphs, one for each sample rate, that show the relative performance of each sensor. The y-axis shows the sensor reading as raw data while the x-axis is time:

The next image carousel also contains an image for each sample rate, but this time plots the maximum, average, lower average and upper average readings for each sensor. The y-axis is the sensor reading while the different sensors are represented on the x-axis:

The following table shows the ratio size of maximum, average, lower average and upper average readings for the grounded sensor in relation to the ungrounded sensor, at the two different sample rates.

Ratio of statistics for grounded sensor against ungrounded sensor expressed as a percentage
Value 25 samples / reading 50 samples / reading
Max reading 79% 85%
Avg of all readings 90% 85%
Avg of readings > Avg reading 84% 88%
Avg of readings <= Avg reading 184% 97%

In the above table the readings on which the “Avg of readings <= Avg reading” entries are based are so small as to make the averages quite meaningless. (The raw data in this case ranges from 24 to 44 at 25 samples per reading and 36 to 37 at 50 samples per reading). Other ratios in the tables are based on a large enough range of values for the comparison to have some meaning.

Comparison of samples per reading for each sensor

The following image carousel shows two graphs, one graph for each sensor, comparing the readings at different sample rates:

Conclusions

The first thing to notice is that the highest readings for the grounded sensor are between 80% and 90% of the equivalent readings for the ungrounded sensor. Secondly, the graphs make it clear that the lowest readings for the grounded sensor do not get as close to zero as the lowest readings for the ungrounded sensor. However, there is still sufficient difference between the higher and lower average readings for the grounded sensor to make it easy to distinguish whether the sensor is, or is not, being touched.

It is clear from the graphs that the readings for the grounded sensor are, in general, smoother than those for the ungrounded sensor.

Because of the smoother readings exhibited by grounded sensors, and the fact there is still a significant difference between upper and lower average readings, it is recommended that sensors used in the instrument should be grounded.

Back to main project page