0% found this document useful (0 votes)
63 views11 pages

Design and Implementation of A Digital Thermometer With Clock

termometro

Uploaded by

adolfo martinez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views11 pages

Design and Implementation of A Digital Thermometer With Clock

termometro

Uploaded by

adolfo martinez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/319889725

Design and implementation of a digital thermometer with clock

Article  in  Global Journal of Engineering Research · September 2017


DOI: 10.4314/gjer.v15i1.1

CITATIONS READS
5 147

3 authors, including:

Akinloye Benjamin Aaron Onyan


Federal University of Petroleum Resources Federal University of Petroleum Resources
9 PUBLICATIONS   20 CITATIONS    5 PUBLICATIONS   6 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Automated Security System View project

Analysis of Single Phase Interior Permanent Magnet Machines View project

All content following this page was uploaded by Aaron Onyan on 07 March 2022.

The user has requested enhancement of the downloaded file.


DOI: https://dx.doi.org/10.4314/gjer.v15i1.1
GLOBAL JOURNAL OF ENGINEERING RESEARCH VOL 15, 2016: 1-10
COPYRIGHT© BACHUDO SCIENCE CO. LTD PRINTED IN NIGERIA. ISSN 1596-292x 1
www.globaljournalseries.com; Info@globaljournalseries.com

DESIGN AND IMPLEMENTATION OF A DIGITAL


THERMOMETER WITH CLOCK
BENJAMIN O. AKINLOYE, AARON O. ONYAN AND DONALDSON E. OWEIBOR
(Received 4 May 2016; Revision Accepted 17 August 2016)

ABSTRACT

In this paper, the design of a digital thermometer with clock is presented. The design was achieved
using ATMEGA 328P PU Microcontroller Unit, MLX90614 Infrared Sensor for achieving contactless
measurement (wireless) and the DS1307 Real Time Clock (RTC) for accurate time keeping during the
measurement of this parameter.The MLX90614 is factory calibrated in wide temperature ranges from -
40 ºC to 125ºC for the ambient temperature and -70 ºC to 382.19ºC for object temperature, while the
DS1307 is a low-power clock/calendar with 56 bytes of battery-backed serial random access memory
(SRAM). Power is supplied using a regulated 9 V DC battery. The microcontrollers and RTC chip are
powered by 5 V DC. The temperature sensor and liquid crystal display (LCD) require 3.3 V DC for
operation and are supplied by passing the 5 V DC through a variable resistor. The sensors output
values are both fed into the microcontroller. While monitoring temperature and telling time, the
microcontroller sends the measurements in form of digital signal to the LCDs for display.This design
was compared with a standard infrared thermometer by taking the body temperature measurements of
two individuals at different times of the day. It was observed from the results that the difference between
the temperature readings of the two thermometers ranges from 0 to 1 °C

KEYWORDS: Infrared sensor, digital thermometer, microcontroller, real time clock, temperature.

INTRODUCTION information Engineering. They play an important


