[go: up one dir, main page]

0% found this document useful (0 votes)
12 views4 pages

MPMC

Micro processors

Uploaded by

alonewalker3125
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)
12 views4 pages

MPMC

Micro processors

Uploaded by

alonewalker3125
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/ 4

International Journal of Computer Applications (0975 – 8887)

Volume 178 – No. 43, August 2019

Microcontroller based Industrial Automation System


using Temperature Sensor and Output Logic Control

Tanvir Zaman Khan Apurba Adhikary Md. Ashikur Rahman Khan


Dept. of ICE Dept. of ICE Dept. of ICE
Noakhali Science and Technology Noakhali Science and Technology Noakhali Science and Technology
University University University
Noakhali-3814, Bangladesh Noakhali-3814, Bangladesh Noakhali-3814, Bangladesh

ABSTRACT needed [1] [2]. The heart of this system is microcontroller. It


In Automatic temperature controlled system as an is a device which has the same characteristics as that of an
microcontroller based embedded system is quiet interesting as entire computer system. A microcontroller has a processor,
well as very essential in the modern era. The basic and RAM, ROM, I/O ports external clock input etc. [3]
conventional system was manual and electromechanical. Temperature controlled system includes software with
That’s why functionally it is required to establish an hardware. As it processes only digital logic, design should be
automatic system with control logic. Our proposed system made carefully to make sure that there is no undefined state as
will sense the environmental temperature and will take steps well as infinite level of voltage [4]. Other component
along with this temperature by control of switching fan, interfacing with the microcontroller is a very important part.
heater, air conditioner or fire alarm. Most of the Microcontroller output should not be used with load directly.
manufacturing industries like chemical, petrochemical, food If the load impedance is low and is connected with the MCU
processing, pharmaceutical etc. temperature is one of the directly, the output may be shorted with ground which may
prominent factor to be control. Because in these kinds of led the total system to an unstable state. The connection from
industries some products need the required temperature to be sensor to the MCU should be firm because any fluctuation of
maintained at highest priority otherwise the product will fail. voltage may cause false triggering. The MCU runs only
So the temperature controller is most widely used in almost all voltages ranges from 4.0V to 5.5V. Care should be taken for
the industries. In this paper, we introduce automatic keeping the voltage constant in that range. Microcontroller
temperature controller using DS18B20 digital temperature makes the transistor switching and relay operates from
sensor and controller unit using PIC16F877A microcontroller different power supply. We have to ensure to make the ground
with various useful and critical conditions. Supervisory same for different power supply otherwise the system may not
Control and Data Acquisition System (SCADA) is widely work properly [4] [5].
used in industrial automation system. We have already
performed our system to operate as the way of SCADA and it 2. PROPOSED SYSTEM
can detect measuring parameters in real time operation and At first the sensor DS18B20 will sense the current
send it to the control station. If these parameters are not in environment temperature and will be shown in LCD display.
sustainable level, it sends an alarm and indicating signal in Then it will apply the specific port of microcontroller to
control station rather than taking any kind of intelligent control the temperature by operating our heater, cooler, Air
decision. But our proposed system can perform better than Conditioner, alarm etc. Temperature range can be set through
SCADA in real time operation with determining intelligent microcontroller programming. The microcontroller oscillation
decision on the basis of real time situation. We used a frequency 8 MHz. 4-bit interfacing of LCD is used. By
Microcontroller to determine and processing the predefined comparing the predefined temperature value, when it <20
system decision as like artificial intelligence system. Field of degree Celsius then the heater is turned ON. After then when
operation of our system can be extended by including more temp goes above temp, heater is turned OFF. Again if temp
process parameter to operate this automation system. goes >250C &&<360C the corresponding relay switch On the
Fan/ Air cooler [6]. If temp goes above critical temp (which
Keywords can be changed by user demand) there is an alarm system
Microcontroller, PIC16F877A, Temperature Control, which sounds. It is also showing indicating light for different
Embedded System, Industrial Automation. temp suggestion [5] [6].
1. INTRODUCTION A microcontroller cannot read programs by itself, so we have
In Embedded System design there is no limit of developing. to develop its program with the help of IDE (Integrated
Newer forms of sensors as well as program syntax are being Development Environment). The I/O lines and other options
invented day by day. The more effective system is being of microcontroller are configured through programming for
developed as well [1]. This paper is focused on basically a specific purpose. Programs have been written in ANSI C and
microcontroller based temperature indicator system which Assembly language. The IDE converts the program into
displays temperature in the range of ˗ 55°C to + 125°C in Machine code called HEX file (extension “.hex”). As the
0.5°C incremental accuracy. It continuously senses microcontroller executes a single line at a time, the program
temperature, displays it, compares it with set value. If it’s less/ should have the path to access all other functions. For this
greater, then it controls the heat, produce by heating element project we have compared the predefined standard
or controls the temperature by switching on AC/fan. It temperature value [6].
includes both software and hardware design. Before
proceeding to the design, introduction to some parameter is

