PIC16F877A Automation Shiller control system


ABSTRACT
Device automation is speedily increasing in each domestic and industrial applications. Automatic lighting, automatic door locks, automatic industrial plant production lines are some samples of automation application. Automation of devices like lights plays a big role in energy conservation. Another value-added advantage is multiplied comfort to the user of the automatic device as they are doing not need constant oversight. This comes makes an attempt to adapt to the current trend by automation of temperature regulative device. The target of the project is to design and implement an automatic temperature controller that permits the user to regulate a collection purpose of a desired temperature of operation, machine sight temperature of surroundings employing a temperature device, put ON or OFF the suitable regulative devices.

KEY WORDS
PIC16F877A Automation Shiller control system,

I.  Introduction
Before the introduction of solid -state logic circuits, logic primarily based systems were designed and engineered solely around mechanical device relays. Though not obsolete, relays are in several of those applications. Systems and processes requiring on/off management in fashionable commerce and trade are seldom supported either manual shift mechanical device relays or discreet logic gates. Instead digital computers which can be programmed to try and do a spread of logical functions are most well-liked to fill the requirement. Samples of these microcomputers are microprocessors, microcontrollers and Programmable Logic Controls.

Most n people deem electrical appliances because it has evidenced to be Associate in nursing integral a part of our lives a grand sector of the nation’s economy depends on fuel and electricity. The common temperature in African nation ranges from 23 degrees to 37 degrees Celsius thus, correct cooling is required to stop cars and electrical appliances from warming. And conjointly to take care of the close temperature so as to avoid high force per unit area. Temperature may be a property of a body that underlies the common notions of hot and cold. Temperature plays a very important role altogether fields of scientific discipline, as well as physics, geology, chemistry, atmospherically sciences and biology.

Constructed on the PIC16F877A and temperature sensor device LM35, this method controls the state temperature showing intelligence. The temperature is set n different ranges. The system will show the required set point temperature on the liquid crystal display, and actual temperature detected by the LM35 sensor; and mechanically management the temperature once the condition temperature exceeds the higher and lower limit. With this kind of control, we are able to keep the temperature unchanged. The system is of high management exactness, and versatile design; it conjointly fits the rugged setting. It’s primarily utilized in people's life to enhance the standard of the work and life. It’s conjointly versatile, so it is convenient to increase the employment of the system. That the design is of profound importance. [6] 

II.  System Overall Design
The hardware block diagram of the temperature control is shown in Fig.1. The system hardware includes the microcontroller, temperature detection circuit, clock circuit, and Display. Based on the PIC16F877A, the LM35 will transfer the temperature signal detected to the microcontroller for processing. The temperature value is shown on the liquid crystal display. Using the up and down Push buttons to set the temperature desired value, the microcontroller thus able keep a temperature at the constant level, and using the LCD to show the present value for controlling the temperature. In addition, the red LED will indicate a high temperature and the green LED will indicate a low temperature [10].


 Microcontroller
The PIC16F877A is powered by +5 volts, it has a higher performance of CMOS 8-bit transistors built inside the microcontroller with 8K bytes memory system
(Programmable Flash memory) [18]. the device is constructed using Atmel’s high density nonvolatile memory technology and is able to withstand the industry requirements (80C51 instruction). The chip Flash permits the program memory to be reprogrammed in a system or by a conventional nonvolatile memory programmer. By coupling a versatile 8-bit CPU with in a system programmable Flash memory on a monolithic chip, the PIC16F877A microcontroller is much powerful and provides a higher flexibility and cost effective solution to many embedded control applications. Hardware system of the microcontroller is shown in Fig. 2. [12]


Figure 2 shows a PIC16F877A Microchip

Temperature Sensor LM35

The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1⁄4˚C at room temperature and ±3⁄4˚C over a full −55 to +150˚C temperature range. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 µA from its supply, it has very low self-heating, less than 0.1˚C in still air. The LM35 is rated to operate over a −55˚ to +150˚C temperature range [5].
Crystal oscillator
It is used to drive the microcontroller unit. The PIC16F877A does not have an internal oscillator, thus the importance of having an oscillator. Attention has to be paid when connecting the oscillator because it has specific inputs to which it should be connected. To know how to connect it, I had to read the oscillator configurations found in the datasheet of the PIC16F877A. The value of the crystal oscillator is also important, depending on the required performance of the microcontroller. In my case I used a 4MHz crystal oscillator [18].

