Expand description
§Softpot resistive ribbon controller
Spectra Symbol and others make resistive linear position sensors which may be used as ribbon controllers.
Users play the ribbon by sliding their finger up and down a resistive track wired as a voltage divider.
The position of the user’s finger on the ribbon is represented as a number. The farther to the right the user is pressing the larger the number. The position value is retained even when the user lifts their finger off of the ribbon, similar to a sample-and-hold system. Some averaging is done to smooth out the raw readings and reduce the influence of spurious inputs.
Whether or not the user is pressing on the ribbon is represented as a boolean signal.
The position value and finger-down signals are then typically used as control signals for other modules, such as oscillators, filters, and amplifiers.
§Inputs
- Samples are fed into the ribbon controller
§Outputs
-
The average of the most recent samples representing the position of the user’s finger on the ribbon
-
Boolean signals related to the user’s finger presses
§Note about the hardware
The intended hardware setup can be seen here
Referencing the schematic image linked above:
The ribbon is wired as a voltage divider between ground and a positive reference with a small series resistor R1
between the top of the ribbon and the positive ref. When the user is not pressing the ribbon the wiper is open
circuit. In order to detect finger presses pullup resistor R2
is placed from the wiper to the positive reference.
With this setup, we can tell if the ribbon is not being pressed because R2
pulls all the way up to the maximum
value. However, when a person is pressing the ribbon the maximum value is limited by the small series resistor R1
and is always lower than the “no finger pullup” value.
Resistor R1
is chosen to be small enough that not too much range is wasted but large enough that we can reliably
detect no-press conditions even with the presence of some noise. Resistor R2
is chosen to be large enough that it
doesn’t bend the response of the voltage divider too much but small enough that the voltage shoots up to full scale
quickly when the user lifts their finger. The opamp buffer is optional, but recommended to provide a low impedance
source to feed the ADC and provide some noise immunity if the ribbon is physically far from the pcb and connected
by long wires.
It is expected that software external to this module will read the ADC and convert the raw integer-based ADC value
into a floating point number in the range [0.0, 1.0]
before interfacing with this ribbon module.
Note that this software module has no direct connection to the physical hardware. It is assumed that samples come from to feed the ribbon the specified hardware setup which is sampled by an Analog to Digital Converter, but we could just as easily feed it made up samples from anywhere. This allows us to have some flexibility in using this module with various microcontroller setups. The above schematic snippet and description are included to illustrate one way that this module could be used.
Structs§
- Ribbon
Controller - A synthesizer ribbon controller is represented here.
Functions§
- sample_
rate_ to_ capacity sample_rate_to_capacity(sr_hz)
is the calculated capacity needed for the internal buffer based on the sample rate.