multiplexer and "arduino as a capacitive"

Hi, I can't make this work on my own, I am trying but the result is dodgy. I am trying to use the "arduino as a capacitive" ( ) technique with a HEF4051BP ( multiplexer 4051 ).

So I am using two 4051. One for the Output ( on pin 8, digitalWrite ) and one for the Input ( on pin 9, digitalRead). I am managing only one of the eight ports on the 4051s for the moment to make it simpler and more clear. The two 4051 are triggered by the 3 same pin so they are "synchronize". I tried to used different pins for triggering the two 4051 but it seams just a bit slower and I imagine that would make my life more complicated when I will be trying to read the 8 pins of both 4051 ( and it doesn't sound logic to me anyway).

Everything works nicely when I am just reading pin8 with pin9. But If I use the capacitive technique everything goes mad. I think it's somehow normal to have higher values then usual when using a 4051 but here the values keep going up and up and up! That's not normal.

Don't really know what to do, I can put pictures and the code if someone is keen on helping on this one. If someone knows the solution or could help I would then be able to do a nice tutorial ( with picts ) to give my contribution to the community. I think that if this combination works ( capacitive + 4051 ), that would be a useful and cheap solution for more than just myself.

cheers. :)

ps: I am French by the way.


it's extremely unlikely that you will be able to make this work...

a) Capacitive sensing is only reliable with very good engineering b) Capacitive sensing is generally very finicky and unreliable c) Capacitive sensing without adequate ( i.e. 100K or less) pull-ups or pull-down resistors is inherently unreliable as the pins are not tied to a certain state; i.e. you will rely too much on the local electromagnetic conditions to set the "off" state. d) You're basing it on the Arduino capacitive sensing idea; the CMOS 4051 is another type of chip architecture, with a different type of logic inputs e) you're multiplexing the inputs, which will probably cause havoc with the sensitive levels required to sense capacitively f) doing it correctly will require very good shielding and PCB design to get it to be reliable.

I could write a lot more reasons here, but trust me, it isn't going to work the way you want, or at all, so don't waste your time :) Sure you could spend a few months and maybe get it working semi-reliably, but why bother when there is a 4$ solution waiting around the corner that is known reliable?You can get everything you want already engineered in a multi-channel QTprox touch-sensor chip if you want to do capacitive sensing...


:'( ok ok, I was expecting that kind of answer. That would have be to good. I never really used qtprox product, except a qt140 but I didn't do the wiring on my own. Also as a neewbe in the electronic world, not finding any tutorial on one of the qtprox's touch sensor used with the arduino scared me a bit. But hey, I need to grab mysef by the hand and create new neuronal connection in my brain by learning something completely new. I probaly be screaming for help in a week or two as I will be lost in the datasheet/wiring thing. Cheers for your help Daniel, it seems that you are helping a lot on this forum. Thanx a lot.


no sweat. Try starting out with a simple sensor like the QT110. There's an evaluation module:

One part of learning electronics is knowing when to take the most logical route to the solution, which is actually a good design practice. :) D

Cheers, I still have my qt140 ( 4 input ). I am going to try with this first.