33 pF Capacitors: they are connected in parallel to the crystal oscillator to enable oscillation. The higher the value of the capacitors, the higher the stability of oscillation.

Push buttons on RA4, RE1 and RE2
The push buttons shown in figure 5, are responsible for controlling the desired set point temperature. As it is shown we have reset push button, increment push button and decrement push button. These control buttons are directly to pin MCL, pin RE1 and RE2 of a microchip. While connecting the push buttons, I had to learn how to interface them to a PIC microcontroller. It can be seen that I connected a pull-up resistor between the +5 Volts rail and one pin of the push button, which I then took to the pin of the microcontroller. I connected the other pin of the push button to ground, so that when the push button is pressed, the pin that goes to the microcontroller is directly connected to ground, which is also our logic 0. 
Figure 5 shows push button (Set point control)

Fan Drive Circuit
A motor is used to drive a fan to control the temperature. The technology of TIP120 transistor is used to control the switching of a relay and the relay control switching interval of the motor. [7] When the temperature is over the upper value, the motor is energized to lower the temperature, and de-energized when the temperature is lower than set point value. In this case we are able to keep the temperature at the constant level.  Figure 6 below shows the drive circuit of the motor. 

Figure 6 shows a Fan Drive Circuit

I.  Software Design
The system flow mainly includes the following steps:
Temperature detection, LED’s indication of temperature condition, temperature control, crystal clock, LCD and control push buttons. The main program flow is shown in Fig. 7. When the system is electrified the time code will be stored in the internal unit address or the, scintillation signal will be cleared [7]. The special function register initiation includes loading the initial value of timer and opening the interrupt. When the system is powered up the timer is initialized. The peripheral equipment initiation refers to set the initial value of peripheral equipment, the LCD should be initialized, the start-up display should be called, the temperature conversion command should be issued firstly and the LM35 should also be initialized. The red LED and the green LED are mainly for lowering and the raising of temperature to make the temperature remain with the preset range. 

Figure 7 software Algorithm flow chat.

Algorithm starts with taking data from sensors and sensor outputs is analogue which is converted to digital signal. This task is performed using analog to digital convertor (ADC). Digital signal is forwarded to the microcontroller. After receiving a signal, the microcontroller will decide the condition of a cooling fan. 

Experimental setup  



Figure 8 schematic diagram
Figure 8 shows a schematic diagram circuit, the circuit include the LCD display, LM35 temperature sensor and a fan control circuit. The circuit on figure 8 is designed and simulated on a PROTEUS software. 

Figure 9 hardware setup/ Testing

Figure 9 show the project hardware running, I tested the response of my project by the use of COLD water and HOT water. And the response was the 95 percent the same the PROTEUS simulation. 
Figure 10 shows the temperature measured by LM35 sensor, the highest temperature measured of hot water is 56 degrees Celsius and the Lowest is 4 degrees Celsius.


Figure 10 temperature display

Final Project

Figure 11 final project

Figure 12 Final project operating on full capacity

I.            Results
First set point test results.

Table 1 Data acquired from 23 degrees set-point Testing

Figure 13, shows the results of 23 degrees set-point temperature

The objective of this project is to serve as an external cooling system for electrical appliances or any mechanical structure that has a tendency of overheating. The results above are achieved my using a 100w filament bulb, the reason I chose this bulb is, it has a significant light intensity and it produce a very high temperature. Figure 11 above shows the result of 23 degrees set-point temperature, it is clear that the cooling system I used cannot cool the 100w filament light to 23 degrees. The temperature keeps on rising even though the cooling fan is energize, the graph begin to saturate when it approaches 50 degrees Celsius.

Second set point test results 


Table 2 Data Acquired from 50 degrees set-point temperature

Figure 14 shows the results of 50 degrees set-point temperature, from the results above we can see that the temperature took 30 second to reach 50 degrees. This show how powerful the 100w filament light bulb is, the heat increase rate is high. When 50 degrees is reached the fan is energized and start cooling, the temperature breaks the level of the set-point and operate above the set- point. In this cooling period we can see that the temperature doesn’t increase any more it stays between 60 and 50 degrees, therefore temperature is maintained.

