Capacitive Sensing Tutorial

[Bertho]’s submission for the 74xx logic contest is really impressive. He designed a capacitive sensing touchpad using only 74xx and 40xx logic chips. We’re impressed with the build and his writeup is one of the best resources we’ve ever seen for capacitive sensing.

There are two ways to go about designing a capacitive touchpad. The first option is put a voltage through an RC circuit. Measure the voltage-time curve, and you have a measure of the capacitance of the circuit. The second method is setting up an RC circuit to change polarity after a threshold for C has been reached. Microprocessors only use one of these methods (AVR uses the first, PIC uses the second), but [Bertho] decided to implement both methods for unknown reasons we still respect.

The circuit [Bertho] designed has a 30MHz clock using only 74xx logic chips, an amazing feat in itself. An 8×8 channel panel was fabricated and the whole build connects to a computer over RS-232.

The finished build is good enough has 64 points of resolution and is able to detect proximity very well. The touchpad is even able to recognize when a pen is placed on the panel. Check out the video after the break for the walk through and demo of this amazing build.

[youtube=http://www.youtube.com/watch?v=Y-tAlHUfbPo&w=470]

13 thoughts on “Capacitive Sensing Tutorial

  1. I wonder what the intentions are for this project, because I will use the info from this for robot skin. Cheap, affordable robot skin that can sense touch. Very nice, Very nice indeed.

    1. My original intention is to create an interactive wall, which can sense you at a distance. When the 7400 contest came up, I just went into over-engineering mode.

      You are welcome to use any and all information if it helps you. However, using this specific capacitive design in robot skin may prove difficult because it actually measures the panel-finger-to-earth induced capacitance. For isolated applications you may need to have a localized measurement. You’d need to do some experimenting.

  2. Not that it really matters to me, but I believe “we” went from from typical hacker’s home shop engineering , to the home shop of an engineer, although I’m speculating on the location of this bench. Personally I try to study this writes ups best I can at some point in time. I may not %100 fully understand them, but I often, pick up something I didn’t know. Thanks for posting items that aren’t the easy low hang fruit.

    1. Don’t despair! The project is entirely built and tested at the local hacker-/makerspace. And, although I am a CS(+EE) engineer, I do this stuff because it is a challenge and fun to make, not because I have to. Not everyone hacks at the same level of engineering.
      More importantly, making and publishing this kind of stuff may provide an incentive for others to dig into the matter and come up with something ingenious.

      Anyone who wants to know any detail is free to ask and I will do the best I can to answer it. See this as a learning curve; in 20 years you may want to pass on your knowledge too ;-)

  3. I wanted to build one of these too, but it’s pretty hard without an oscilloscope. I’ll get one soon and try again :) Until then, this build is a very nice read. I wonder if it could do multitouch…

    1. It can detect multi-touch, but there is a catch. The position is x- and y-mirrored because it measures capacitance on a line-axis and cannot determine where on that axis your finger is located when there are multiple fingers touching (on a diagonal w.r.t. the axis).

      I used an “old” 100MHz Tektronics scope, which is only just enough for the measurements. You need to take the scope’s (and probe’s) rise-time into account when analyzing details that are only few ns apart. Luckily, Tektronics scopes are really nice.

      1. Yeah, the x-wires are mirrored, but that is not what I meant.
        If you have two fingers on the panel, say positions (2,5) and (5,2), you’d see a change of capacitance on channels x=2, x=5, y=2 and y=5. No software can determine whether the coordinates should read (2,5)/(5,2) or (2,2)/(5,5).
        This is not a matrix measurement where each point is uniquely defined. It is a row/column measurement.

      2. Actually you can kind of determine it in software, but you need to be continuously tracking the positions and hope+assume that you will first make contact with one finger and then deduce the coordinates of the other.
        I believe it’s what phone touch screens do, and why sometimes you can get them to mess up the coordinates the way you explained.

  4. my first thought is that it looks like a inductive touch pad. If been thinking alot about inductive touch technology ever since i got my hands on an tablet that was made in 1989.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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