role in the medical/patient simulation system
Thermometer is an instrument used in (Péter & Balázs, 2009). With the help of the
measuring the temperature. The name temperature monitoring device, a doctor can get
thermometer is coined from the Greek words a lot of information about the condition of health
thermo, meaning “warm”, and meter, meaning “to of the individual. Patients who pay no attention to
measure”. So thermometers measure their body temperature are easily susceptible to
temperature by using materials that change in contracting diseases/infections as well as some
some way when they are heated or cooled (Saidu kind of sickness. Thus, for a good guarantee of
et al, 2014; Bellis, 2011). Measurement of the patient’s daily life, a monitor designed for
temperature has been a usual process since the measuring the body temperature at a specific
th
early 11 century. Monitoring of temperature of a time is needed.
particular place or system is important so as to Temperature measuring devices are also
monitor the behavior of such a system (Med, used in medical/fitness equipment, human body
2002). temperature monitoring, industrial applications
Temperature monitoring devices are of (e.g. fractional distillation processes), and also in
integrated technology and are found in the area research laboratories, such as chemical and
of electronics, computers, material and chemistry laboratories (Abayomi et al, 2013).
Benjamin O. Akinloye, Department of Electrical and Electronics Engineering, Federal University of
Petroleum Resources, P. M. B. 1221, Effurun, Delta State, Nigeria.
Aaron O. Onyan, Department of Electrical and Electronics Engineering, Federal University of
Petroleum Resources, P. M. B. 1221, Effurun, Delta State, Nigeria.
Donaldson E. Oweibor, Department of Electrical and Electronics Engineering, Federal University of
Petroleum Resources, P. M. B. 1221, Effurun, Delta State, Nigeria.
2 BENJAMIN O. AKINLOYE, AARON O. ONYAN AND DONALDSON E. OWEIBOR
Before this time, temperature has been For regulation to be maintained(Theraja &
measured using analogue meter. This means of Theraja, 2005):
measurement is subjected to error of parallax
during the reading of the measurement. Due to Vi(min) =+7.5 V
the precision requirements of the applications of
a thermometer, there is a need to measure the where Vi(min) is the minimum input voltage to the
quantity digitally in order to eliminate parallax IC voltage regulator.
error. Besides, mercury-in-glass thermometers
were used for temperature measurements only For 7805 voltage regulator, V(out) =5 V.
while separate instruments were required for Thus to maintain the regulated +5 V dc supply
checking the time. Also, mercury-in-glass from the output of the IC regulator 7805, a
thermometers have to be handled with extreme capacitor of more than 100nF and preferably in
care due to their fragile nature (Abayomi et al, the region of 1 to 10uF should always be
2013). Moreover, in recent times, technology has connected across the input terminal and ground
moved from the phase of analogue to digital. with the wiring as short as possible. If the value
Hence, this work focuses on temperature of the output capacitor is too large, it has a
measurement using digital thermometer. It detrimental effect on the regulator’s transient
presents the design and implementation of a response. Between 1 and 10uF is usually a good
digital thermometer with clock to monitor the choice (Filtering Capacitor, 2015).
temperature of a system while also checking the
time/period at which the measurement is made. A decoupling capacitor is a capacitor used to
decouple one part of an electrical network
2. DESIGN METHODOLOGY (circuit) from another. Noise caused by other
This section presents an overview of the design circuit elements is shunted through the capacitor,
calculations for the digital thermometer with reducing the effect it has on the rest of the
clock. circuit.In this design, the value of capacitor used
between the crystal oscillators is 22 pF
2.1. Voltage Regulator (Decoupling Capacitor, 2015).
The voltage supplied by the battery used is 9 V,
but the components in this design require a range 2.2. Liquid Crystal Display
of 3.3 V – 5V so the 7805 voltage regulator was The LCD displays used in this work are the Nokia
used to produce a 5 V output. Since some 5110 LCD and ILI9340 LCD accorrding to the
components require 3.3 V, a variable resistor was design circuit. Figure 1 (a) shows the diagram of
connected in series with the 5 V output to give a the ILI9340 LCD which is used to display time,
3.3 V output. while figure 1 (b) depicts the pin description of
the Nokia 5110 LCD which is used for displaying
the temperature.

(a) (b)

Figure 1: LCD Display: (a) ILI9340 LCD (b) Nokia 5110 LCD Pin Description
DESIGN AND IMPLEMENTATION OF A DIGITAL THERMOMETER WITH CLOCK 3
The ILI9340 LCD works with only 3.3V as the the temperature can be read. Hence they are
voltage value when the digital pins are read as used in digital thermometers (Jose et al, 2014).
high but the voltage value given out as high is The detector used in this design is the Melexis
5V, so in this design a CJMCU TXS0108E High branded sensor, MLX90614, shown in figure 2. It
Speed Full Duplex 8 Way Level Conversion is built from two chips, the infrared thermopile
Module was employed to step the digital pin detector MLX81101 and the signal conditioning
voltage down to the required 3.3V (Integrated ASSP MLX90302, specially designed to process
Circuits, 1999). the output of IR sensor. It was used because it
has an inherently stable response to DC
2.3. Processing Unit radiation, not too sensitive to ambient
The processing unit used in this work is the temperature variations, and it responds to a
ATMEGA 328P microprocessor. It receives broad infrared spectrum which doesn’t require a
analog signals from sensors connected to it and source of bias voltage or current (Engineering
converts these analog signals into digital signals Toolbox, 2015).
which can be displayed by the output unit (Stand The MLX90614 is factory calibrated in
Alone Microcontroller Circuit, 2015). wide temperature ranges from -40ºC to 125ºC for
the ambient temperature and -70ºC to 382.19ºC
2.4. Temperature Sensor (MLX90614) for object temperature. The field of view (FOV) of
Temperature sensors, when interfaced 35º offers an accuracy of ±0.2ºC; it covers any
with a microcontroller, help to convert wavelength from 5.5 μm to 15 μm. However, this
surrounding temperature to digital value so that accuracy is only rated for a range of 2 feet.

.
Figure 2: MLX90614 Temperature Sensor

The signal conditioning ASSP MLX90302 2.5. Time Sensor (DS1307 RTC)
combines a low noise programmable amplifier, a The DS1307 is a low-power
high resolution 17-bit ADC, and a powerful DSP clock/calendar with 56 bytes of battery-backed
unit. Therefore, the MLX90614 can be used in serial random access memory, SRAM
applications as a high accuracy and high (Engineering Toolbox, 2015). The clock/calendar
resolution thermometer. The operation of the provides seconds, minutes, hours, day, date,
signal conditioning MLX90302 is controlled by an month, and year information. The date at the end
internal state machine which controls the of the month is automatically adjusted for months
measurements and calculations of the object and with fewer than 31 days, including corrections for
ambient temperatures. The onboard temperature leap year. The DS1307 operates as a slave
cell is the corresponding ambient temperature device on the I2C bus. Access is obtained by
Ta, and the MLX81101 thermopile cell is the implementing a START condition and providing a
corresponding object temperature To. Both device identification code followed by a register
temperature measurements have a resolution of address. Subsequent registers can be accessed
0.02ºC. Data is read by RAM cells using the sequentially until a STOP condition is executed.
SMBus 2-wire interface or the PWM digital When VCC falls below 1.25 x backup supply
output. For the purpose of design, power, and voltage, VBAT (i.e. 1.25 x VBAT), the device
portability the first method is used. terminates an access in progress and resets the
4 BENJAMIN O. AKINLOYE, AARON O. ONYAN AND DONALDSON E. OWEIBOR
device address counter. Inputs to the device will Moreover, this pin has an auxiliary function for
not be recognized at this time to prevent building an external voltage regulator.
erroneous data from being written to the device While the wiring is straight forward, the
from an out-of tolerance system. When VCC falls software interfacing the wiring between the
below battery voltage VBAT, the device switches MLX90614 and microcontroller is not. The
into a low-current battery-backup mode. Upon standard wiring library doesn’t work for the
power-up, the device switches from battery to MLX90614 because it involves SMBus
VCC when VCC is greater than VBAT +0.2V and compatible 2-wire interface, hence the i2cmaster
recognizes inputs when VCC is greater than 1.25 library was implemented.
x VBAT. The value of the backup supply voltage In the coding part, the data was read
changes with time. from internal RAM where ambient temperature
The DS1307 uses an external 32.768kHz Ta is stored at 0x006 and object temperature To
crystal. The oscillator circuit does not require any is stored at 0x007. With the resolution of 0.02ºC
external resistors or capacitors to operate. If per LSB used, the following forms part of the
using a crystal with the specified characteristics, code to calculate the temperature:
the startup time is usually less than one
second.The accuracy of the clock is dependent tempData = (double)(((data_high & 0x007F) <<
upon the accuracy of the crystal and the 8) + data_low)
accuracy of the match between the capacitive
load of the oscillator circuit and the capacitive Where tempData is data at RAM address 0x007
load for which the crystal was trimmed. Additional of the object temperature To
error will be added by crystal frequency drift
caused by temperature shifts. External circuit tempData = (tempData x tempFactor)-0.01
noise coupled into the oscillator circuit may result
in the clock running fast. Where tempFactor is resolution of MLX90614,
0.02 ºC
2.6. Software Design
The MLX90614 has two SMBus Celsius = tempData - 273.15
compatible communication pins, Serial Data
(SDA) and Serial Clock (SCL). However, the Fahrenheit = (Celsius x 1.8) + 32
DS1307RTC chip used for telling time and the
MLX90614 both make use of the SDA and the Where Celsius is the object temperature in ºC,
SCL pins which lead to the use of two and Fahrenheit is the object temperature in ºF.
ATMEGA328P microcontrollers.
SDA is a digital input and output pin
which is used for both the external PWM module 2.7. Flow Chart of the System
output of the measured object temperature and The design flow diagram in figure 3 shows the
the digital input and output for the SMBus flow of algorithm programmed into the
(System Management). On the other hand, the microcontroller. It illustrates the command given
SCL is only a digital input which is used as the to the chip as input and the output given out.
clock for SMBus compatible communications.
DESIGN AND IMPLEMENTATION OF A DIGITAL THERMOMETER WITH CLOCK 5