Maximum Temperature recorded.


Table 3 Data of Maximum Temperature recorded
Figure 15 Maximum Temperature Recorded

Figure 14 shows the most temperature recorded, 100w filament bulb has high light intensity it produce a very significant heat. Table show the time versus Temperature and it is clear that the temperature is proportionally increasing with time. Because of safety reason I had to stop testing on 115 degrees to avoid any danger that might occur. The temperature didn’t show any sign of saturation meaning the filament 100w bulb has the ability to reach even greater temperature. Seeing how magnificent 100w filament light is, it justify the result of figure 14. The project operate above the set-point on figure 14 meaning this project require more material like heat sink so that is would be easy to remove heat faster and drop the temperature to operates within the range 0f 50 degrees.  

I. Conclusion
The implemented design allows the user to adjust a set point of a temperature, auto detects the room temperature and switches as on the appropriate regulatory device as per the test results of the Fan control subroutine. These functionalities are a demonstration of successfully achieving specific objectives listed in the design.

Acknowledgment

I would to thank Nester Kalamay to help me with the source code design, and also thank my supervisor Dr Ali Ahmed to advise me well and guiding me in building my project.

References

[1] Summerville, D. (2009). Embedded Systems Interfacing for Engineers using the Freescale HCS08 Microcontroller: Digital and Analog Hardware Interfacing. Available from: http://b-ok.org/book/687923/3ad434
[2] Barr, M. (2001, September 07). “Introduction to Pulse Width Modulation”. Pages 103-104
[3] Corporation, N. S. (2011). “LM35 Precision Centigrade Temperature Sensor”.
[4] CPU08 Reference Manual, 1993
[5] C. Park, "Reversal of Temperature Dependence of Integrated Circuits Operating at    Very Low Voltages", IEDM Technical Diges, pp. 71, 1995.
[6] Douglas v. Hall, (2004). “Microprocessor and Interfacing”, Tata McGraw-Hill, Second edition page 39, pages 273-300, pages 330-344
[7] J. P. John, "A Low Voltage Graded-Channel MOSFET (LV-GCMOS) for Sub-1V       Microcontroller Applications", 1996 Symposium on VLSI Technology
[8] James S. Caravella, "A Low Power One Volt 4kB 
For publication. SRAM Design for Embedded Applications",
[9] Schreiber, U (2004). Pulse-Amplitude-Modulation (PWM) Fluorimeter and Saturation Pulse Method: An Overview. Dordrecht: Springer Netherlands. pp. 279–319.
[10] Pharr, M; Humphreys, G. (28 June 2010). Physically Based Rendering: From Theory to Implementation, Retrieved 3 March 2013.
[11] Gregor, E. A. (2012, February 14). “Functions and Advantages of Microchip PIC Microcontroller”.
[12] Microchip. (2006). “Microchip 18F452 Data Sheet-High Performance, Enhanced Flash Microcontrollers with 10-bit A/D”. U.S.A: Microchip Technology Incorporated.
[13] "4-Wire PWM Controlled Fans Specification". 2005-09.
[14] "HD44780U". HITACHI, Semiconductor & Integrated Circuits.
[15] Sandhu, H.S. (2002) Latest Edition. “Hand on Introduction to Robotics” pages 50-88
[16] “Microprocessors and Programmed Logic” (1987) Kenneth L. Short. Page 16
[17] Microchip Technology inl. 2011-2013, “28/40/44-Pin Enhanced Flash Microcontrollers” U.S.A.
[18] P. Ellis & Mantech Electronics (Pty) Ltd, “The PIC16F87X Development unit” Johannesburg, South Africa.
[19] Bates, M. 2018. Interfacing PIC Microcontrollers: Embedded Design by Interactive Simulation. 2end. Newness: Oxford







Comments

Popular posts from this blog

BASIC KNOWLEDGE OF A REFRIGERATION PLANT

State space, Transfer function, state response adjoint, inverse output, input.

Supervisory Control and Data Acquisition (SCADA)