I had a project running on Arduino using external pullups (20 Megohm), set the pins used as digital inputs and used digitalRead to detect high or low. It all worked well. The touch pad actually needed split half connected to ground and half connected to the pin. It worked as resistive sensing when touched the pin was Low.
I have tried the same project using Teensy 3.1 but cannot get the Teensy to detect touch by the resistive method. I have tried 10, 20, 30, and 40 Megohm. I can get it to work by bridging the pad with a resistor. say 10 Megohm. (10/(40+10) x 3.3 volt ) gives about 0.66 volts and it works and reads logic 0. But not all the time.....If I go to the next pad it may not work. If I measure the voltage on the pad when the resistor is bridging it, it works and I get 0.6 volts OK but for some reason some times the pad sits at 3.00 volts with the resistor connected and volts doesnt drop. If I go to another pad and come back may work OK and give 0,6 volts next time. It is as if the pin outputs 3.00 volts at times for some reason...?????
I can get touch to work OK on Teensy3.1 using touchRead and it works very well and doesn't need ground.
I am using the same pins to try out the resistive sensing ( pins 15, 16, 17) so everything is connected the same except for the external pullups.
This is snipits of the code I am using..........
This bit is before SETUP
int tch15 = 0;
int tch16 = 0;
int tch17 = 0;
int tchpin15 = 15;
int tchpin16 = 16;
int tchpin17 = 17;
PinMode is in SETUP........
pinMode(tchpin15, INPUT);
pinMode(tchpin16, INPUT);
pinMode(tchpin17, INPUT);
This bit is in LOOP......
tch17 = digitalRead(tchpin17);
delay(1);
tch16 = digitalRead(tchpin16);
delay(1);
tch15 = digitalRead(tchpin15);
delay(1);
......................................................
I also serial.print out the values to see changes.
Just wondering if anyone has tried resistive touch sensing and got it working. Or are the electrical characteristics of the Teensy3.1 different from the Arduino and maybe wont work. The Arduino seems similar to CMOS inputs and it works OK on them.
I have tried the same project using Teensy 3.1 but cannot get the Teensy to detect touch by the resistive method. I have tried 10, 20, 30, and 40 Megohm. I can get it to work by bridging the pad with a resistor. say 10 Megohm. (10/(40+10) x 3.3 volt ) gives about 0.66 volts and it works and reads logic 0. But not all the time.....If I go to the next pad it may not work. If I measure the voltage on the pad when the resistor is bridging it, it works and I get 0.6 volts OK but for some reason some times the pad sits at 3.00 volts with the resistor connected and volts doesnt drop. If I go to another pad and come back may work OK and give 0,6 volts next time. It is as if the pin outputs 3.00 volts at times for some reason...?????
I can get touch to work OK on Teensy3.1 using touchRead and it works very well and doesn't need ground.
I am using the same pins to try out the resistive sensing ( pins 15, 16, 17) so everything is connected the same except for the external pullups.
This is snipits of the code I am using..........
This bit is before SETUP
int tch15 = 0;
int tch16 = 0;
int tch17 = 0;
int tchpin15 = 15;
int tchpin16 = 16;
int tchpin17 = 17;
PinMode is in SETUP........
pinMode(tchpin15, INPUT);
pinMode(tchpin16, INPUT);
pinMode(tchpin17, INPUT);
This bit is in LOOP......
tch17 = digitalRead(tchpin17);
delay(1);
tch16 = digitalRead(tchpin16);
delay(1);
tch15 = digitalRead(tchpin15);
delay(1);
......................................................
I also serial.print out the values to see changes.
Just wondering if anyone has tried resistive touch sensing and got it working. Or are the electrical characteristics of the Teensy3.1 different from the Arduino and maybe wont work. The Arduino seems similar to CMOS inputs and it works OK on them.