Excel Spreadsheet for Sensors
For those that may be interrested, I have developed an Excel spreadsheet to calculate the output of linear sensors. This is only for resistive sensors with a direct linear response. Example is a fuel level sensor, as fuel level goes up, the resistance goes up in a linear relationship. It is designed for the basic circuit, 5VDC to a fixed resister then to the sensor then to ground. You input the min and max resistance of the sensor, the min and max value the sensor will measure, (psig, or whatever) and the value of the series resister. It assumes the unit will be calibrated to read the min value at the min resistance and the the max value at the max resistance. You can then see where the output will be inaccurate. Note that unless a constant current source is used, the reading WILL be inaccurate. You really want the circuit to imitate a constant current source. To imitiate a constant current source the series resister should be as large as possible as compared to the max resistance of the sensor. I plan on using a series resister 5 times the value of the max resistance of my sensors.
You can try different resister values for your sensor and see just how the accuracy is effected. I even graphed the results.
The fields you should not mess with are locked (easly unlocked in excel). The colored cells are where you input your values. The spreadsheet has my last sensor loaded so you can see how I inputed my values. The fuel level sensor has 35 ohms with the tank empty (0%) and 240 ohms with the tank full (100%). A 1000 ohm series resister is used.
I don't know how to post the spreadsheet, so if anyone wants it just email me at [email protected]. The file is 18 Kb.