START

MICROCONTROLLER
PIN

READ ADC PINS

PRINT ADC VALUES

DISPLAY ADC VALUES

Figure 3: Flow chart of the system

2.8. Mode of operation of a body while the RTC is used to tell time. The
Power is supplied into the system by a 9V DC sensors output values are both fed into the
battery which is then passed through a voltage microcontroller. While monitoring temperature
regulator to give a 5V DC output. The 5V DC is and telling time, the microcontroller sends the
used to power the microcontrollers and RTC measurements in form of digital signal to the LCD
(Real Time Clock) chip. The temperature sensor for display.The LCD displays the temperature
and LCD display use 3.3V DC for operation and parameters measured and tells time continuously
this voltage was supplied by passing 5V DC until a fault occurs.The circuit diagram of the
through a variable resistor. The MLX90614 is a digital thermometer with clock is shown in figure
temperature sensor used to tell the temperature 4.
6 BENJAMIN O. AKINLOYE, AARON O. ONYAN AND DONALDSON E. OWEIBOR

Figure 4: Circuit Diagram of Digital Thermometer with Clock

3. IMPLEMENTATION microcontroller chip which works with C


Implementation of this design was carried out in programming language. The temperature and
three stages: software simulation, breadboard time source codes were written in C
implementation and Vero board implementation. programming language, compiled and burned
After the design was done, the circuit was into the microcontroller. The simulation was
simulated using Proteus version 7. This was carried out in the Proteus environment using
achieved using an open source prototyping voltage as input to the temperature sensor, while
platform called Arduino. The ArduinoUNO Rev3 push buttons (tactile switches) were used to set
board used is equipped with Atmega 328P-P the time. The output of the temperature sensor is
DESIGN AND IMPLEMENTATION OF A DIGITAL THERMOMETER WITH CLOCK 7
o o o
processed by the microcontroller and displayed 0.99 C, 2 C and 11 C respectively. This
on the NOKIA 5110 LCD as temperature, while simulation shows that the digital thermometer will
the time is displayed on the ILI9340 LCD. As the be able to sense and display temperature and
input voltage is varied, the corresponding time when the actual implementation is done.
temperature is displayed on the LCD. When the The Proteus simulation diagram is shown in
input voltages were 1 V, 2 V and 10 V, the figure 5.
temperature values displayed on the LCD were

Figure 5: Proteus simulation diagram

Thereafter, the circuit was implemented on a breadboard. Figure 6 shows the breadboard
implementation.

Figure 6: Breadboard Implementation


8 BENJAMIN O. AKINLOYE, AARON O. ONYAN AND DONALDSON E. OWEIBOR
Finally, the circuit was implemented on a Vero the copper tracks on the other side of the board
board. The Vero board was first inspected to to make the desired connections. After soldering
ensure there were no wrong linkages between each unit, continuity test was carried out to
the dotted lines. Components were placed on the ensure that proper soldering was done. The
plain side of the board, with their leads protruding soldered circuit was housed in a case as shown
through the holes. The leads are then soldered to in figure 7.

Figure 7: Constructed digital thermometer with clock

4. PERFORMANCE AND EVALUATION THERMOMETER). The two thermometers were


