Capacitive Imaging With A Raspberry Pi Touch Screen

We use touch screens all the time these days, and though we all know they support multiple touch events it is easy for us to take them for granted and forget that they are a rather accomplished sensor array in their own right.

[Optismon] has long held an interest in capacitive touch screen sensors, and has recently turned his attention to the official Raspberry Pi 7-inch touchscreen display. He set out to read its raw capacitance values, and ended up with a fully functional 2D capacitive imaging device able to sense hidden nails and woodwork in his drywall.

Reading the capacitance values is not a job for the faint-hearted though. There is an I2C bus which is handled by the Pi GPU rather than the processor, and to read it in software would require a change to the Pi’s infamous Broadcom binary blob. His solution which he agrees is non-optimal was to take another of the Pi’s I2C lines that he could talk to and connect it in parallel with the display line. As a result he can catch the readings from the screen’s sensors and with a bit of scripting make a 2D display on the screen. The outlines of hands and objects on his desk can clearly be seen when he places them on the screen, and when he runs the device over his wall it shows the position of the studding and nails behind the drywall.

He’s posted his code in a GitHub repository, and put up the YouTube video of his capacitive imaging in action which you can watch below the break.

We’ve covered a huge number of capacitive touch projects before but this is the first camera we’ve seen. Now we know it can be done, we look forward to the refinements we’re sure will come from the wider community. This could have the makings of an interesting imaging technique for hacker projects.

14 thoughts on “Capacitive Imaging With A Raspberry Pi Touch Screen

    1. It brings some interesting thoughts, at first I thought ‘plastic won’t work and neither does paper’ but then I though ‘didn’t some currency have conductive/capacitive ink these days as a security feature’? So that would mean it might be able to ‘see’ money. Although the resolution of a touch screen is pretty bad for identifying something as small as normal sized letters the currency has the big numbers on it so maybe that would work.

      And then after that thinking I suddenly got the thought that laser printers use a charge on the toner to transfer it to the paper, so that would mean the letters on a laser printout might have capacitive properties too right? Then if that is detectable it might be possible to recognize large letters or logos.
      But maybe the presence of the paper and the carrier having melted destroys the electrostatic capabilities of the toner though.

      1. I wonder how difficult it would be to create a capacitive flatbed scanner.
        Like a modified normal scanner with the glass replaced with thin plastic and the linear CCD module replaced with some kind of linear capacitive strip.

        Really interesting points [Whatnot].

  1. I’m intrigued by its success in finding wall studs. If one could separate the digitizer and the screen and sandwich a PiZero and a battery pack between them, there may be a marketable stud finder there. The current consumer tools for that are really lousy..

  2. Hook it up to an optical mouse attached to the screen, facing forward for position tracking, drag it around over the same areas a bit and maybe the resolution and noise performance could be improved?

    1. What’s questionable about it? It works just fine for me.
      Are you going to complain that it took a while to go on sale? What kind of entitlement do you think you can claim here?

      1. “…What kind of entitlement do you think you can claim here?”
        Let’s see if a second time works:
        “Having followed the RPi touchscreen through its tortuous development through to its somewhat questionable completion…”

Leave a Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s