3

I recently bought a ribbon sensor (the one displayed here), with the intention to use it as a touch-enabled music instrument.

I used it correctly (so it seems), but I have two issues :

  • When not pressed, the sensor seems to give random data, as if nothing was plugged to the pin.
  • When unpressed, the resistance slowly decreases (and so is my sound pitch). Is that a normal behaviour ?

I don't know how to solve both issues. Has anyone an idea ?

A tinker of my test (Currently corrected thanks to @VE7JRO) can be seen here with my code here (The ribbon is replaced by a potentiometer but the principle remains the same). The code is also Available on GitHub.

  • The instructions on Adafruit say "When no pressure is applied, the middle pin floats, so be sure to use some sort of weak pull-up, such as 100K ohm.". Have you connected it to your Arduino using all of the "To use" directions? – VE7JRO Mar 18 '18 at 20:59
  • I didn't quite understood this instruction (English is not my first language), so it should work with a 100kohm resistor between the middle pin and the reading pin ? – Marc Brillault Mar 18 '18 at 21:07
3

The Adafruit website says this:

There is a nominal 10K resistance across the two outer leads. The middle pin resistance with respect to either of the outer pins changes depending on where on the strip one presses. When no pressure is applied, the middle pin floats, so be sure to use some sort of weak pullup, such as 100K ohm.

To use Connect one side pin to ground via a 10K resistor in series. Connect the other side pin to your Vcc power line (3V, 5V etc) via a different 10K resistor in series. Then read the analog voltage on the center pin. It will range from 1/3 Vcc to 2/3 Vcc . Do not connect to Ground and Power directly!

Here is a diagram of how I would connect it to a 5V Arduino Uno.

enter image description here

  • Yes, it works, thanks ! I didn't understood where to put this resistor first. – Marc Brillault Mar 19 '18 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.