Touch sensor on AVR, done without Qtouch library


Finally I have done force AVR’s to read touch buttons. Atmel QTouch library was interesting, but it was too hard form me, and it’s so big. I have rode piece of teory, have found a few examples and done. First effect is this module. How does it work in practice:

How does it work in theory:
The plates touch sensors act as capacitors, loaded by a resistor. The microprocessor loads the RC circuit, measuring the time. Since R is a constant, the charging time is dependent on the capacity. Capacitance changes when attach a finger he becomes the dielectric. For the system to work, you must take care of several elements:
Capacity of such a “capacitor” is very small. To extend the charging time, used high-value resistors (I used the absence of other 10M, better would be about 2-5M ohms).
One needs one pin sensor for reading, and one for loading, except that the latter may simultaneously support multiple sensors.
Times are very small; Why does not use the delay; same rotation measurement loop is long enough.
Changes capacity are also small, so it is important to make this change after applying finger was as large as possible. Therefore, the plates have a surface in a grid, to reduce their own capacity. Contrary to intuition, the larger the field of sensors, this is not necessarily better.
In such systems, it is important to use as the shortest path to reduce harmful capacity.
It is also around the pouring weight, which will shield the interference and provide a second electrode of the capacitor.
As is apparent from the above description, the measurement does not rely on the detection capacity of the human body relative to the ground, or anything like that. Human finger is dielectric of the capacitor in the electric field formed by the field of the sensor field and the nearby ground.


Tiny13_touch schematic




11 thoughts on “Touch sensor on AVR, done without Qtouch library”

  1. Witam,

    Proszę o kontakt, szukam podobnego rozwiązania do mojego projektu

    Błażej Marciniak

  2. I do accept as true with all of the concepts you have offered in your post. They’re really convincing and will definitely work. Still, the posts are very brief for beginners. May you please extend them a little from next time? Thanks for the post. kgffbddfdagb

  3. I interests this project cant find fuse configuration..
    please send me it…
    best regards..

  4. does it work under a cover like plexiglass (2mm thickness)?
    thanks for sharing.
    sorry about my bad English.

    1. Hello,
      It may be too thick. Generally there is no limitation by the plexi material, but you maybe will have to adjust the parameters in the code or increase resistance.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.