Adding More Capacitive Touch Inputs

Hi, I'm planning to build a capacitive touch MIDI keyboard with an Arduino Micro, but would like at least 25 inputs. Is it possible to use shift-in registers (like the CD4021B) with capacitive touch sensors instead of buttons? I'm not concerned with velocity of key presses (or an analog type of input) at this point. I just want to treat the capacitive sensors as digital on/off keys. If this is possible I'd really appreciate some guidance on how to go about this coding-wise. Would it be better to simply use 2 boards or a different method? Thanks so much!

1 Like

If using the separate sensors such as the TTP223 then they just have standard logic outputs to connect to your shift registers.

Paul__B:
If using the separate sensors such as the TTP223 then they just have standard logic outputs to connect to your shift registers.

Good to know, thank you! What if I was to use something like foil or electric paint though?

Paul__B:
If using the separate sensors such as the TTP223 then they just have standard logic outputs to connect to your shift registers.

@Paul__B could these sensors be used by the OP in a 5x5 matrix? If so, only 10 Arduino pins would be needed, so perhaps shift registers would not be required in this case.

That is tantamount to asking whether you could wire Arduinos in a matrix! They require Vcc (2.0V~5.5V) and ground and must stabilise (0.5 second) and auto-calibrate when switched on, Like an Arduino.

They are however, great devices and inexpensive modules - check out the datasheet.

At some stage I will eventually build my switch panels for my home automation ("Domotics" if you will) (and business premises); I intend them to be touch/ proximity switches but have been completely unable to get an Arduino to perform as a touch sensor (using a single I/O for the touch plate). Clearly the Capsense library uses raw assembler code and suppresses or side-steps timer interrupts. So these devices completely avoid the problem; they are simply digital inputs.

jsedmonds:
Good to know, thank you! What if I was to use something like foil or electric paint though?

Note the two pads at the bottom right of the PCB; the lower one also has a "thru" to the "TOUCH" plate on the other side. That is where you connect your own touch plate, whatever it is.

The jumpers "A" and "B" allow you to select active "HIGH" or "LOW" and whether it will operate as a toggle.

Very useful! :sunglasses: