0

FSR showing consistently a value of above 10% (range 10% - 1
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

FSR showing consistently a value of above 10% (range 10% - 1

by Spurious on Wed Jan 09, 2019 7:56 am

Hi there Adafruit team,

I have purchased several FSRs (and other things). Now, I've set four of them
up and the fourth is reading constant values. I've tried everything (i.e.
changing cables, using the same setup as another sensor that doesn't have
the issue, etc.) and I am not sure if the sensor is faulty or not. I've
removed the strip on the back and glued it to my bed case, so it should be
all flat as well. Is there anything else I could do?

I haven't checked the other four sensors, the three other tested ones are
working well. Summary:
- 3 FSR sensors working as expected
- 1 FSR sensor showing constant value of 10 to 15% (i.e. 0.3 to 0.5V off a
3.3V power source)
- 4 FSR sensors unopened

Order Number : 1909826-1069042372
Item in question: Extra-long force-sensitive resistor (FSR) - Interlink 408

I have taken pictures here:
https://imgur.com/a/CbwFN0r

For reference, the yellow one is not properly functioning. The other one works as expected.
I've had the problem before attaching it to the bed frame and thought the straightness might remove the faulty sensor readings, but it didn't.

Is there anything else I could try?

This is the Python code I am using:
Code: Select all | TOGGLE FULL SIZE
from gpiozero import MCP3008
import time
import datetime

print("Script started")
# white -  Kopf rechts aussen
adc0 = MCP3008(channel=0)
# blue -   Kopf rechts innen
adc1 = MCP3008(channel=1)
# green -  Kopf links innen
adc2 = MCP3008(channel=2)
# yellow - Kopf links aussen
adc3 = MCP3008(channel=3)
# unused
adc4 = MCP3008(channel=4)
# unused
adc5 = MCP3008(channel=5)
#unused
adc6 = MCP3008(channel=6)
#unused
adc7 = MCP3008(channel=7)

datestamp = datetime.datetime.now().strftime("%Y%m%d")
logFile = open("/home/pi/analogreading/logs/" + datestamp + ".txt", "a")

while (1):
   print('WHITE--KRA--', '{:.4f}'.format(adc0.value), '{:.2f}'.format(adc0.value * 1023), '{:.2f}'.format(adc0.value * 3.3), datetime.datetime.now(), file=logFile)
   time.sleep(0.25)
   print('BLUE---KRI--', '{:.4f}'.format(adc1.value), '{:.2f}'.format(adc1.value * 1023), '{:.2f}'.format(adc1.value * 3.3), datetime.datetime.now(), file=logFile)
   time.sleep(0.25)
   print('GREEN--KLI--', '{:.4f}'.format(adc2.value), '{:.2f}'.format(adc2.value * 1023), '{:.2f}'.format(adc2.value * 3.3), datetime.datetime.now(), file=logFile)
   time.sleep(0.25)
   print('YELLOW-KLA--', '{:.4f}'.format(adc3.value), '{:.2f}'.format(adc3.value * 1023), '{:.2f}'.format(adc3.value * 3.3), datetime.datetime.now(), file=logFile)
   time.sleep(0.25)


Sample output (yellow sensor = faulty):
Code: Select all | TOGGLE FULL SIZE
GREEN--KLI-- 0.0034 3.50 0.01 2019-01-09 00:17:43.879921
YELLOW-KLA-- 0.1295 132.44 0.43 2019-01-09 00:17:44.134790
WHITE--KRA-- 0.0151 15.49 0.05 2019-01-09 00:17:44.390300
BLUE---KRI-- 0.0054 5.50 0.01 2019-01-09 00:17:44.645369
GREEN--KLI-- 0.0034 3.50 0.01 2019-01-09 00:17:44.900301
YELLOW-KLA-- 0.1304 133.43 0.43 2019-01-09 00:17:45.155180
WHITE--KRA-- 0.0151 15.49 0.05 2019-01-09 00:17:45.410762
BLUE---KRI-- 0.0044 5.50 0.02 2019-01-09 00:17:45.665822
GREEN--KLI-- 0.0034 3.50 0.01 2019-01-09 00:17:45.920591
YELLOW-KLA-- 0.1304 133.43 0.43 2019-01-09 00:17:46.175628
WHITE--KRA-- 0.0151 15.49 0.05 2019-01-09 00:17:46.431045
BLUE---KRI-- 0.0044 5.50 0.01 2019-01-09 00:17:46.687566
GREEN--KLI-- 0.0034 3.50 0.01 2019-01-09 00:17:46.942023
YELLOW-KLA-- 0.1304 133.43 0.43 2019-01-09 00:17:47.196588
WHITE--KRA-- 0.0151 15.49 0.05 2019-01-09 00:17:47.451428
BLUE---KRI-- 0.0005 5.50 0.03 2019-01-09 00:17:47.706317
GREEN--KLI-- 0.0034 3.50 0.01 2019-01-09 00:17:47.963197
YELLOW-KLA-- 0.1304 133.43 0.43 2019-01-09 00:17:48.218323
WHITE--KRA-- 0.0151 15.49 0.05 2019-01-09 00:17:48.473743
BLUE---KRI-- 0.0054 4.50 0.01 2019-01-09 00:17:48.728750
GREEN--KLI-- 0.0034 3.50 0.01 2019-01-09 00:17:48.983618
YELLOW-KLA-- 0.1304 133.43 0.43 2019-01-09 00:17:49.238656
WHITE--KRA-- 0.0151 15.49 0.05 2019-01-09 00:17:49.494143
BLUE---KRI-- 0.0054 5.50 0.01 2019-01-09 00:17:49.749101
GREEN--KLI-- 0.0034 3.50 0.01 2019-01-09 00:17:50.003975
YELLOW-KLA-- 0.1304 133.43 0.43 2019-01-09 00:17:50.259003
WHITE--KRA-- 0.0151 15.49 0.05 2019-01-09 00:17:50.514497
BLUE---KRI-- 0.0044 4.50 0.00 2019-01-09 00:17:50.769366


Thanks a lot

Spurious
 
Posts: 5
Joined: Mon Jan 07, 2019 10:33 am

Re: FSR showing consistently a value of above 10% (range 10%

by franklin97355 on Tue Jan 15, 2019 8:21 pm

Go ahead and test the others. Let me know what you find.

franklin97355
 
Posts: 19728
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: FSR showing consistently a value of above 10% (range 10%

by Spurious on Tue Jan 15, 2019 8:23 pm

Ok, will do and report back! I am currently on vacation, so I won't be able to report back for all sensors before the end of January. I have two sensors with me on vacation though and can test them soon.

Spurious
 
Posts: 5
Joined: Mon Jan 07, 2019 10:33 am

Please be positive and constructive with your questions and comments.