To check the accuracy of the constructed digital used to measure the body temperature of two
thermometer, a test was carried out to compare persons at different times of the day for two
the temperature measurements of the consecutive days. The results obtained are
constructed thermometer and a commercial presented in table 1.
infrared thermometer (ST-8861 IR

Table 1: Comparison of temperature measurements of two persons using the constructed digital
thermometer and the commercial infrared thermometer
Date Constructed thermometer temperature Commercial thermometer
Time temperature
Person A Person B Person A Person B
16/12/2015 35°C/95.1°F 34.9°C/94.8°F 35.5°C/95.5°F 34.9°C/94.8°F
06:00AM
16/12/2015 35.9°C/96.6°F 35.5°C/95.9°F 36.9°C/97.1°F 36.1°C/96.9°F
12:00PM
16/12/2015 34.4°C/93.9°F 34.9°C/94.8°F 35.1°C/95.1°F 35.4°C/95.6°F
06:00PM
17/12/2015 34.9°C/95.5°F 34.6°C/94.2°F 35.1°C/95.1°F 35°C/95.1°F
06:00AM
17/12/2015 36°C/96.8°F 36.2°C/97.1°F 36.3°C/97.4°F 36.5°C/97.7°F
12:00PM
17/12/2015 35.5°C/95.5°F 35.8°C /95.7°F 36°C/96.8°F 36.2°C/97.1°F
06:00PM
DESIGN AND IMPLEMENTATION OF A DIGITAL THERMOMETER WITH CLOCK 9
A graph of the measured temperatures for Person A is presented in figure 8.

37.5

37

Temperature Measured (°C)


36.5
Temperature
36
MLX90614 Infrared
Sensor
35.5
Temperature Standard
35 Infrared Thermometer

34.5

34
0 20 40 60
Time

Figure 8: A graph of the measured temperatures using the constructed digital thermometer and the
commercial infrared thermometer

From the curves in figure 8, it can be seen that REFERENCES


the temperature readings from the constructed
thermometer (using MLX90614 infrared sensor) Abayomi-Alli A., Etuk E. J., Ezomo, P. I., Izilein,
matches closely with that of the commercial F. A., Akingboye, A. Y and Erameh, K. B., 2013.
infrared thermometer (ST-8861 IR A microcontroller based digital
THERMOMETER), with small deviations between thermometer with timer (digithermo),
the two temperatures. From the results presented International Journal of Computer
in table 1, the difference between the Science Issues, 10, Issue 2, (3): 229-
temperature readings of the two thermometers 238.
for the two individuals ranges from 0 to 1 °C.
With some improvements in the constructed Bellis, M., 2011. The history of thermometer.
thermometer, the accuracy will improve. Retrieved September 14, 2015, from the
website:http://inventors.about.com/od/tst
CONCLUSION artinventions/a/History-Of-The-
Thermometer.htm
The design and implementation of a digital
thermometer with clock, which is the focus of this Decoupling Capacitor. Retrieved December 07,
paper, was achieved. The digital thermometer 2015 from the website:
was designed in such a way that it can monitor http://electronics.stackexchange.com/que
temperature without contact, while also checking stions/2272/what-is-a-decoupling-
the time at which the measurement is made. The capacitor-and-how-do-i-know-if-i-need-
MLX90614 is factory calibrated in wide one.html
temperature ranges from -40ºC to 125ºC for the
ambient temperature and -70ºC to 382.19ºC for Engineering Toolbox, 2015. Emissivity
object temperature. The design allows dynamic Coefficients of some common Materials,
application of the digital thermometer in any field Retrieved from the website:
where temperature is being measured. http://www.engineeringtoolbox.com/emis
sivity-coefficients-d_447.html
10 BENJAMIN O. AKINLOYE, AARON O. ONYAN AND DONALDSON E. OWEIBOR
Filtering Capacitor, Retrieved December 07, Péter, C and Balázs, S., 2009. Development and
2015 from the Applications of a Home Health
website:http://www.edaboard.com/thread Monitoring Device, International Journal
168139.html of Advanced Research in Electrical and
Electronics, 289, (12): 4425-4432.
Integrated Circuits., 1999. PCD8544 48 × 84
pixels matrix LCDcontroller/driver DATA Saidu, I. G., Momoh, M., Yahaya, H. N., Akpootu,
SHEET Product specification D. O., Yaroko, I. Z., Fagbemi, S. A and Sifawa, A.
A., 2014. Design and Implementation of a
Jose, B. M., Ammu, C. T., Anand, M., Arjun, S Microcontroller Based Digital
and Aswathy, R., 2014. Design and Thermometer, IOSR Journal of
Implementation of Digital Alarm Clock Environmental Science, Toxicology and
with Thermometer, International Journal Food Technology, 8, (2 Ver. IV): 119-
of Advanced Research in Electrical, 125.
Electronics and Instrumentation
Engineering, 3, (2): 7651-7653. Stand Alone Microcontroller Circuit, Retrieved
November 04, 2015 from the
Med, Q. J., 2002. A Brief History of the Clinical website:http://www.arduino.cc/en/Main/St
Thermometer, Oxford Journals, 95, 251– andalone.html
252.
Theraja, B. L. and Theraja, A. K., 2005. A
Textbook of Electrical Technology, S.
Chand & Company Ltd., New Delhi,
pp.1569-1603.

View publication stats

You might also like