PROBLEM WITH ARDUINO CODE

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
lmgarcia8
 
Posts: 3
Joined: Mon May 31, 2021 5:23 am

PROBLEM WITH ARDUINO CODE

Post by lmgarcia8 »

I'm doing an university proyect with force sensor. I have been seeing your articles and they all are so interesting.
I have a question for you in this article:

https://learn.adafruit.com/force-sensit ... ing-an-fsr

In the code in wich you calculated the force in Newtons, you put this:
// Use the two FSR guide graphs to approximate the force
if (fsrConductance <= 1000) {
fsrForce = fsrConductance / 80;
Serial.print("Force in Newtons: ");
Serial.println(fsrForce);
} else {
fsrForce = fsrConductance - 1000;
fsrForce /= 30;
Serial.print("Force in Newtons: ");
Serial.println(fsrForce);
}

And I don't know where you get this value "fsrForce = fsrConductance / 80;"
and this one "fsrForce /= 30;"
¿Can you help me?
Thank you very much, I congratulate you for your work!

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: PROBLEM WITH ARDUINO CODE

Post by blnkjns »

I think the values originate in the FSR datasheet:
https://www.adafruit.com/product/166#description
If you look at the graph, it has a kink in the line. It probably deals with the section before and after the kink.

User avatar
lmgarcia8
 
Posts: 3
Joined: Mon May 31, 2021 5:23 am

Re: PROBLEM WITH ARDUINO CODE

Post by lmgarcia8 »

I guess that graph will be different for each sensor.
I have bought this sensor

https://es.aliexpress.com/item/32960696 ... web201603_

and I need to change those values ​​that I mentioned before so that my project can work, but I cannot understand the graph, since the one they provide me in the place where I bought it is not logarithmic
Attachments
Imagen1.png
Imagen1.png (87.96 KiB) Viewed 334 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”