Detecting "touch" on pots / rotary encoders

Pensive

Well-known member
Has anyone got any neat ways of achieving this?

In theory you could connect touchpin1 to the 5v and touch pin2 to the output of a pot, and with some form of connectivity to the knob _might_ work. But there are many reasons why it might not work at all.

Has anyone tried before?

Rgds

Jon
 
No, I haven't tried that. However the touch functionality can be used as a capacitive water level sensor. My humidifier is working happily with it.
 
You could try connecting the two ends of the pot through transistors or 4066-type switches. When you want to read the actual angular position of the pot, you'd turn on the transistors/switches to connect the pot to 3.3V and GND, and then do analogRead() after a brief delay to let the voltage stabilize.

To read it as capacitive touch, you'd disconnect the transisors/switches, and then use touchRead(). The tricky part will probably be getting a conductive knob, so the user capacitively couples to the pot. You might need to solder a wire from the body of the pot to the signal, of course course use insulating bushings or washers or some other way to prevent the body from shorting to your panel.... assuming it's metal, and properly grounded, which is really should be, since capacitive sensing tends to only work well the chassis is earth grounded or being held/touched by the user's other hand.

Of course, this might not work. I haven't tried it. In fact, I just made it all up right now for this message. ;)
 
Oh, before going to all that trouble, I'd first use an ohm meter to check if the shaft of the pot actually has conductivity to the body or any of the signals. If the shaft is electrically isolated, or made of plastic, you could have a really tough time getting any significant capacitive coupling from someone touching the knob to any actual signals.
 
I've got a Ableton Push (Sequencer, music matrix panel, composer), it has rotary encoders that are touch sensetive, maybe do a search on that for teardowns of it to see how they got thiers to be touch sensitive.
 
In my experience, touchRead() works well. I've used it with both powered by a battery and powered by a USB charger connected to either a laptop or USB charger. It even works as a proximity sensor for short distances (~1-2 cm).

That said, if I could find a reasonable rotary encoder that already had touch built-in, that would be the way to go. If not, I'd either try Paul's transistor scheme or mount the pot in an isolated bit of copper clad board that would act as the touch sensor. My expectation is that the area around the knob would definitely be touch-sensitive and the knob itself might be. To protect the Teensy from ESD, I'd coat the copper with a thin layer of enamel or tape. If the knob was conductive, I might consider building a slip ring as an experiment, but I wouldn't expect that approach to be reliable with the tools I've got.
 
As far as Pots go the generic one I have here isolates the metal shaft from the wiper, which is a good thing since other wise any audio going through it would also get the noise. Does have conductivity between the body and the shaft and I'd actually expect that to be true even as it ages since there is a reasonable surface area involved and a narrow gap, and this is after all capacitive rather than resistive sensing so a slip ring assembly should actually be straight forward since it doesn't need a true wiper.

I'd be suspecting the commercial solution would be to add a wiper to the pot specifically for the sense line, which might be possible in a hobby environment if you are prepared to spring for a stero pot and sacrifice one channel as a sense circuit and then bridge the wiper to the shaft. Other than the added noise would still work as a pot if you isolate the two ends during measurement. If you have the pins the easy way is to wire the two ends to spare Teensy ports and toggle them between output (one at 0 and one at 1) to measure pot position and input for cap sensing.

Rotary encouders would be harder since most seem to have plastic shafts so solutions would involve more engineering. Pictographer's suggestion might be the way to go with a reasonably large contact area behind the control in question and if possibly a conductive knob to improve coupling.
 
Awesome ideas guys - funny you should mention Ableton Push, I'm trying to make the untztrument into a simple standalone midi step sequencer based on Push :)

Paul's very first suggestion wouldn't work because the application requires the pot to send its value only when being touched. So the "either or" wouldn't meet the spec (which I failed to share in the first place).

Another option could be the Adafruit standalone capacitive touch module, or a custom round PCB aerial "collar" for the pot, being used to detect proximity rather than touch? There is a high risk of over-under sensitivity though.

Thinking the slip ring would be the easiest idea so far, plus cheap to make. Couple of washers could do it.

But I will certainly look into the Push solution. It might be an off the shelf part from someone by now.
 
Of course with Pauls solution I could flip back and forth as fast as the signal settles and achieve a happy medium, without too many ropes and pulleys
 
If you can get the encoder used it should also work with the cap sense Teensy fucntion without the related ICs. Though if the design has a farm of these you may need a slave Teensy to ride herd on the interrupts and cap reads to neatly package the data for the Teensy actually using the information.

As noted just the shaft will probably read if a finger is within proximity to it but better reliability would come from knobs that are at least somewhat conductive.
 
Well, if you don't want to DIY or wait for Mayhew to get them in stock, you can pick up these Cadillac models for $30 or so: ALPS Fader motorized RSAON11M9 touch sensitive 10K linear slide potentiometer

The motors are there, but you don't HAVE to use them.
 
Looking at the Mayhew product manual he specifies two types of encoder which he has tested and will work, so i might buy a few of each and some metal knobs and get it ticking :)

He's just connecting the touch input to one of the posts. It's fair to say if there is continuity between the metal rotary shaft and the metal cage of the pot, it should work ok, with standard pots or encoders. :)

I happen to have two types of 10k pot, and 2 types of encoder right here but i cant find my meter!!! grr.....

IF i get anywhere i'll post it here :)
 
It works!

10k pot1: Just holding it against the mounting nut of the pot by hand, has a settle condition of about 1200, and when i touch the shaft I get 5000.
10k pot2: rested the wire on the back of the pot, the big metal round bit. Same result, settles around 1300, touching the metal shaft brings about 4400
encoder 1: settles around 1200, get around 6000 when i touch the shaft
encoder 2: same as encoder 1.

I haven't analysed any impact this might have on the stability of the signals generated by the encoder or the pots though. I'm doing a 10% smooth filter on all my pots anyway, before dividing down to midi resolution levels of 0 to 127. Highly doubt this will be an issue, but needs to be checked.

re:Encoders I'm not in a position to determine this just yet, maybe later.

I've been touching a few too many shafts this evening....
 
Blast!

The Teensy LC pin functionalities mean that allowing for a trellis&int pin,I can get either 7 encoders with touch (full to bursting), or 7 pots with touch, with spare button pins.

I can't _quite_ get 8 of either ( there are 8 mount holes on my untztrument )

but I can get 4 encoders with touch, and 4 pots with touch.

It's tickling my OCD nerves! I don't want to add a breakout.....
 
I was just doing some research on this topic and the link to mayhew seems to be dead. I was wondering if this works with rubberized knobs on the encoder?
 
Back
Top