Problem with Softpot Ribbon sensors

Hi,

I'm designing a noiseless violin.

I'm trying to read the value of two Softpot Ribbon Sensors (purchased at Sparkfun) using A0 and A1 as analog inputs.
I have detected two troubles:

  1. It seems the sensors have an offset ( when not pressed they should give about 0, but I read 400). They are new, never used.

  2. When I press one sensor, the other seems to be affected as well.

I attach the wiring and the program I use.

Thanks in advance for any suggestion.

Regards,
Alex


So follow the Sparkfun guide to wire your sensor. It's asking 10k pulldown resistor to prevent the sensor floating.

Not true, it will only give 0 when the 0 end of the pot is pressed.
As @kmin suggested they require a resistor between the wiper (center pin) and ground to read 0 when not pressed. However, that will now make the response non-linear, not good if you are trying to simulate a violin

Hi, @asalgad2
Welcome to the forum.

It will also show you how to post your code.

Try this.

int value1 = analogRead(A0);
int value1 = analogRead(A0);
int value2 = analogRead(A1);
int value2 = analogRead(A1);

The ADC multiplexer needs time to read and acquire the analog input value selected.
By reading the the input twice, this gives the ADC the time to acquire the newer value.

Tom.. :smiley: : :+1: :coffee: :australia:

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