FlexiForce sensors and MCP6002 OpAmp

Hello all! New to the Arduino world here, and hitting a small speedbump, hoping for some assistance. Yes, I searched, didn't find anything helpful.

I am making a system to monitor how full my Keg and CO2 canister are, and display this on a LCD screen. It also monitors temperature, and light (so it can power off the LCD when the fridge door is closed). I chopped out the code so I'm only playing with the flexiforce sensors and the LCD. I have wired up the OpAmp and Sensors in the way the datasheet from the FlexiForce manufacturer recommend, but no matter how much pressure I put on the sensor, the display always reads 0. Even in the raw for in the Serial window output. Here is how mine is wired:

And here is the code:

#include <SoftwareSerial.h>
#include <OneWire.h>

int kegSensorPin = A0;
int coSensorPin = A2;

SoftwareSerial lcdSerial(4,3); // pin 2 = TX, pin 3 = RX (unused)

void setup() {
  Serial.begin(9600);
  lcdSerial.begin(9600);

  delay(500); // wait for screen to clear
}

void clearLcd(){
  lcdSerial.write(0xFE);   //command flag
  lcdSerial.write(0x01);   //clear command.
}

void initLcd() {
  clearLcd();
  lcdSerial.write(254); // move cursor to beginning of first line
  lcdSerial.write(128);
}


void loop(){

  initLcd();

  float rawKegWeight = analogRead(kegSensorPin);
  float rawCoWeight = analogRead(coSensorPin);

  //   THIS SECTION FOR DEBUG PURPOSES
  
   Serial.print("Keg: ");
   Serial.println(rawKegWeight);  
   Serial.print("CO2: ");
   Serial.println(rawCoWeight);  
   

  //The math here will need to be modified to reflect 100 for full
  //and 0 for empty.  For now it's a percentage of all on or all off.
  int kegWeight = rawKegWeight * (100.0 / 1023.0);
  int coWeight = rawCoWeight * (100.0 / 1023.0);

  lcdSerial.print("Keg: ");
  lcdSerial.print(kegWeight);
  lcdSerial.print("%");

  lcdSerial.write(254); 
  lcdSerial.write(192); // move to second line
  lcdSerial.print("CO2: ");
  lcdSerial.print(coWeight);
  lcdSerial.print("%");

  delay(1000);

}

And here are the diagrams as given by the manufacturer on the datasheets:

As you can see, the voltage divider circuit as provided by FlexiForce is different than the opamp. I've built it both ways. The way I show in the drawing outputs 0. The way the OpAmp manufacturer suggests makes the output jump to 100 (1023). I'm no EE, so I might have wired this up wrong, but I'd love any input. I have a multimeter, but I'm not sure what to look for, because in either way I've wired it up I get 0v or 5v as output.

Thanks for the help!

Your hardware setup is wrong.

The way you built it, you have an inverting amplifier, so the output will (theorerically) always be below 0V. In practice, this is impossible because the output of the opamp can't go below 0V in your setup.

The suggested schematic might work, depending on what voltage you used as Vref.

Thanks. I need to build non-inverting, so I'll change that, that's simple enough. I should be able to figure out what resistor to use in Rf using math. If not, I'll be back here.

Let me explain further what I had built.
What I had done was just built a standard voltage divider circuit for each of the FlexiForce resistors, and for some reason adding weight to one, was affecting the voltage output of the other, it would read higher. To fix this I put the opamp in, basically just dropped it in. Which is why Rf is 1Mohm (same resistance as the FlexiForce with no weight on it).

If anyone has a better way to fix that problem I'd love to hear.

The FlexiForce can take a positive voltage as input. Here is the full users manual:

And here is a Sparkfun tutorial:
https://www.sparkfun.com/tutorials/389

In that tutorial, the FlexiForce is used as a second resistor in a voltage divider circuit. However, when you have two voltage divider circuits, you get voltage bleedover from one to the other. Not sure why, but it was happening. So I dropped in the opamp.

I changed my initial design from inverting to a non-inverting. so now my readout is 100% (or 1023), I have to do some prodding with the multimeter, but I'm sure I'll be back.

Thanks.