Tuesday 14 June 2011

Temperature sensor calibration.

For measuring temperature we need to familiarize ourselves with principles of sensor's work. We used approach of trial and error mixed with least-squares method.

We measured the temperature of various media such as environment air, cold water, hot water, human body and so on. We created a script that puts the measured values on the LCD of the brick.

We found out that values are measured and displayed in hexadecimal format. Therefore we had to use conversion of datatypes.

Next, we needed to calibrate sensor. The value obtained by sensor and values measured by thermometer was compared and put on to x-y graph. Then we made an assumption that function is linear. So the function should look like alpha+beta*sensor_value. So the task is to find alpha and beta. After some trial and errors we found out that formula is 113.78-0.002457*SENSOR_3

No comments:

Post a Comment