Hardware implementation for touch control

Technoman

Senior Member
Hi,
In a next future, I intend to use touch control for the first time. I had a look at the AXE181 data sheet and at some application notes released by Microchip (AN1626, AN1325, ...).
Owner of a recent camper van with several control panels using touch control, I don't want any erratic behaviour as I could too often see : unwanted state change (may be due to condensation, RF disturbance, power line coupling or other unidentified reasons).
I am looking for advices concerning the hardware implementation for the best reliability.
 

hippy

Technical Support
Staff member
It's not clear if you are planning to use touch control in a vehicle, whether you have experienced the issues you mentioned or are rightly concerned about them.

For an automotive environment I would suggest physical button control. Products designed specifically for such use and attached to a PICAXE would likely be a better bet than using a PICAXE to do touch control.

It may be possible but I would expect it to be challenging, involving 'adaptive algorithms', and a lot of tweaking. I would definitely recommend undertaking some proof of concept testing on the bench before even considering making things work in a vehicle.
 

cpedw

Senior Member
There has been discussion here and elsewhere. My conclusion, shared by some others I think, is that e.g. TTP223 are reliable and cheap whereas Picaxe touch is quite challenging.
 

Technoman

Senior Member
I am(was?) planning to use touch control in a vehicle and at home. Unfortunately I do have experienced the mentioned issues.
At first, the advantage is to replace mechanical buttons while having the benefit of being waterproof.
@hippy : could you explain "adaptative algorithms"?
Microchip solutions : https://www.microchip.com/en-us/products/touch-and-gesture/capacitive-touch-solutions-for-buttons-sliders-wheels-and-proximity
Unfortunately, this technology is only available on more recent chips. No Picaxe MCU is listed.
 

rq3

Senior Member
Years ago I built a device that was supposed to drive a stepper motor up and down a string, with the position of the motor varying according to baromatric pressure. It eventually morphed into an aircraft altitude hold mechanism, complete with barometric sensor, stepper driver, OLED display, and touch switches. All driven by a Picaxe 20M2.

The trick to the touch switches was to have the Picaxe sense the switch parameters at initilization, store the result, and then constantly ask itself whether that result had changed more than a certain amount. If it had, the switch was considered to be touched, and the value immediately after the touch was stored as the new "baseline". This kept the switches constantly self calibrating from -40C to +150C, even with ice or condensed steam on the glass covered touch panel. IIRC, there was one line in the picaxe code that set the sensitivity, anywhere from a hand waving 6 inches away, to requiring a firm licked thumb on the switch. I'll see if I can find the code.

Video here:
 

hippy

Technical Support
Staff member
@hippy : could you explain "adaptative algorithms"?
It's basically automatically adapting to a changing environment as 'rq3' describes.

One example would an analogue pot which you want to be able to slowly adjust but also want to be able to detect large changes and light a LED - A variation on the 'buzzer wire' game; turn the pot back and forth without triggering the alarm.

You would need to track what the current pot position is to be able to determine what constitutes a large change. 45 to 90 degree might be an ADC change of 100 to 110, 180 to 225 degree might be and ADC change of 200 to 210.

You can't have a single "greater than 205" or similar, have to use "+/-10% change, or +/-N change from last or average or something like that.

The "adaptive" part is continually determining what the last or average is, what change constitutes a large change, adjusting parameters as you slowly turn the pot to be able to detect the big changes.

Another example might be wanting to detect when someone wearing a sensor is jumping up and down on a boat when the boat and the person are already moving up and down on the waves.

EMI and other environmental things can affect the touch readings in a similar way that waves prevent there being a constant baseline. As your hand approaches a touch switch its reading may go up even though it's not actually been touched yet.
 
Top