A Microcontroller Based Food Temperature Regulating System

DOI : 10.17577/IJERTV2IS110068

Download Full-Text PDF Cite this Publication

Text Only Version

A Microcontroller Based Food Temperature Regulating System

Jacob Tsado1*, Onunka Chimdinma1, OdunAyo IMORU1,2, Enesi Asizehi Yahaya1

1Department of Electrical and Electronics Engineering, Federal University of Technology, Minna, Niger State, Nigeria

2Department of Electrical Engineering, Tshwane University of Technology, Pretoria, South Africa

Abstract

This paper presents a microcontroller based food temperature regulating system. The system works using TC74 as the temperature sensor together with a microcontroller (Atmega8) which was programmed in C language. The temperature sensor reads the ambient temperature and sends the digital output to the microcontroller since it has an in-built analogue to digital converter. The microcontroller compares the temperature with the pre- programmed temperature range (2ºC-10ºC). A DC motor is used to represent the control of the cooling unit which turns on if the sensed temperature is greater than the maximum temperature value and vice-versa. The LCD displays the temperature and the system uses a 9V DC battery source. The system was tested and the result obtained showed the temperature was regulated within the set range.

Keywords- Microcontroller; Food Temperature; DC Motor; LCD Displays

  1. Introduction

    Temperature regulation is not actually a new form of technology as it has been in existence ever since man discovered that fire is hot and snow is cold and more knowledge has been gained as man worked with metals through the bronze and iron stages. Even the human body and other creatures have a way of regulating its own body temperature. For temperature to be regulated, it has to be measured. The discovery of T.J Seebeck and Sir Humphrey Davy in 1821 marked the beginning of electrical sensors [1- 3]. In 1883, Warren Johnson discovered the bimetallic temperature sensors which were handier, easy to read and had many industrial applications [4], even though it was not as accurate as the liquid in glass thermometer [5-6].

    Later, in twentieth century, more sensitive temperature sensors were discovered. Examples are the thermistor, the

    The concept of temperature regulation is switching on a heating or cooling system so as to maintain the temperature of a system within a defined range. A thermostat is a typical example of a device used for maintaining the temperature of a system within a specified range either by setting up or termination of a heater or cooler. The mechanism it uses to control or regulate temperature is a good example of a closed- loop control system.

    Temperature regulation can be applied in various areas of human lives such as in hatching of eggs in poultry (37ºC- 39ºC), in telecommunication industries were equipment used are operated within certain temperature range in order to perform its duty correctly, also in chemical laboratories were reagents need to be stored at a defined range of temperature, storage of blood in blood banks at the hospitals and in food preservation techniques. In industries where different types of machines are used for some processes, the machines need to operate at certain temperature range in order to avoid machine breakdown and also increase their life span.

  2. System Description

    The block diagram of the whole system is shown in Figure 1. The system consists of the temperature sensing unit that is the TC74, which reads the ambient temperature and send a digital output to the control unit, which is the microcontroller (Atmega8) [17-18]. It controls the switching ON and OFF of the DC motor, which is used to represent the switching unit and the temperature is displayed on the LCD.

    MICRO- CONTROLLER

    LCD

    LCD

    TC74

    integrated circuit sensor, a range of non-contact sensors, fibre optic sensors (Capgo, History of temperature) [6-16].

    Some previous works have been done on this type of system using seven-segment LED display and a voltage output temperature sensor (LM35), with temperature range of 0ºC- 100ºC which will also require an analogue to digital

    DC MOTOR

    converter (ADC0804). With advancement in technology and research, a serial output sensor (TC74) with an onboard analogue to digital converter was used and it also has a wider temperature range of -40ºC to 125ºC, with many areas of applications.

    The features of a microcontroller makes the design and construction of this system more reliable, simple, flexible, accurate, low-cost, compatible, easy to use and helps conserve energy.

    Fig. 1 Block diagram of microcontroller based food temperature regulating system

    1. Temperature Sensing

      TC 74 is a temperature sensor with an on-board thermal diode and SMBus compatible interface. The chip is a serially accessible, digital temperature sensor that acquires and converts temperature information from its on-board solid- state sensor with a resolution of 1°C. The temperature is available as an 8-bit digital word stored in its internal

      temperature register, which is accessible through a 2-wire I2C compatible serial bus.

      The device is factory calibrated in wide temperature range of -40ºC to 125ºC for the ambient temperature and a very low operating current of less than 250µA. A standby mode is also made available to reduce the devices total current. With features such as high accuracy, low operating current, small size and ease of use, makes the device ideal for implementing sophisticated thermal management schemes in a variety of systems. Some of its applications include, Personal Computers (PCs), servers, Datacom equipment, consumer electronics, power supplies, communication devices, amplifiers, hard drives etc. The connection between the microcontroller and the TC 74 is shown in Figure 2.

      This component is an electronically modulated optical device made up of any number of segments filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in colour or monochrome. They are sharper, more energy efficient and due to its low electrical power consumption, it is used in battery powered electronic equipment. Thousands of tiny LCDs are used to form the picture elements (pixels) of the screen in some TV receivers [22]. They are used in recent desktop monitors and notebook computer displays. The LCD uses 8-bit data line to send or read the content of the internal register and it displays the current ambient temperature value measured and calculated by the TC74 sensor as programmed by the microcontroller. To vary the contrast of the LCD, a 5K variable resistor is connected to the LCD via the ground (Vss), the supply voltage

      +5V

      5

      2

      MICRO-

      CONTROLLER 7(VDD)

      24(SDA)

      terminal (Vdd) and the output voltage (Vo) terminal which is pin three of the LCD.

      The microcontroller powers the LED backlight of the LCD and the 5V supply, required for the LCD is also gotten from the output terminal of the 7805 voltage regulator. The LCD interface with the Microcontroller is presented in Figure 3.

      TC74

      4 28(SCL)

      3

      Fig. 2 TC74 Connection to the Microcontroller (Atmega8)

      16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 Gnd

      LED Vcc

      Backlight 8-bit data bus lines Vcc

      Temperature data is converted from the on-board thermal sensing element and made available as an 8-bit digital word. The microcontroller (Atmega8) provides the clock signal for all the data transfers and the TC74 always operates as a Slave as it communicates with the sensor through the Serial clock input (SCLK) and bidirectional data port (SDA) which forms a 2-wire bidirectional seral port.

      The microcontroller issues a start condition followed by the address byte which consists of the 7-bit slave address and a Read/ Write bit. The read/write bit is always 0 (write) in the first phase. If the received 7-bit address matches with its own slave address, the TC74 responds with an acknowledge pulse.

      The microcontroller next sends the command byte (00h) to TC74 to indicate which register it wants to access. The TC74 responds with an acknowledge pulse.

      The microcontroller issues a new Start condition by sending a new address byte with read write bit as 1, because the direction of data transfer is now going to be changed and its acknowledged by the slave (TC74). The TC74 transmits the 8-bit temperature data from the temperature register. Upon receiving the byte, the host (microcontroller) does not acknowledge, but generates a Stop condition [19-21].

    2. The LCD Unit

      19 4 5 6 11 16 17 18

      Atmega8

      Fig. 3 The LCD Interfacing with the Microcontroller

    3. The Controlling Unit (Atmega8)

    Atmega8 shown in figure 4 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture, 32K bytes of in-system programmable flash with Read-While -Write capabilities. The AVR architecture has two memory spaces, the Data memory and the program memory space. It also has an EEPROM memory for data storage. All three memory spaces are linear and regular. Other features the microcontroller provides are: 1K bytes of EEPROM, 2K bytes of SRAM, 23 general purpose input/output lines, 32 flexible timer/ counters with comparable modes, internal and external interrupts, a byte- oriented two-wire serial interface, a 6-channel 10-bit Analogue to Digital converter, a programmable watchdog timer with internal oscillator and five software selectable power saving modes [17-18, 23].

    The idle mode stops the Central Processing Unit while allowing the SRAM, timer/counters, two-wire interface, Serial Peripheral Interface port and interrupt system to continue functioning. The power-down mode saves the

    5K

    Gnd

    register contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. In power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the Reset of the device is sleeping. The ADC noise reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC, to minimize switching noise during ADC conversions. In standby mode, the crystal oscillator is running while reset of the device is sleeping. This allows very fast start-up combined with low power consumption (Atmega8 Datasheet).

    GND

    22pF

    16Mhz

    22pF

    XTAL1

    XTAL2

    Fig. 5 Crystal Oscillator Connection

    Fig. 4 Pin configuration of Atmega8

    E) Programming the Microcontroller

    The programme to be executed by the microcontroller was written in C-language using an Arduino Integrated Development Environment (IDE). The Arduino IDE helps to write, compile, upload and debug embedded programs. After the programme was written and compiled, it was simulated using the IDE debugger. Figure 6 shows the system flow chart. Once the system is switched on, the microcontroller initializes its ports and system variables before the programme is executed.

    The microcontroller was programmed in such a way that it communicates with the temperature sensor serially via Port C (PC5 and PC4). It controls the switching on and off of the DC motor based on the pre-programmed temperature range (2ºC-10ºC) via Port D (PD7). Whenever the temperature is above the pre-set range, it turns on the D.C motor and turns it off when the temperature is within that range.

    D) Oscillator Characteristics

    A 16Mhz crystal oscillator was used as its clock source (Atmega8 Datasheet) [4]. It generates 16,000,000 pulses in one second. This was achieved by connecting the 16 MHz crystal oscillator in between two 22pF capacitors via the XTAL1 (input) and XTAL 2 (output) of the microcontroller, as shown in Figure 5.

    START

    Initialize System Variables

    Convert Temperature

    Display Temperature

    Temp

    >

    Upper

    Temp

    >

    Lower

    Turn on Cooling Unit

    Turn off Cooling Unit

    Fig. 6 Flow Chart of the System

  3. Circuit Design and Construction

    The complete system circuit design diagram is shown in the Figure 7. The components required for the system were purchased from vendors that deal in electrical components and were tested. These components were first assembled on the breadboard using this circuit diagram. The breadboard

    connection was to test the functionality of the system and check for errors in the design of the circuit. After the circuits breadboard test, the components were transferred to a suitable sized Vero board for a permanent connection by soldering. Figures 8 and 9 show the complete circuit construction and complete casing of the system respectively.

    Fig. 7 System Circuit Diagram of the System (Circuit Design)

    SA Publication © 2012

    SA Publication © 2012

    Fig. 8 Main circuit of the system of the System (Circuit construction)

    Fig. 9 Complete casing of the system

  4. Testing and Discussion of Results

    The circuit was tested at various stages. Individual components were tested and also the circuit modules were tested. All these tests were to confirm the reliability of the components. Finally, the entire design was tested to ascertain its prescribed function according to specification and to check the response of the temperature sensor to temperature changes. This was achieved when an ice block was used on the temperature sensor and the corresponding drop in temperature was displayed on the LCD.

    When the temperature sensor reads the ambient temperature and it happens to be more than 10ºC, the DC motor begins to rotate. This shows that the cooling system is turned ON and a message too hot is displayed on the LCD.

    When a very cold substance was placed on the sensor, the DC motor stopped rotating showing that the cooling unit has being switched OFF and the display indicated a drop in temperature with a message in temperature range displayed on it. With this technique the temperature of the system is maintained within a range of 2ºC and 10ºC as programmed in the microcontroller.

  5. Conclusions

    The design and construction of food temperature regulating system was carried out, the result obtained from the test carried out shows that the system is working to the prescribed specification. The system was made quite portable for easy handling and it could be re-programmed for other types of application of temperature monitoring and control systems.

  6. References

  1. Down, R.D., Temperature Measurement, in Environmental Instrumentation and Analysis Handbook eds R. D. Down and

    J. H. Lehr), John Wiley & Sons, Inc., Hoboken, NJ, USA. 2005.

  2. Keithley, Joseph F. The story of electrical and magnetic measurements: from 500 BC to the 1940s. Wiley-IEEE Press, 1999.

  3. Premchand, Bharath Bethala Kishanlal. Bulk silicon based temperature sensor. Diss. University of South Florida, 2005

  1. Winoto, Ardi. mikrokontroler AVR Atmega8. (2008): 8535.

  2. Xiao-mu SHI, Yi WANG, and Dong-hui ZHOU. Heating control system based on ATmega8 MCU [J]. International Electronic Elements 7. 2006: 46-49.

  3. Popa, M., A.S. Popa, and A.T. Gambutan. Remote temperature monitoring and regulating system for indoor locations. In Applied Computational Intelligence and Informatics, 2009. SACI'09. 5th International Symposium on, pp. 235-240. IEEE, 2009.

  4. Seymour, Roger S., Gemma Lindshau, and Kikukatsu Ito. Thermal clamping of temperature-regulating flowers revealsthe precision and limits of the biochemical regulatory mechanism. Planta 231, no. 6. 2010: 1291-1300.

  5. Fadell, Anthony M., Matthew L. Rogers, David Sloo, Michael

    J. Matas, and Michael Plitkins. THERMOSTAT USER INTERFACE. U.S. Patent 20,130,046,397, issued February 21, 2013.

  6. Clothier, Brian L., and Amil J. Ablah. Temperature self- regulating food delivery system. U.S. Patent 6,504,135, issued January 7, 2003.

  7. Clothier, Brian L., Amil J. Ablah, Robert E. Wolters Jr, William W. Heine, and David E. May. Induction heating, temperature self-regulating. U.S. Patent 6,316,753, issued November 13, 2001.

  8. 2011 Atmel Corporation, 8-bit (Atmega8) AVR with 8Kbytes In-System Programmable Flash

    Available at http://www.atmel.com/products/microcontrollers/avr/default.

    aspx?tab=documents.

  9. Ma, Chao, W. Zhan, and D. Geng. Atmega8 Principle & Application Manual. (2003).

  10. Stewart, James. 8051 Microcontroller: Hardware, Software and Interfacing 2E. (1993).

  11. Vahid, F., & Tauro, L. (1997, March). An object-oriented communication library for hardware-software codesign. In Hardware/Software Codesign, 1997.(CODES/CASHE'97), Proceedings of the Fifth International Workshop on (pp. 81- 86). IEEE.

  12. Kleitz, William. Microprocessor and Microcontroller Fundamentals: The 8085 and 8051 Hardware and Software. Prentice Hall Professional Technical Reference, 1997.

  13. Edward Hughes and Ian McKenzie Smith, Electrical Technology, Longman Scientific & Technical, 7th Edition (1995).

  14. Theraja B.L, Theraja A.K, A Textbook of Electrical Technology, S.Chand and Company Limited, New Delhi, 23rd Edition (2002).

  1. http://en.wikipedia.org/wiki/Thermostat.

  2. Walker, Iain S., and Alan K. Meier. Residential Thermostats: Comfort Controls in California Homes. Lawrence Berkeley National Laboratory 7. 2008.

  3. Peffer, Therese, Marco Pritoni, Alan Meier, Cecilia Aragon, and Daniel Perry. How people use thermostats in homes: A review. Building and Environment 46, no. 12 (2011): 2529- 2541.

    Jacob Tsado received his Bachelor of Engineering (B. Eng.) in Electrical

    /Computer Engineering from Federal University of Technology Minna, Nigeria in 1998. He received M.Eng and P.hD in Power System & Machine from University of Benin, Benin city, Nigeria in 2001 and 2007 respectively. Presently he is lecturing

  4. http://www.capgo.com/Resources/Temperature/TempHome/

    TempSensors.html.

  5. Premchand, Bharath Bethala Kishanlal. Bulk silicon based temperature sensor. Diss. University of South Florida, 2005.

  6. Molteno, Christopher. How best to meet South Africa's future energy requirements. Transactions of the Royal Society of South Africa 63, no. 2. 2008: 189-191.

in the Department of Electrical Electronics, Federal University of Technology Minna, Nigeria. He is a member of IEEE, the councillor of student members IEEE. A member of Nigerian Society of Engineers and COREN register. His research area is power system and energy studies.

Ayo IMORU was born in Ondo State, Nigeria. He obtained his Bachelor of Engineering (B.Eng) in Electrical and Computer Engineering with a First Class double honour and the overall best students from Federal University of Technology, Minna, Nigeria in 2005 and an MSc in Electrical Engineering at Delft University of Technology, The

Netherlands in 2010. His brilliance earned him an automatic employment in the same department he graduated after his mandatory one-year (NYSC) National Youth Service Corps in 2007. He is a member of IEEE, COREN and many other professional bodies. He is also a reviewer for some journals and conferences. He presently pursuing his doctorate in Electrical Engineering

Department, Tshwane University of Technology, Pretoria, South Africa.

Yahaya Asizehi Enesi was born on 26th June 1964 in Okene Local Government area of Kogi State, Nigeria. He obtained the M.Sc degree in Electromechanical Engineering from Zaporozhye State Technical University, Republic of Ukraine in 1995. He specializes in Electrical machines and presently lecturing in Electrical Engineering Department at

Federal University of Technology, Minna, Nigeria

ESRSA Publication © 2012 http://www.ijert.org

IJERTV2IS110068

www.ijert.org

– 6 –

329

Leave a Reply