Hi,
I'm a complete and utter novice when it comes to these kind of things. I'm trying to use a Flexiforce (100lbs) pressure sensor to monitor pressure in mmHg for a fabric tourniquet.
I'm falling down at the most basic step: http://www.tekscan.com/pdf/FLX-Flexiforce-Calibration-QuickStart.pdf
I've plotted my pressure in mmHg against resistance, and have a decently linear conductance output. Now that's all well and good but what do I do with that information to change my code to calibrate it?
Here is my code:
// Flexiforce quick start example
// Reads A0 every 100ms and sends voltage value over serial
void setup()
{
// Start serial at 9600 baud
Serial.begin(9600);
}
void loop()
{
Serial.print("Time: ");
float time = millis()/1000;
Serial.println(time);
// Read the input on analog pin 0:
int sensorValue = analogRead(A1);
float width = 0.18;
float length = 0.0254* 9; //Tourniquet measurement in meters
float area = width*length;
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
//float voltage = sensorValue * (5.0 / 1023.0);
//Max mmHg (length 25') = 152, 110lbs
float forceLbs = (sensorValue) *(5/1023.0)*20;
//To calibrate: (sensorValue)*(5/1023)*y/x if linear
float forceNewton = forceLbs*4.448221628254617;
float pressurePascal = forceNewton/area;
float pressuremmHg = pressurePascal*0.00750061683;
// Print out the value you read:
Serial.print("Force: ");
Serial.println(forceNewton);
Serial.print("Sensor value: ");
Serial.println(sensorValue);
//Serial.println(pressurePascal);
//Serial.println(pressuremmHg);
Serial.print("pressuremmHg: ");
Serial.println(pressuremmHg);
delay (3000);
}
And attached is a screenshot of my results and graph:
Please answer me as though I was a complete idiot. I would really appreciate it! Thank you
