Go Down

Topic: Need assistance on Capacitive touch sensors (Read 412 times) previous topic - next topic

sv_nagendra

Hi,
We have designed a board having ON BOARD capacitive touch sensors connected to an Atmel2560AU chip. We have used Arduino for entire logic programming.
According to our customer needs, a 5mm thick acrylic plate has been put upon the board and the fingers have to be touched on the 5mm thick acrylic plate. The capacitive touch sensors have to react to the finger touch upon the 5mm thick acrylic plate.
We have seen the arduino forum and we have used the 30Mega ohm resistors for the capacitive touch connecting the arduino controller as shown in the attached (sensor.bmp).

The capacitive sensors works with huge amount of delays. I am unable to calibrate the capacitive touch sensors with less amount of delays.
Please find the codes pertaining to the capacitive sensors:


CapacitiveSensor   main_power = CapacitiveSensor(4, 29);


void loop()
{
  int state;
  int preset_work_flag;
  long start = millis();
  //////////////////////////////////////////////////////////////MAIN POWER FLAGS
  long main_power_flag =  main_power.capacitiveSensor(60);
}


if (main_power_flag > 100)
  {
    MAIN_POWER_buttonPin = HIGH;
  }
  else
  {
    MAIN_POWER_buttonPin = LOW;
  }


  MAIN_POWER_buttonState = MAIN_POWER_buttonPin;




We have used these kind of coding in order to sense the capacitive touch.

I kept changing (60) value in main_power.capacitiveSensor(60);
as well as value(100) in
 if (main_power_flag > 100)

 lines of codes.

But there was no improvement in the speed of sensor.
Please let me know how to improve the speed of operation of the capacitive touch sensors so that the delays in sensing can be reduced.

please reply on urgent basis.

sv_nagendra

Hi,
We have designed a board having ON BOARD capacitive touch sensors connected to an Atmel2560AU chip. We have used Arduino for entire logic programming.
According to our customer needs, a 5mm thick acrylic plate has been put upon the board and the fingers have to be touched on the 5mm thick acrylic plate. The capacitive touch sensors have to react to the finger touch upon the 5mm thick acrylic plate.
We have seen the arduino forum and we have used the 30Mega ohm resistors for the capacitive touch connecting the arduino controller as shown in the attached (sensor.jpg).

The capacitive sensors works with huge amount of delays. I am unable to calibrate the capacitive touch sensors with less amount of delays.
Please find the codes pertaining to the capacitive sensors:


CapacitiveSensor   main_power = CapacitiveSensor(4, 29);


void loop()
{
int state;
int preset_work_flag;
long start = millis();
//////////////////////////////////////////////////////////////MAIN POWER FLAGS
long main_power_flag =  main_power.capacitiveSensor(60);
}


if (main_power_flag > 100)
{
MAIN_POWER_buttonPin = HIGH;
}
else
{
MAIN_POWER_buttonPin = LOW;
}


MAIN_POWER_buttonState = MAIN_POWER_buttonPin;




We have used these kind of coding in order to sense the capacitive touch.

I kept changing (60) value in main_power.capacitiveSensor(60);
as well as value(100) in
if (main_power_flag > 100)

lines of codes.

But there was no improvement in the speed of sensor.
Please let me know how to improve the speed of operation of the capacitive touch sensors so that the delays in sensing can be reduced.

please reply on urgent basis.

wvmarle

#2
Dec 07, 2017, 08:51 am Last Edit: Dec 07, 2017, 09:14 am by wvmarle
Please read this first. It tells you how to use this forum properly.

Please define "huge amounts of delays".

Does the sensor react better when touched directly, without the 5mm acrylic?

How does the sensor actually look like?

Then your schematic:

Which pins of the Arduino does it connect to?
How is the Arduino itself grounded?

(edit: fixed image link after thread merge)
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Coding Badly


sv_nagendra

Hi,
Please find the clarifications to the points asked:
1. Please define "huge amounts of delays".
Answer: When i click on the capacitive touch sensor, it takes about 2 seconds to react.
2.Does the sensor react better when touched directly, without the 5mm acrylic?
Answer: Yes the delays are very less when the 5mm acrylic plate is removed. In earlier version of the board, we had used the capacitive sensors directly without acrylic plate. The resistors used in earlier version of the board was 1Mega Ohm. But, in this board, since the 5mm acrylic plate has come inbetween, i increased the resistances attached to 30Mega ohm after reading some documents from Arduino website.

3. How does the sensor actually look like?
Answer: i have attached (sensor_screenshot.jpg) which illustrates the PCB information of the sensors. Ground shield has been added around the switches with certain clearance.

4. Which pins of the Arduino does it connect to?
Answer: The sensor pins have been connected to ADC inputs of Atmega2560AU


5. How is the Arduino itself grounded?
Answer: The whole board has been covered with a ground shielding and connected to GND pin of a connector. This GND pin will be connected to GND terminal of a standard power supply..

So, please let me know where i have gone wrong  ::)

wvmarle

I was more hoping for a photo of an actual sensor. There is not even an indication of scale in that image.

The GND terminal of that "standard power supply", is that properly grounded? You really need a good ground reference for capacitive sensors to work - just look at all the posts here that say "when connected to the USB of the computer it worked, when connected to the battery it didn't".

Just to be clear: in the current board, when you remove the 5mm acrylic, the delays disappear completely? Or do you still have delays in reaction?

And with the original configuration and a 1M resistor, you did experience a delay between touch and reaction of your device?

The delay part surprises me a bit. I've played around with capacitive sensors and encountered them out in the world, but never seen any noticeable delay in the touch and the signal. It was always just about instant.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up