A resistive ribbon sensor is constructed as a stack of tapes and adhesives. One layer has resistive properties. Another layer (separated from the resistive layer by an air-gap) is a conductor. Pushing on the ribbon will create conductive contact between the resistive strip and the conductive strip.
When one finger pushes the ribbon, the ribbon can be compared to a potentiometer. At rest, the resistive strip makes no contact.
To give the resistive tape strength, it is sandwiched by the use of double-sided
sticky tape to a stronger but flexible plastic. This is build in top-down
order. I cut a 19mm wide strip out of a transparent document sleeve. This is
fully covered with the double-sided sticky tape. And on top of that the
resistive tape is mounted - resistive side up (exposed). This assembly can
now be sticked on the enclosure.
It is a good idea to cover all exposed copper tape with some other non-conductive tape. Otherwise, touching exposed copper tape will inject unwanted noise.
Here's an exploded view of the ribbon sensor construction:
Measure the resistance between one end terminal and the bottom copper strip. If not touched this expected to be a open circuit (infinite resistance). If this is not working out, use a stiffer plastic for the top layer or a thicker spacer material. Maybe sandwich two layers of tape for the spacer.
When the sensor is touched, different resistances can be measured between the bottom copper strip and the end-terminals, depending on the place where you touch it.
Remember Poullet's law? Resistance of a bar of a certain resistive material is proportional to length, and inverse proportional to area of its section. So, double the length (keeping all other things the same) and the resistance doubles too. Double the width of a tape, and the resistance halves. So for a tape (constant thickness) every square shape, large or small, has the same resistance - depending on the thickness and material of the resistor.
Here is a schematic view of the ribbon sensor:
Let's call the total resistance of the resistive tape
the ribbon sensor as a pure resistive divider is tempting:
Hey it's just like a regular potentiometer:
The conductive strip serves as a tap point. The voltage on this tap point will vary proportionally (linear) depending on the location of touch point. But when the ribbon sensor is touched at both ends, it almost short circuits the supply. And when the ribbon is not touched, the tap point is floating:
R1) to the 2 end-terminals of the sensor allows to read more information from the sensor:
OutAwill measure VDD (supply voltage) in this case.
When touched at one spot there are two independent resistive dividers formed.
Or unfolded schematic:
The resistive divider that makes up the voltage of
RA. The value of
RA is linear
proportional to the distance of the touch point to the left side of the ribbon
sensor. We can equate the voltage on
When the ribbon is touched on two places, the same equations are still valid.
But the sum of
RB is no longer the total
resistance of the resistive tape:
Adding a finger in between the previous two touches does not affect the
Resistors between two points at the same voltage (here: ground to ground) do not do anything.
So now we have a ribbon sensor in a circuit where we can measure a voltage that depends solely on the leftmost and the rightmost contactpoint.
VOutA * (R1 + RA) = VDD * RA
VOutA * R1 + VOutA * RA = VDD * RA
VOutA * R1 = VDD * RA - VOutA * RA
VOutA * R1 = (VDD - VOutA) * RA
VOutA * R1 / (VDD - VOutA) = RA
RA = VOutA * R1 / (VDD - VOutA)
RB = VOutB * R2 / (VDD - VOutB)
What value do we take for
There is no reason to take different values for
that would break symmetry.
The maximal voltage we can find on
outA is when the ribbon is
actuated at the rightmost position, meaning
RA = RT. This voltage
should not be too low, since the A/D converter measures the range from 0V (GND)
to 5V (VDD) (VDD could also be a different voltage but that does not make any
difference) is divided in, say, 1024 steps (for a 10-bit Analog-to-Digital
converter). If the maximum voltage on
outA is only 5% of
we can measure only 51 different steps. This keeps us from using a very large
On the other side, if we take a very small resistance for
R2, half of the voltage travel will occur in a small zone of the
ribbon near the terminals.
If both distances add up to the total length of the ribbon, we know that there is only one touchpoint. However this is not completely correct: a single touchpoint will have a non-zero width. But an acceptable threshold can be found to separate the two touchpoints situation from one touchpoint situation.
Lets assume that you have your ribbon sensor connected to pure data via some kind of interface (arduino, wisebox, roll your own ...). The ground of the interface is connected to the conductive strip, the two ends of the resistive strip both connected to an analoge-to-digital conversion input and a resistor to the supply voltage. You are getting the data into pure-data, how exactly depends on the type of interface used. Better resolution than 7bit MIDI is strongly recommended.
Now, let's patch the conversion from voltage to linear distance. Remember this equation derived above:
RA = VOutA * R1 / (VDD - VOutA)
Let's forget the standard units (ohms, volts), we can do that if we use the same 'new' unit everywhere. Lets express voltage in Analog-to-Digital conversion units (1023 units is 5V for arduino).
RA = VOutA * R1 / (1023 - VOutA)
R1 is constant. If we use the expression
[expr $f1 / (1023 - $f1)] we
obtain a value that is proportional to
RA. And remember
is proportional to the length of the corresponding piece of resistive tape. If
untouched, outA is at VDD, so this expression will give 1023 / (1023 -
1023)! A division by zero occurs... It's wide to prevent this from happening.
Using the expression
[expr $f1 / (1023.1 - $f1)] will give a small
error when touched, and a very large but finite value (10230) when untouched.
The same expression can be used for the other side. But this time the zero point is on the other side of the ribbon.
Similar constructions can be made in Max or other environments, but remind that you should suffix all numbers here with a point, otherwise Max will do integer (whole numbers) math, giving undesired rounding effects.
Now you can start exploring connecting the outputs to sound.
Small excercise: connect the leftmost touchpoint distance to the frequency of a square-wave oscillator, and the rightmost distance to the cutoff of a resonant low-pass filter. Mute the oscillator when there is no touch. The filter will now always be tuned at or above the fundamental frequency of the squarewave - there is nothing to filter below the fundamental anyway. Now you can play filter-swept ribbon-theremin. Maybe quantize the pitch to a nice scale. Use a few buttons to select different scales. A new no-guitar hero is born!