Large number of capacitive touch buttons: how? - Page 1
Forum section: electronics / projects

author: fredriknyman
author_rank: Newbie
timestamp: December 05, 2013, 07:39:13 pm
content: I have a design that will use a large-ish (48) number of capacitive touch buttons. I thought this would be pretty straightforward to do, but no: it seems I'm limited to ~16 independent sensors, either (RC method) because typical MCU:s only have that many interruptible GPIOs, or (RO method) because the built-in captouch hardware only has that many mux inputs.Suggestions?Thanks!

author: johnnyfp
author_rank: Frequent Contributor
timestamp: December 05, 2013, 07:43:41 pm
content: Could you use a touch screen sensor instead and just ignore void or areas that you are not interested in?Something like ahttp://www.atmel.com/devices/MXT224.aspx

author: M. András
author_rank: Super Contributor
timestamp: December 05, 2013, 07:46:19 pm
content: http://www.cypress.com/?id=3235this could be your solution

author: mazurov
author_rank: Frequent Contributor
timestamp: December 05, 2013, 08:06:42 pm
content: You can do matrix keyboards with cap.touch. Examples can be found in Microchip appnotes 1104 and 1250. You can also use analog multiplexers in front of MCU cap.touch inputs.

author: Mike Warren
author_rank: Unknown
timestamp: December 05, 2013, 10:44:38 pm
content: I've made 8 button touch sensors using very basic AVRs (ATTiny26) that work well with software polling. They work through up to 3mm of glass or acrylic. I can't see any reason that couldn't be expanded to any number of inputs, assuming enough GPIO.The basic principle I used was to have a 1M pullup resistor to the Vcc on each pad. I'd then pull the pad low, and time how long it took for the voltage to raise over the trip point. Then, I counted the number of triggers and set a variable to match that time. The "calibration" variable was integrated over a few seconds so it would self calibrate and it there were a large number of low readings in a row it indicated the presence of a finger.The only down side is that if you hold a finger on a pad for several seconds, it would be calibrated out and no longer trigger until you removed your finger for a couple of seconds.In practice this works fine for several hundred units in us in public environments.

author: fredriknyman
author_rank: Newbie
timestamp: December 06, 2013, 02:42:47 am
content: Thanks -- lots of good pointers!I suppose I should have mentioned right away it is a project I'm doing for fun. The idea is to make a PCB the shape of the continental USA with the state borders outlined, then put a touch pad inside each state and a LED where each state capital is. Why? Well, the kids are learning about states and their capitals, and I thought this would be a fun project for me and a learning aid for them.

author: Mike Warren
author_rank: Unknown
timestamp: December 06, 2013, 02:55:32 am
content: Well, if you want to have a go with my idea, and you can use an AVR, I'm happy to help you though it. It should be possible to extend the inputs with some 4051s.You'll also need a lot of output to drive the LEDs so I'd suggest something like a bunch of 4094s.But I must admit, if I was given this task, a computer with a touch screen seems like a much easier way, not that I could be accused of never doing things the hard way just for fun.

author: Harvs
author_rank: Super Contributor
timestamp: December 06, 2013, 06:26:50 am
content: Keep in mind AVR's have the free touch sense library available for them, which works well and is pretty well supported with documentation (as in how to make your touch application, the code is closed and provided as an assembled library). It also supports matrix keypads.

author: amyk
author_rank: Super Contributor
timestamp: December 06, 2013, 06:58:36 am
content: Two words: touch screenYou can basically create an infinite (ok, more like hundreds of thousands) number of buttons with one, limited only by the sensor resolution.

author: notsob
author_rank: Frequent Contributor
timestamp: December 06, 2013, 07:45:27 am
content: There are also IR touch frames/bezels, basically a 'rectangular frame with approx 1-2cm wide columns' they come with a usb connector and drivers, and work by projecting IR beams over the front of whatever, any number of touch points you want then, so you could have a laminated map below the frame.here's an examplehttp://www.prodisplay.com/infrared-ir-touch-screens.html