Expand Inputs for Capacitive Touch Reading

Hi , im using teensy 4.1 and i was wondering the best way to expand the teensys analog input pins.
4.1 gives 18 input for capacitive sensing can someone give me advice on how to expand the inputs.
I ordered some Mpr121 modules .
But was wondering the best way to expand the pins without using that expander.
Thanks!
 
Do you mean you want more analog inputs? There are many A/D converters out there with I2C and SPI interfaces. You might start with the Adafruit website.
 
I've used analogue multiplexor chips (4051 8 input / 4067 16 input) to read multiple touch pads from one pin. It costs you the addressing pins and an enable pin but you can share those pins among a few multiplexor chips and read many capacitative touch pads.

I used Freed's FastTouch library but native hardware would probably work as well.
 
I have a small project that uses a t4.1 with 21 fastTouch pins. It plays music over I2S and a light display, but obviously doesn't use a lot of pins for other things.
Code:
  uint8_t touchPads[] = {2,5,15,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41}; //21 pad box

I do expand options by recognizing when 2 pads are touched at once. That is a little tricky--mainly because you won't quite be simultaneous in touching/removing your fingers. Conceptually it's like bounce, although I don't really do it the same way.
 
Back
Top