Experiment #4: Comparison of different sensor coverings

The finished project will have a covering over the touch sensors used for the tongue drum tongues (keys). Having established the best of two different tin foil types in the previous experiment it is now necessary to investigate the effect on sensor readings of covering the sensor in different materials.


Initially, six test sensors were created. All were identical beneath the covering. Each was constructed using Tesco Strong Kitchen Foil as described in experiment #3:

Photo of 6 tin foil sensors before covering.

After completing some initial tests, two further sensors were added with different coverings. The tests were all re-run.

The following coverings were used:

  1. 1.5mm thick corrugated cardboard (from Amazon delivery boxes).
  2. 0.5mm thick plain card (from a cereal packet).
  3. 0.5mm thick white plastic card (used in modelling).
  4. Extremely thin clear plastic sheet (from a window envelope).
  5. 3 coats of grey car primer paint.
  6. 2 coats of artists acrylic paint over 2 coats of grey car primer.
  7. 46mm wide brown adhesive parcel tape.
  8. 47mm wide thick white adhesive tape.

The materials used to cover sensors 1 to 4 were glued in place with UHU glue. The primer paint used with sensors 5 and 6 was applied directly to the foil. The self-adhesive tapes used for sensors 7 and 8 were also applied directly to the foil. A marker pen was used to draw target circle on each sensor to indicate where they should be pressed. The ink would not adhere to sensor 8 so a ring was impressed using a ball pint pen instead.

The uncovered Strong Foil sensor from experiment #3 was used a control sensor. All the sensors, including the control, are pictured below:

Photo of 6 tin foil sensors after covering plus the bare control sensor.

The resistance each of the underlying foil sensors was calculated as before, using an attached DuPont cable. The results were all very similar:

Sensor Resistance
#1 1.0Ω
#2 0.9Ω
#3 0.7Ω
#4 1.0Ω
#5 0.8Ω
#6 0.9Ω
#7 0.7Ω
#8 0.9Ω
Control 1.9Ω


An Arduino Uno was once again used to test capacitance. 36 sets of tests were run in total: each of the nine sensors was tested at rates of 25, 50, 75 and 100 samples per reading.

In each test 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 the Uno's serial port and captured to text files using CoolTerm.

In order to make the tests as similar to each other as possible a circuit and an associated sketch were created that output beeps on a buzzer to guide the timing of the key presses.

The contents of the text files were copied and pasted into a spreadsheet and 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 circuit used is as shown in the following circuit diagram:

Generic circuit schematic

Once again a 1kΩ resistor was placed between the sensor and the Uno's pin 3 to reduce the likelihood of static damage when the bare foil “control” sensor is used. The buzzer attached to PWM pin D11 and to ground is used to guide the finger taps. The components were laid out similarly to the following schematic diagram, except that a passive buzzer was used that was mounted directly on the breadboard.

Generic circuit layout diagram, created using TinkerCAD

The following photo shows the circuit in use with painted sensor #6:

Photo of actual circuit with one of the sensors attached


The code used is an Adruino IDE project named GuidedSensorTouchDataLogger. This code takes repeated sensor readings using the CapacitiveSensor library and reports the results over the Uno's serial port while indicating when the user should touch the sensor by means of tones emitted though a speaker or buzzer.


The data from the text files generated during the tests were imported into an open document format spreadsheet using Libre Office Calc.

The results were analysed in two ways:

  1. For each sample rate the individual sensors were compared against each other.
  2. For each sensor the results of running it with different numbers of samples per reading were compared against each other.

In each case the following statistics were determined:

  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.

The results were also graphed.

For full details, download the spreadsheet (zipped).

Comparison of sensors to each other

The following image carousel shows four graphs, one graph for each sample rate, showing 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 for each sensor. The y-axis is the sensor reading while the different sensors are represented on the x-axis:

Comparison of samples per reading for each sensor

The following image carousel shows nine graphs, one for each sensor, showing the readings at different sample rates:


The first thing to notice when comparing the performance of the sensors is that the relative ordering from worst performing to best performing changes very little when varying the number of samples per reading.

It is also worth noting that, in most cases, the upper average of every sensor is closer to the maximum sensor reading than the average reading. Also the lower average reading for every sensor is approximately constant at a given sample rate, and closer to zero than the average reading, implying that the sensor covering has no effect on the sensor's off state. This clustering of values towards zero and the maximum reading is what was hoped for in order to make it easy to define an arbitrary point at which a sensor is judged to be on. A sensible cut-off point between on and off states may be found close to the average reading.

Perhaps unsurprisingly, the worst performing sensors are those with card and plastic sheet coverings. The worst is sensor #1 with its relatively thick card covering, while the thin card sensor #2 and equivalent thickness of plastic card that covers sensor #3 perform about the same. These are closely followed by the slightly better performing sensor #8 with its thick white tape covering.

It may seem surprising that the next “worst” performing sensor is #4 with its extremely thin plastic covering. However this may be due to the fact that the material is glued down with UHU rather than the thin glue layer used by the self adhesive tapes.

Less surprising again are the top three performers, which from worst to best, are sensor #7, with its thin parcel tape covering; sensor #6, with two thin and two thicker coats of paint; and sensor #5 with its three thin coats of primer.

The best performing covered sensor performs between 65% and 75% as well as the uncovered control sensor.

These results would seem to rule out all but painted sensors #5 & #6 and parcel tape covered sensor #7. However it is possible that the painted sensors would not stand up well to wear and tear and may be difficult to make look acceptable. Furthermore it may be that a thin plastic tape covered sensor may also have durability issues, so sensor #3 with its thicker plastic covering may have to be considered despite its poor performance.

In general, the difference in performance of sensors at various samples per reading seems to vary roughly in proportion to the change in sample rate. The only noticable exception is that the proportions break down for some sensors when they are tapped quickly.

It would seem that the greatest accuracy in detecting the difference between a sensor being touched and not touched comes with higher sample rates. It remains to be investigated whether the highest tested rate of 100 samples per reading is feasible when numerous sensors are to be processed at the same time. Further experiments are needed.

Taking the above into account it is proposed to continue further testing using only sensors #3 (plastic card), #6 (primer + top coat) and #7 (parcel tape) and to use the highest feasible number of samples per reading.

Back to main project page