Capacitive sensing library: slide pot schematic

Hi all
I'm trying to design a slide pot using the capacitive sensing library but I can't figure out how to properly design the circuit schematic. Looking at the related arduino playground webpage, it is written that with just two pins and a linear resistor ladder a working slide pot can be designed. However I need help to understand how to make a worth resistor ladder and how to connect the conductive foil to the circuit. I searched long way on the web and on the forum but I didn't came to a solution. Thank you in advance!

Did you read the Quantum Scrollwheel sensor datasheet they referenced on the playground webpage?

Thank you for your reply, I've read it and I've found very interesting informations about the plates layout. However I didn't find anything about the layout of the resistor ladder but I could be wrong. I'm a novice about electronics. Any help would be very appreciated. :slight_smile:

The fact that they make reference to a data sheet that has no information about the ladder network and the fact that the post no code makes me believe the design never existed and/or was never tried.

From the playground page it seems that experiments were made with good results but at the end of the paragraph there is a not better specified "At some point I'll get the sketch posted here". :frowning:
Reading the paragraph it seems that it could be possible to make a slide pot using a single conductive plate (very interesting for my project) but I don't have any idea about how to arrange the circuit (or if it is actually possible, maybe I have misunderstood!).

To tell the truth I'm not sure how it's supposed to work.
You may find the interesting

Thank you so much for your suggestion! Very interesting. Sadly I need to use a capacitive approach for my project. We will see if someone has the mysterious answer in his pocket :smiley:

Not easy to know about what you are talking, but if you refer to the resistive device mentioned above, add a capacitor and you'll have a variable RC circuit. Then you can use any library based on oscillations periods to determine the resistance value.

not sure what you are looking for but just connected a Microchip_2_channel_slider to ESP32 GPIO4 and GPIO15

image

running program

// ESP32 Touch Test
// Microchip_2_channel_slider reading GPIO4 and GPIO15

// from https://lastminuteengineers.com/esp32-basics-capacitive-touch-pins/

void setup() {
  Serial.begin(115200);
  delay(1000);  // give me time to bring up serial monitor
  Serial.println("ESP32 Touch Test \n"
             "Microchip_2_channel_slider reading GPIO4 and GPIO15");
}

void loop() {
  Serial.print("Touch: ");
  Serial.print(touchRead(4));  // get touch value on GPIO 4
  Serial.print("  ");
  Serial.println(touchRead(15));  // get touch value on GPIO 4

  delay(1000);
}

serial monitor output as I move my finger along the slider

ESP32 Touch Test 
Microchip_2_channel_slider reading GPIO4 and GPIO15
Touch: 52  47
Touch: 29  42
Touch: 28  42
Touch: 25  43
Touch: 25  43
Touch: 25  41
Touch: 27  39
Touch: 29  35
Touch: 30  34
Touch: 30  33
Touch: 32  31
Touch: 38  29
Touch: 46  26
Touch: 49  24
Touch: 49  25

Thank you all so much for the proposed solutions to my problem. To be accurate the topic is about this page, paragraph named " Scroll Wheels (well, slide pots anyway)".
Sadly the proposed solutions don't match with my needs for my project (I need to produce from zero a capacitive sensor without use pre-built components).

have a look at the Micrichip Capacitive-Touch-Sensor-Design-Guide
although a Microchip document the design guidelines are general

another of the Microchip toutch kit components is the 4-chnnel slider
image

some simple code for ESP32

// ESP32 Touch Test
// Microchip_4_channel_slider reading Microchip_4_channel_slider reading GPIOs 4 - 15 - 32 - 33

// from https://lastminuteengineers.com/esp32-basics-capacitive-touch-pins/

void setup() {
  Serial.begin(115200);
  delay(1000);  // give me time to bring up serial monitor
  Serial.println("ESP32 Touch Test \n"
                 "Microchip_4_channel_slider reading GPIOs 4 - 15 - 32 - 33");
}

void loop() {
  Serial.print("Touch: ");
  Serial.print(touchRead(4));  // get touch value on GPIO 4
  Serial.print("  ");
  Serial.print(touchRead(15));  // get touch value on GPIO 15
  Serial.print("  ");
  Serial.print(touchRead(32));  // get touch value on GPIO 32
  Serial.print("  ");
  Serial.println(touchRead(33));  // get touch value on GPIO 33

  delay(1000);
}

results moving finger along slider

ESP32 Touch Test 
Microchip_4_channel_slider reading GPIOs 4 - 15 - 32 - 3
Touch: 50  50  51  52
Touch: 48  48  50  23
Touch: 47  47  48  23
Touch: 46  46  47  24
Touch: 53  53  26  36
Touch: 50  50  20  51
Touch: 47  44  23  55
Touch: 47  27  35  55
Touch: 47  20  52  57
Touch: 40  22  52  56
Touch: 27  31  51  55
Touch: 23  46  53  61
Touch: 24  47  52  58

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.