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




Kontynuuj czytanie » || Napisał dnia: 09.07.14. || Tagi:, , , , ||


  1. Błażej Napisał/a:


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

    Błażej Marciniak

    05.09.14 || o godzinie 14:15
  2. Johna233 Napisał/a:

    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

    17.09.14 || o godzinie 16:28
  3. Alekander Kawęczyński Napisał/a:

    Thank You for Your response. I will try do best descriptions as i can in future.

    14.10.14 || o godzinie 18:27
  4. Rambert Napisał/a:

    można schemat podłączenia pod avr?

    08.01.16 || o godzinie 16:18
  5. Alekander Kawęczyński Napisał/a:

    Dodałem schemat do wpisu.

    08.01.16 || o godzinie 16:48
  6. zur Napisał/a:

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

    02.02.16 || o godzinie 10:51
  7. Alekander Kawęczyński Napisał/a:

    Low: 0x7A
    High: 0xFF
    Other words: Internal clock 9,6MHz
    In newer chips you can change clock prescaler by software (CLKPR register), without change fuse settings.

    02.02.16 || o godzinie 11:05
  8. Masoud Napisał/a:

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

    01.10.16 || o godzinie 22:05
  9. Alekander Kawęczyński Napisał/a:

    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.

    01.10.16 || o godzinie 22:14
  10. Masoud Napisał/a:

    thanks a lot.

    02.10.16 || o godzinie 18:42
  11. Iobcias Napisał/a: 25.05.19 || o godzinie 01:57

Skomentuj: Touch sensor on AVR, done without Qtouch library