40
International Journal of Computer Applications (0975 – 8887)
Volume 178 – No. 43, August 2019

There are two parts of automatic temperature controller memory which is capable of self-programming. It also has an
ICD, 8 channels of 10-bit Analog-to-Digital (A/D) converter,
1. Temperature sensing 2 Comparators, 2 compare/capture/PWM functions. The
2. Temperature controlling synchronous serial port of PIC16F877A can be configured as
either a Universal Asynchronous Receiver Transmitter
(USART) and 2-wire Inter-Integrated Circuit (I²C) bus or 3-
wire Serial Peripheral Interface (SPI) [3] [7]. These prominent
features make this microcontroller ideal for more advanced
level A/D applications in industrial, consumer applications,
automotive and appliances.

3.2 DS18B20 Temperature Sensor


The DS18B20 temperature sensor will be used as a digital
thermometer which provides 9-bit to 12-bit Celsius
temperature measurements. It also has an alarm system
featured with nonvolatile user-programmable upper and lower
trigger points. The communication of DS18B20 performs over
a 1-Wire bus. In other words it requires only one data line
(and ground) with a central microprocessor. It has unique 1-
Wire Interface Requires Only One Port Pin for
Communication. It has an operating temperature range of-55C
Fig 1: Block diagram of automatic temperature controller to +125°C and is accurate to ±0.5°C over the range of -10°C
to +85°C [8]. In addition, the DS18B20 has a special feature
3. SOFTWARE AND HARDWARE of deriving power directly from the data line. This is called
COMPONENTS parasite power. This feature eliminates the need for an
A program is developed for the microcontroller on the basis of additional power source. Multiple DS18B20s can be
an algorithm. First of all we implemented sensor circuits to performed on the same 1-Wire bus due to a unique 64-bit
take input from the outer environment like ambient serial code of each DS18B20 temperature sensor. Thus a
temperature. The DS18B20 sensor is connected in RE2 single microprocessor can control many DS18B20s spread
(PORT E is a bidirectional I/O port) pin. It is Chip select over a huge area. Lots of applications can be benefitted from
control for Parallel Slave Port. MCU receives a serial Binary this feature including temperature monitoring systems inside
data from the 1-wire sensor and comparing the input signal to buildings, equipment, or machinery, HVAC environmental
give output. controls, control systems and process monitoring [8] [9].

3.3 LCD Module


A 16×2 LCD display is used with 4 bit connection to the
microcontroller. LCD display is used only for display the
temperature status. Various circuits and devices are
commonly used 16×2 LCD display module for its simplicity
and low cost. This module has enormous advantages over
multi segment LEDs and seven segment display. It can
display custom character, special character, animation and so
on. LCDs are also easily programmable. A 16×2 LCD means
it must be capable of displaying 16 characters per line and 2
lines must be in the display. In this LCD each character is
displayed in 5×7 pixel matrix. Command and data are the two
registers of this LCD. The command instructions are stored in
the command registers and transfer to the LCD. This
command instruction executes different task including screen
clearing, initializing LCD, controlling display, setting the
cursor position etc. The data which are ASCII value of the
Fig 2: Simulation Model of Microcontroller and Sensor. character stored in the data register and to be displayed on the
LCD [10].
Then we send binary input to output pin for corresponding
logical program. The RD2-PD7 is set to output port. These 3.4 Relay
output ports are connected to transistor driver to drive A relay is an electrical controllable switch that operates under
different controllable equipment. The program is simulated in the mechanism of another electrical circuit. Relay usually
Micro C Pro simulator & converted into a hex file to load in attached to the microcontroller output pins and used to turn
microcontroller as well [3] [6] [7] [8]. on/off high-power devices such as transformers, bulbs,
motors, heaters, etc. Sensitive components are commonly
3.1 PIC16F877A Microcontroller placed away from these devices. The operational mechanisms
For this project, PIC16F877A microcontroller is used. This of different types of relay are almost same. Relay is activated
CMOS device has powerful processor which can execute 200 by an electromagnet to open or close when current moves
nanosecond instructions though it has only 35 single word through the coil. Similar to auto couplers, there is no galvanic
instructions that are easy-to-program. This microcontroller is connection (electrical contact) between input and output
8-bit FLASH-based packs Microchip's with powerful PIC® circuits. To launch the operation of relay it requires both
architecture into an 40 pin package. This PIC16F877A higher current and higher voltages but there are also miniature
microcontroller is equipped with 256 bytes of EEPROM data

