From my earlier question I was able to wire up 2 SEN-10245 weight sensors (each forming one half of a wheatstone bridge) with an AD620 InAmp & 47 Ohm resistor (to set the gain to ~1000). I then ran the signal through the MCP3008 Analog to Digital Converter and finally to my Raspberry Pi.
Now that I have everything wired up, I am seeing some strange behavior when applying pressure to the weight sensors.
When applying small amounts of pressure (a soda can, for example) the sensor reading rises ~15%. However, if I really push on the sensor it drops anywhere from 30-60%. Why is this?
The end goal is to detect individual soda cans on a shelf; is there anything I can do to my circuit to modify the sensitivity or increase accuracy?
Please note that Vref on the InAmp currently has no voltage source
The pictures below illustrate my current setup:
Python script for reading values from the ADC:
import spidev
import time
spi = spidev.SpiDev()
spi.open(0,0)
# read SPI data from MCP3008 chip, 8 possible adc's (0 - 7)
def readadc(adcnum):
if ((adcnum > 7) or (adcnum < 0)):
return -1
r = spi.xfer2([1,(8+adcnum)<<4,0])
adcout = ((r[1]&3) << 8) + r[2]
return adcout
# weight sensor connected to adc#0
weight_adc = 0
while True:
weight = readadc(weight_adc)
print "weight:", weight
time.sleep(1)