Log-in | Site Admin

Centroid by BeckyS

CREDITS: Becky Stewart
DIMENSIONS: 100 x 100 x 2mm


Woven Touch Sensor

In order to apply gesture recognition to a grid of capacitive sensors, the signals need to be translated from one number for each individual sensor to a single X,Y pair of numbers representing the location of the touch. These steps are broken down in the below image. This swatch calculates the centroid, the mathematical center of the touched area on the sensor grid. The centroid is entirely calculated on the Arduino using the library at https://github.com/theleadingzero/centroid. The library includes examples sketches for visualising the touch with Processing.


Centroid system diagram

The MPR121 capacitive sensing chip was chosen as it has 12 channels of capacitive sensing and is commonly used in maker communities. There are multiple breakout boards for the chip along with Arduino shields and Arduino clones like the Bare Conductive Touch Board. It communicates via I2C and there are reliable libraries that make interacting with the chip relatively simple.


Previous Swatches

Matrix (2013)
Weaved Matrix (2015)
Pressure and Presence (2016)

Insulating conductive thread in a tubular knit yarn was inspired by work by Emilie Giles.


Dietz, P., & Leigh, D. (2001). DiamondTouch: a multi-user touch technology. Proceedings of the 14th Annual ACM Symposium on User Interface Software and Technology  – UIST ’01, 3(2), 219.

McPherson, A. (2012). TouchKeys: Capacitive Multi-Touch Sensing on a Physical Keyboard. Proceedings of the International Conference on New Interfaces for Musical Expression, 1–4.

Poupyrev, I., Gong, N.-W., Fukuhara, S., Karagozler, M. E., Schwesig, C., & Robinson, K. E. (2016). Project Jacquard. Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems – CHI ’16, 4216–4227.


Included in Swatch

  • Grid of conductive traces. Can be fabric or thread.
  • Single row of 12 male header pins.

Additional Required Hardware

  • MPR121 Breakout Board or Bare Conductive Touch Board
  • Arduino (if not using Touch Board)
  • Computer running Processing


Making the Sensor

The are many ways to make the sensor, though some result in stronger signals than others. It requires a grid of conductive traces – one line per capacitive sensing channel. None of the sensing traces can touch any other trace, so the perpendicular traces need to be insulated from each other.

Centroid sensor overview

  1. For this sensor, Karl Grimm thread was fed into the center of a tubular knit yarn in order to insulate it.
  2. A 6 x6 grid of the insulated conductive thread was then woven on a simple loom.
  3. A row of male header pins were soldered to the threads for easy connection to a breadboard or other female headers.
  4. Heatshrink around the solder connection to the header pins helps protect it.


Arduino and Processing Code

The code including the Arduino library and example Arduino and Processing sketches can be found in the github repository.

1 Comment so far

  1. […] centroid by Becky Stewart, capacitive […]

Leave a Reply