Building an Arduino based capacitive touch kitchen timer – Part 1

A dear friend of mine recently sent me a very interesting idea for a new project, and I decided to pick it up and got working at it as soon as I could. His idea was to build a digital kitchen timer that operates like the USB volume knob I built a while ago. I didn’t just want to recycle an old design, and the USB volume knob would be pretty unsanitary in a kitchen anyway. So we came up with a new idea that involves capacitive touch sensing and an Arduino, and this series of articles discusses each part of the project from the first idea, to the theoretical aspects, all the way to the hardware and software. I decided to write this series as the project goes along (similarly to the older word clock series), so things are subject to changes. However, I think this gives you a good opportunity to see just how much trial and error goes into such a project, and I hope I can help you avoid mistakes that I make by documenting them.

But before I go into any details, let’s take a look at the project idea itself.

The project idea

So, as mentioned, my friend would like to have a kitchen timer similar in size to my USB volume knob. Furthermore, he wanted it to work in a similar way too (i.e. turn the knob to increase or decrease the time and push it down to set or delete the time). I think that’s a great idea for a project, but the knob would be rather unsanitary when used in the kitchen because food, liquids, and dirt could easily get stuck between the knob and the case, and cleaning the device would be rather painful.

Therefore, I though I’d build something similar in size but fully enclosed and without moving parts. My plan is to replace the spinning knob part with four to five metal plates. The user can increase or decrease the timer value by sliding his or her finger over the metal plates. An MCU can detect when something conductive, such as a finger, touches one of the plates, and it could translate a sequence of these observations to a direction (counter clockwise or clockwise). An additional metal plate in the center serves as a single digital input button:

Figure 1: A conecpt drawing of the capacitive kitchen timer project and its components

As you can see in the image above, a display in the center of the device shows the remaining time. For now, I planned to use simple seven-segment displays, but it’s easy to upgrade to a better display technology later if necessary. I solely decided to go with the seven-segment displays because this is what I had at home and all the stores are currently closed, so I had to work with what I have.

Besides these design goals, I wantend to mention that I decided to only employ the ATMega328PU micro controller in this project, and I’ll omit the rest of the Arduino board. Anyway, part two of this series will discuss the electronics in great detail.

About capacitive sensing with an Arduino

When I started thinking about implementing a custom touch sensor for this project, my first reflex was to research possible evaluation boards that implement a capacitive touch sensor, and I quickly found a few possible candidates that offer the features I need. These boards, however, are typically rather large (compared to only employing the Arduino in the finished product), and my project needs to be similar in size to the USB volumen knob I built some time ago. Therefore, this idea quickly died, and I had to look into a more space-saving alternative.

Figure 2: The components of a simple home-made capacitive touch sensor. The right side represents the digital pins of an Arduino, the left side connects to any metal object that will serve as one plate of the resulting capacitor.

Capacitive touch sensors are, simply speaking, nothing more than a regular off-the-shelf capacitor where a metal object forms one side of the capacitor and the user’s finger, for example, forms the other plate. Figure two illustrates how two digital IO pins of the Arduino are connected to a metal plate. The Arduino acts as a simple oscillator and it periodically sends pulses to the metal plate from one of the two digital pins, and it measures how long it takes before that pulse reaches the other pin. When a user touches the plate (or comes close to it), the Arduino detects a change in how long it takes to receive the pulse on the other pin. The firmware of the device can translate that change to a proximity, and if that value reaches a certain threshold, we can assume that a user touched the metal plate.

Summary

In this series of articles, I’ll discuss an ongoing project of mine. Usually, I finish a project before I write about it. In this case, however, I decided to document my work as I go. Therefore, the information might not be 100% accurate, and it’s subject to change. I still think that this approach makes a lot of sense, as it also documents my mistakes, and it should give us all a good chance to learn from them and avoid making them again in the future. In the end, I’ll hopefully have a capacitive touch screen version of my old USB volume knob project that can be used as a sanitary kitchen timer.

The sensing and processing will be done by an ATMega328PU, which is the same microcontroller used in an Arduino Uno. I decided to only employ the MCU to ensure that the finished product will be as small as possible. Capacitive touch sensors work by forming a capacitor from a metal plate and another conductive object such as a user’s finger. The Arduino sends out pulses to the capacitor and it monitors how long it takes until it receives an answer. This delay changes when the object to be sensed moves closer or farther away from the metal plate.

Sources

Capacitive Sensing for Dummies – instructables.com
Capacitive Sensing – wikipedia.org
CapacitiveSensor Arduino Library – arduino.cc

Table of contents

Part 1: Project Idea and the theory behind capacitive sensing (You are here)
Part 2: The circuit and a custom PCB
Part 3: The software
Part 4: The case design and an upcoming revision
Part 5: The finished product, lessons learned

5 thoughts on “Building an Arduino based capacitive touch kitchen timer – Part 1

Leave your two cents, comment here!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.