This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How should you test the capacitive touch library?

I was able to write the code and put it to work on AN5 pin , and I found out that whenever I approach to the DK board he see it as a touch.

I connected to the pin a 10cm exposed wire, and when i touch it nothing happens, only when I touch the plastic of the connector.

What kind of touch the library expect ?

I am trying to understand in terms of hardware, what really is going on here ? should I touch directly the analog pin , or should it be through an isolator ?

and how to make it faster ? what are the tresh holds values means ( of 400 ) ?

Thanks a lot.

Parents
  • Although I've not used the capacitive library of this device, I have of others. A capacitive sensor works by measuring changes to the electrical field that is generated around or between the sensor area and a ground plane.

    They don't require actual touch to work, but the design of the sensor area (where you are trying to detect the presence of a finger say) can be tricky.

    Texas Instruments have a very detailed section on their site covering this.

    Ideally you should attach a small conductive area (say some copper tape) to your wire (attached to the detection pin - AN5). This should have another area connected to a ground, common to the MCU, placed underneath it with the two separated by a non-conductive material (even dry paper will work, but go with something around 1 - 2mm thick.) The higher the dielectric constant of the material the better - air is 1, PCB FR4 is around 4, polyester may be 5 etc.

    Ideally you want to have the ground layer slightly larger in comparison to the "live" area otherwise you'll find that your not detecting your finger, approaching the sensor area but it approaching the ground layer!

  • Thanks! , do not worry, if I make all the way to a product, I will use nrf52 :)

Reply Children
No Data
Related