41
International Journal of Computer Applications (0975 – 8887)
Volume 178 – No. 43, August 2019

ones that can be activated by low current directly acquired


from output pins of the microcontroller.

4. PROGRAMMING AND ALGORITHM


Algorithm 1 (Sensing the Ambient Temp. with DS18B20)
Input Sensor at PORTE, 2
One wire reset signal
Issue command SKIP_ROM
Issue command CONVERT_T
(To initiate a temperature measurement and A-to-D
conversion, the MCU must issue a Convert T [44h] command)
Issue command SKIP_ROM
Issue command READ_SCRATCHPAD
temp = Ow_Read(&PORTE, 2);
temp = (Ow_Read(&PORTE, 2) << 8) + temp;
Display_Temperature(temp); (Format and display result on
Lcd).
Algorithm 2 (Controlling the Relay)
Output relay at PORTE, 4
Issue command SKIP_ROM Fig 4: Flowchart of micro module controlling algorithm
Issue command SKIP_ROM
5. RESULT
Issue command LEVEL_HIGH This paper is all about an automated temperature control
system where DS18B20 sensor will sense the temp and
display it on LCD. In practical field, there will be a lot of false
triggering and can reset the system. So the sensor should be
set carefully. For different temperature range it shows
different color LEDs for temp suggestion. With the increase in
temp, the system will turn on red LED and corresponding
relay drives the Fan/AC. It will operate according to the
following output logic and temperature range.
Table 1. Output logic operation of temperature range
Temperature LCD Light Relay switch
Display status
<21 °C 18.2345°C Yellow Heater ON
>20 &&<26 °C 22.7635°C Green DO Nothing
>25 &&<36 °C 30.7823°C Red Fan/AC ON
>35 °C 38.4531°C White Alarm Sounds

6. CONCLUSION
In this paper an automation system has been proposed based
on microcontroller, sensor and logic control. Microcontroller
is the main processing unit; sensor receives the temperature
and output logic controls the relay. Again the sensor cannot
Fig 3: Hardware Setup
sense the temp at a long distance within a short time. So,
adding more sensors could give more accurate temperature.
GSM module and Wireless module could be new feature of
this system. By adding this module SMS can be sent to the
user when anything goes wrong. Our proposed system has
designed on the basis of temperature parameter which is the
global variable of any system. If this automaton system needs
to be implemented to another automation system, it is required
to sense and process other variables of that system as like as
temperature. To make sure that the system is automated and
safe using output logic control. In the case of SCADA system,

42
International Journal of Computer Applications (0975 – 8887)
Volume 178 – No. 43, August 2019

it is unable to operate in worst case situation during power and Automatic Control System”, 2010 International
blackout and unable to isolate the healthy system from Conference on Computer Application and System
affected part of the system. Our proposed system is able to Modeling (ICCASM 2010)
operate during blackout or any kind of worst case situation. It
can also isolate the protected system in real time operation or [5] Shufen LI, Junli LlU, Junqin LlU, “Design on the central
rapidly shutdown the protected system. air-conditioning Controller Based on Lab VIEW”,
ICCASM 2010
7. REFERENCES [6] Milan Verle, PIC Microcontrollers-Programming in C,
[1] Kalyan Phani Tangirala, J. Robert Heath,Arthur Radun, mikroElektronika; 1st edition (2009)
Terrance E. Conners, “A handheld programmable-logic-
device-based temperature and relative-humidity sensor, [7] “PIC16F87XA Enhanced Flash Microcontrollers
processor, and display system platform for automation datasheet”, 2003 Microchip Technology Inc.
and control of industry processes”, IEEE Transections on [8] Temperature measurement using DS1820 sensor. Use of
Industry Applications, Vol. 46, no. 4, July/August 2010 ‘1-wire’ protocol. [Online]. Available:
[2] Mayur Avhad, Vinit Divekar, Harshad Golatkar, Sanket http://www.mikroe.com/chapters/view/17/
Joshi, “Microcontroller based automation system using [9] “DS18B20 Programmable Resolution 1-Wire Digital
industry standard SCADA”, 2013 Annual IEEE India Thermometer datasheet”, Maxim Integrated Products,
Conference (INDICON) 120 San Gabr iel Dr ive, Sunnyvale, CA 94086 408-737-
[3] Myke Predko, Programming and Customizing the PIC 7600
Microcontroller, Third edition, McGraw-Hill Education, [10] Brown,LCDModuleDatasheet:http://www.engineersgara
Sep 25, 2007 ge.com/electronic-components/16x2-lcd-module
[4] Wenlian Li, Yang Li and Fan Xiao, “The Design and datasheet
Implementation of Digital Temperature Measurement

IJCATM : www.ijcaonline.org 43

You might also like