Lab 6 — Capacitive Sensing

4 min readOct 12, 2021

Joanne Ma. Professor Kimiko Ryokai. INFO C262, Fall 2021


This week’s lab was about using capacitive sensors to measure touch proximity. How this works is that the longer it takes for a capacitor to charge, closer someone is to the sensor. I was excited to test out different items to be a capacitor, and had lots of ideas for potential interactions 🦑. I had fun reading the paper that was linked in our lab about different types of capacitive sensors — I definitely feel like I missed out on a bunch of hardware experience during undergrad so this class has been fulfilling those curiosities in a fun and creative way.


First, we had to visit some Arduino documentation to install the CapacitiveSensor library. I had a lot of trouble with this, so shout out to Billy Kwok for all the trouble we went through together to set up the library manually. We discovered how many links were broken (in the official documentation!!) and how Firefox saves html instead of the actual code when you save something from Github. After that whole debacle, I constructed the capacitive sensor according to the circuit schema and uploaded the code to the Arduino.

capacitive sensor circuit

I tested out the sensor and to my relief, the serial monitor showed that data was being read in.


Step 1: Testing out different materials for capacitive sensors

Because I couldn’t bear to waste perfectly good fruits and vegetables in my yard, I decided to sacrifice a part of our very healthy jade plant to be our alternative capacitive sensor. I made sure to pick a piece of the succulent that seemed nice and juicy.

suc-sor, aka really bad pun for succulent sensor

To my surprise, it actually struggled a little bit to read in changes versus the aluminum foil. It was a little too easy to shove the wire down the spine of the jade leaf, but it was easier to use than the aluminum foil since it stayed put.

I then tried using a spice jar from the best spice company, Diaspora Co, and true to form, did not sacrifice any of my chili to make this work. My spice jar capacitor seemed to only work when I was farther away (it was reading 2458 vs 2418), despite being metal. This is when I realized the jade leaf must have only been picking up on noise, which made me sad and also made me want to try out more household objects.

Guntur Sannam Chili jar capacitive sensor

Additionally, I noticed that when I walked away to use the restroom, the serial monitor changed dramatically, so I might have been the problem (aka thing that’s being read) all along.

I’m assuming that my monitor must be introducing a ton of noise, as well as the other objects around my desk. I also noticed that the readings were more varied and diverse when I went to the kitchen to find different items, so I think the readings I have when I’m right next to it is likely noise.

Not wanting to rest until I figured out what the h*ck was happening with my other capacitors, I decided to break my own rule and use a tomato from the garden. The tomato was hand picked from the ground that it had be released unto, still perfectly edible, but maybe less sinful that turning a tomato on the vine into a capacitor. I plugged the tomato in and constructed this circuit.

Garden tomato, meet capacitor tomato.

Step 2: Interesting interaction with everyday object

(writeup coming tonight 10pm pst)




Grad student @ UC Berkeley’s School of Information. Interests include social computing, usable security, Being Online™️ and reflective tech.