Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arduino CapacitiveSensor library

Tags:

arduino

I've been working with the CapacitiveSensor library on the Arduino platform. I want to build a slider. Take a look at the following quoted text.

Scroll Wheels (well, slide pots anyway)

Experiments with a slide pot type linear sensor have been successful with just two pins and a resistance ladder. The basic layout is shown in the Quantum Scrollwheel sensor datasheet. The code uses this type of arrangement CapacitiveSensor Left32 = CapacitiveSensor(3, 2); // wire from pin 2 to left side of resistor ladder\ CapacitiveSensor Right23 = CapacitiveSensor(2, 3); // wire from pin 3 to right side of resistor ladder Where the pins switch their send and receive positions. With a linear resistance ladder, a finger closer to the send pin will report lower values because resistance downstream from the capacitance is basically out of the circuit. So in this manner when a finger is moved from one pin to the other the two calls to capacitiveSensorRaw will report complementary values that have an approximately constant value to them. The complication comes in when trying to deal with how much contact (capacitance) is present, which raises (or lowers) both values, but not necessarily in a linear manner.

Does anyone have an idea about the source code, and schematics for the pins and resistance ladder?

like image 292
Wouter Avatar asked Feb 08 '13 18:02

Wouter


1 Answers

Not sure how to help with the source, but this is what a resistor ladder looks like:

Resistor Ladder

like image 194
Ian McMahon Avatar answered Oct 26 '22 22:10

Ian McMahon