A Simple Method For Calibration of Temperature Sensor DS18B20 Waterproof in Oil Bath Based On Arduino Data Acquisition System
A Simple Method For Calibration of Temperature Sensor DS18B20 Waterproof in Oil Bath Based On Arduino Data Acquisition System
A Simple Method For Calibration of Temperature Sensor DS18B20 Waterproof in Oil Bath Based On Arduino Data Acquisition System
A simple calibration methods of relative humidity sensor DHT22 for tropical climates based on
Arduino data acquisition system
AIP Conference Proceedings 2062, 020009 (2019); https://doi.org/10.1063/1.5086556
© 2019 Author(s).
A Simple Method for Calibration of Temperature Sensor
DS18B20 Waterproof in Oil Bath Based on Arduino Data
Acquisition System
R. A. Koestoera), Y.A. Saleh, I. Roihan, Harinaldi
Heat Transfer Laboratory, Department of Mechanical Engineering, Faculty of Engineering, Universitas Indonesia
Kampus Baru – UI, Depok, 16424, Indonesia
Abstract. The combination between DS18B20 Waterproof temperature sensor and Arduino has been recently used as a
data acquisition (DAQ) system on a temperature measurement for its user-friendly and relatively affordable price.
Arduino can be a valid data acquisition device if the sensor is perfectly calibrated. This research proposed a calibration
method for a temperature sensor DS18H20 Waterproof based on Arduino Uno using a thermometer calibrator ASTM
117C which value could be traced by a calibration medium of oil in an open surface bath. The election of oil as the
medium is aimed to reduce its conditional instability so that the calibration could be done. There are 12 arranged
DS18B20 waterproof sensors that will be calibrated alongside the ASTM 117C calibrator so that all the measurement
points have the exact identical conditions. Such a system was done for having the small deviation characteristics between
the oil temperature measured on the DS18B20 Waterproof sensor to the ASTM 117C mercury thermometer. The small
deviation characteristics that presented as a linear equation is obtained by using a linear regression method. Calibration
was done by using the ambient temperature as the energy to calibrate the sensors. The movement of ambient temperature
will cause temperature slowly movement response on the medium (oil) and resulted a measurement points. DS18B20
waterproof sensors resulted a mean error of ± 3.00 % before calibration begun. Meanwhile after the calibration using the
proposed method, the DS18B20 sensor has a smaller mean error of ± 0.85 %, so that obtained a more accurate sensor and
it can be used for testing of Grashof Portable Incubator made by University of Indonesia.
INTRODUCTION
Temperature is one of the main parameters in a baby incubator. In this research, the author made data acquisition
system for temperature measurements based on Arduino combined with DS18B20 Waterproof temperature sensors.
Arduino has good reliability, robustness, stable connection, low price and can be used as a system control from
various levels of system complexity [1]. Arduino can be a valid acquisition data device if the sensor is properly
calibrated [2]. Researchers have used a combination of DS18B20 Waterproof sensors with Arduino because of their
easy use and relatively inexpensive device prices. Nevertheless, not many know the effect of the error level
generated by the sensor. In case of measurements with small measurement range, the error value will have a
significant effect, such as on a baby incubator that has a working range 3Ԩ- 4Ԩ. Therefore, calibration method is
proposed to calibrate the DS18B20 Waterproof sensor using oil bath with ASTM 117C thermometer calibrator that
has better accuracy and precision. This calibration method aims to reduce error level of DS18B20 Waterproof sensor
by using oil bath as a calibration medium compared to ASTM 117C thermometer. With the results of calibration, a
sensor that has better accuracy can be obtained. therefore it can create a cheap data acquisition with a trustworthy
error value [3].
020006-1
METHODOLOGY
Materials
DS18B20 Waterproof sensor operates in range of temperature -55 °C to +125 °C with ± 0.5 °C error at -10 °C to
+ 85 °C and has an 0.0625 °C acurracy [4]. Linear scale of voltage and temperature of the sensor is +10.0mV/° C
[5]. While ASTM 117C thermometer that used as a calibrator has 23.9oC - 30.1oC measurement range with a 0.01
O
C accuracy. Data retrieval is carried out in two different places in order to maximize the measurement range of
ASTM 117C considered as true value. First research site`s in Depok, West Java, the measured oil conditions were
25 ° C-30 °C., then data collection is carried out in Lembang, Bandung which has a lower ambient temperature in
order to reach the lowest temperature ASTM 117C. After data collection, oil conditions were found in all ASTM
117C measurement ranges. Data collection time in this research can be done at any time and not limited to weather
conditions. Changes on temperature movements of this environment will affect oil temperature and obtain
measurement points.
Calibration Tool
In this research, the author conducted 3 main stages of research, namely stage of making a calibration tool,
calibration process, and analyzing calibration results. First, the author makes a research apparatus to collect data.
The calibration tool is arranged as follows:
Bath
Oil
Calibration Process
The measured data is the temperature of DS18B20 Waterproof sensor automatically carried out by Arduino
instead of ASTM 117C and environmental temperature were carried out manually. Date and time of data retrieval
also need to be noted therefore data collection has the same measurement conditions. The error values between the
sensor and the calibrator will be obtained from those data. Error characteristic was expressed by linear equation
020006-2
obtained from regression. After that, the regression line equation is analyzed by showing the uncertainty parameters
such as deviation, confidence interval and coefficient of determination [7]. These parameters serve to express and
assess whether the calibration method can be accepted scientifically.
RESULTS
Measured temperatures of DS18B20 Waterproof sensors were not same each other even though those just been
purchased and have the same specifications and manufacturer. Difference in temperature readings from those 12
sensors will then be combined to find measurement deviations that represent DS18B20 Waterproof sensor in
general. Of all measurements that have been made, there is 0.31 ° C - 0.82 ° C measurement deviations between
020006-3
sensors. In addition, from FIGURE 2 can be analyzed that measured temperature between sensor and thermometer
also have a difference or error. Error value shown by RMS error in percent (%) is the percentage of the root of the
average square of the difference in the value of the temperature measurement by the DS18B20 sensor and ASTM
117C. The value of RMS error before calibration is 3.00% and will be compared with the value RMS error after
calibration.
020006-4
TABLE 1. Regression Parameters
After obtaining and assessing the regression equation which is the equation of the DS18B20 Waterproof sensor
deviation characteristics to ASTM 117C thermometer, then regression equation was used to get calibration
equation9. Calibration equation to modify the output value of the DS18B20 Waterproof sensor using the inverse
principle. This will process the output value read by sensors before it is displayed on the computer, so that
temperature can close to the value thermometer which is trusted as true value or TDS18B20 = TASTM. After that
calibration equation written on the program and uploaded to Arduino then performing calibration command.
Furthermore collecting data to assess the success of calibration method.
020006-5
Figure 4. is measurement of data after calibration then will be compared to the deviation value and error before
calibration carried out. From data retrieval before and after calibration can be compared the deviation between 12
sensors. Deviation between each sensors before calibration has a range of 0.31 ° C - 0.82 ° C. While after calibration
this is reduced to 0.23 ° C- 0.42 ° C. From these results can be analyzed that the range of temperature measurement
spread by the sensor is tighter, so that it can be concluded that a more precise sensor is obtained. Deviation between
the sensors also decreases up to 0.23 ° C which means that the sensor measurements are more accurate or close to
the true value. Therefore, calibration can get a more precise and accurate sensor.
020006-6
TABLE 2. Regression Parameters Comparison
For the determination coefficient of linear regression model from the two processes of measuring data before and
after calibration close to a value of 1 is considered suitable to be able to explain the deviation characteristics of
DS18B20 Waterproof sensor to thermometer ASTM117C. Therefore, the two characteristics of the data that is
before calibration and after calibration can be used and then compared.
From TABLE 2 standard error estimation (sy,x) decreases, standard error estimation is a value that shows the
distribution of taken data from regression line. So that, it can be said that sensors to be more precise because data
distribution is closer to the regression line. Data distribution value after calibration drops by 48.25% from before.
The downfall %deviation value of all parameters indicates that DS18B120 sensor after calibration has a better level
of precision compared to before calibration carried out.
CONCLUSION
This research aims to determine the deviation characteristics of DS18B20 Waterproof sensor to ASTM 117C
thermometer with the proposed method. This method can be used to calibrate the sensor. From the results obtained
characteristics of DS18B20 Waterproof Deviation generally is TDS18B20 = 1.0519ASTM - 2.155. Characteristic
equations are considered acceptable because the deviation of all regression parameters are below 5%. The proposed
calibration method can reduce the RMS error between sensor and thermometer from 3.00% down to 0.85% after
calibrating and reducing the error range between DS18B20 Waterproof sensors from 0.31 ° C - 0.82 ° C down to
0.23 ° C - 0.42 ° C. This calibration method with arduino-based can produce sensors with increased accuracy and
precision. so that obtained a more accurate sensor to be used in testing of Grashof Portable Incubator made by
University of Indonesia.
ACKNOWLEDGEMENTS
This work is supported by Hibah PITTA 2018 funded by DRPM Universitas Indonesia No.
233/UN2.R3.1/PPM.00/2018.
020006-7
REFERENCE
1. M. Matijevic and V. Cvjetkovic, "Overview of architectures with Arduino boards as building blocks for data
acquisition and control systems," in 2016 13th International Conference on Remote Engineering and Virtual
Instrumentation (REV), 2016.
2. A. D'Ausilio, Arduino: A low-cost multipurpose lab equipment, vol. 44, 2012, pp. 305-313.
3. M. A. P. Pertijs, A. L. Aita, K. A. A. Makinwa and J. H. Huijsing, "Low-Cost Calibration Techniques for
Smart Temperature Sensors," IEEE Sensors Journal, vol. 10, no. 6, pp. 1098-1105, 2010.
4. Maxim Integrated, "DS18B20 Data Sheet," 2015. [Online]. Available:
https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf. [Accessed 22 June 2018].
5. J. Egwaile, O. Omoioifo, O. Odia and O. Okosun, "Development of a real time blood pressure, temperature.,"
International Journal of Physical, pp. 225-232., 2016.
6. M. G. Ali, "A Simple Method for the Calibration of an Open Surface Water Bath," IOP Conference Series:
Materials Science and Engineering, vol. 51, no. 1, p. 012015, 2013.
7. D. C. Montgomery, E. A. Peck and G. G. Vining, Introduction to Linear Regression Analysis, John Wiley &
Sons, 2012, p. 645.
8. N. J. D. Nagelkerke, "A Note on a General Definition of the Coefficient of Determination," Biometrika, vol.
78, no. 3, pp. 691-692, 1991.
9. V. Barwick, "Preparation of Calibration Curves (A Guide to Best Practice)," 2003.
020006-8