Tuesday, June 4, 2019
Temperature Dependent Speed Controller Using Thermistor Computer Science Essay
Temperature Dependent Speed Controller Using Thermistor Computer Science EssayThis project is a standalone automatic fan speed restrainer that encounters the speed of an electric fan according to our requirement. This closed enlace feedback control system is efficient and reliable by using embedded technology . Micro controller (AT89C51) allows dynamic and faster control. Liquid crystal display (LCD) makes the system user-friendly. The sensed temperature and fan speed train values are simultaneously displayed on the LCD panel. It is very compact using few components and can be implemented for several applications including air-conditioners, water-heaters, snow meltars, ovens, heat-exchangers, mixers, furnaces, incubators, caloric baths and veterinary operating tables. AT89C51 micro controller is the heart of the circuit as it controls all the forges.The temperature sensor thermistor senses the temperature and converts it into an electrical (analog) signal, which is applied to t he micro controller by dint of ADC. The analog signal is converted into digital weeat by the analog to-digital converter (ADC). The sensed and place values of the temperature are displayed on the 162-line LCD. The micro controller drives control relays by means of ULN driver circuit to control the fan speed with the help of high wattage tagged wire wound resistor. integrity pole dabble throw (SPDT) relays are attached to the micro controller through a ULN driver circuit. The relays require 12 volts at a live of around 50 mA, which cannot provided by the micro controller. So the ULN driver circuit is added. The relays are utilize to ope pose the electrical fan or for operating either some other electrical whatchamacallit. Normally the relays remain off. As soon as pin of the micro controller goes high, the relays operateThis project uses regulated 5V, 500mA 12V, 500mA power bring home the bacon. 7805 and 7812 iii terminal voltage regulators are used for voltage regulati on. Bridge type full wave rectifier is used to rectify the ac out put of second-string of 230/12V step down transformer. This project is useful in process industries for maintenance and controlling temperature.CHOICE OF MICROCONTROLLERThere are different types of processors and controllers available in the market. industrial and control application/ may require automation of the process such as temperature, pressure, liquid flow, etc., in order to minimize manual intervention. To automate any application an intelligent controller plays a major role. One such controller proposed for the project is AT89C51, an 8-bit microcontroller.The AT89C51 is a low-power, high- capital punishment CMOS 8-bit microcomputer with 4K bytes of ignite computer programmemable and Erasable pick up Only Memory (PEROM). The device is manufactured using Atmels high density nonvolatile memory technology and is compatible with the industry standard MCS-51 instruction set and pinout. The on-chip Flash allows the course memory to be reprogrammed in-system or by a con- ventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control appli- cationsThe AT89C51 provides the acquireing standard features 4Kbytes of Flash, 128 bytes of take, 32 I/O lines, two 16-bit timer/counters, a five vector two-level exposearchitecture, a full duplex ensuant port, on-chip oscillator and clock circuitry.In addition,the AT89C51 is designed with static logic for operation down to zero frequence andsupports two software selectable power saving modes. The Idle Mode bread the CPUwhile allowing the RAM, timer/counters, serial port and interrupt system to continuefunctioning. The Power-down Mode saves the RAM contents but freezes the oscillatordisabling all other chip functions until the succeeding(prenominal) hardware reset.CHOICE O F MEMORYAs the system under consideration is using AT89C51 microcontroller it has 4K Bytes of In-System Reprogrammable Flash Memory and EPROM for its purposes. The ATMEL AMR code is stored in an inbuilt flash memory. Flash memory cannot be reprogrammed constantly. The temperature sensor device also supports the storage of last ten pairs of measurements and new measurements are over written to the older one. Hence this system is using EEPROM as a data storage memory. Even though EEPROM is slower than Flash memory it can be rewritten as many number of times as wanted.Memory OrganizationThe information presented in this chapter is collected from the Microcontroller Architectural Overview, AT89C51, AT89LV51, AT89C52, AT89LV52, AT89C2051, and AT89C1051 data sheets of this book. The material has been selected and rear persistd to form a quick and convenient reference for the programmers of Atmels microcontroller family of devices. This guide pertains specifically to the AT89C51, AT89LV51 , AT89C52, and AT89LV52.Memory OrganizationProgram MemoryThe AT89C Microcontroller has separate address spaces for program memory and data memory. The program memory can be up to 64 Kbytes long. The lower addresses may reside onchip. Figure 1 shows a map of the AT89C51 program memory, and Figure 2 shows a map of the AT89C52 program memory. The AT89C10512051 do not have off-board memory expansion. Figure 1. AT89C51 Program MemoryFlash Microcontroller Memory OrganizationFigure 2. AT89C52 Program Memory0498AData MemoryThe AT89C can directly address up to 64 Kbytes of data memory external to the chip. The MOVX instruction accesses the external data memory. (Refer to the pedagogy Set section in this chapter for a detailed description of instructions). The AT89C51 has 128 bytes of on-chip RAM (256 bytes in the AT89C52) plus a number of Special Function Registers (SFRs). The lower 128 bytes of RAM can be accessed either by direct addressing (MOV data addr) or by indirect addressing (MOV R i).CHOICE OF ADCADC0804 (Analog to Digital Converter)Figure 3 illustrates the main function of the ADC0804 i.e. to convert the input signal from temperaturesensor device to voltage form that has 8-bit output. This device acts as a memory location or port foundationto the microprocessor and does not require additional logic extension.ADC0804 design.To prove that this design is according to the specifications hardware, the formula used is asfollowsADC out = Ain / Vmax X 256 (1.2)where ADC out = digital output valueAin = Input GainVmax = Maximum voltageUsing formula (1.2), it is found thatwithout amplifier, ADC out = Ain / Vmax X 256= (1/5) X 256= 51 D= 00110011 BSo that, the temperature value is = 100 / 51 = 1.96C 2CIf using amplifier, ADC out = Ain / Vmax X 256= (5 /5) X 256= 256 D= 1111 1111 B (Proved)ADC 0804 Analog to digital converters find huge application as an intermediate device to convert the signals from analog to digital form. These digital signals are used for further p rocessing by the digital processors. Various sensors like temperature, pressure, force etc. convert the physical characteristics into electrical signals that are analog in nature.ADC0804 is a very comm single used 8-bit analog to digital convertor.It is a single channel IC, i.e., it can take only one analog signal as input. The digital outputs vary from 0 to a maximum of 255. The step size can be adjusted by setting the reference voltage at pin9. When this pin is not connected, the default reference voltage is the operating voltage, i.e., Vcc. The step size at 5V is 19.53mV (5V/255), i.e., for every(prenominal) 19.53mV rise in the analog input, the output varies by 1 unit. To set a particular voltage level as the reference value, this pin is connected to half the voltage. For example, to set a reference of 4V (Vref), pin9 is connected to 2V (Vref/2), thereby reducing the step size to 15.62mV (4V/255).ADC0804 needs a clock to operate. The time taken to convert the analog value to di gital value is hooked on this clock source. An external clock can be given at the Clock IN pin. ADC 0804 also has an inbuilt clock which can be used in absence of external clock. A suitable RC circuit is connected between the Clock IN and Clock R pins to use the inner clock.Pin DiagramAn ADC is an electronic device that converts continuous signals to discrete digital numbers. The reverse operation is done by a DAC. The digital output may be using different coding schemes such as binary and twos compliment binary.Most ADCs are of a type known as analog which means that the range of input values that map to each output value has a linear relationship with the output value.The ADC used is an IC, ADC 0804.Features Compatible with 8080 P derivatives-no interfacing logic needed access time 135 ns Easy interface to all microprocessors, or operates stand alone Differential analog voltage inputs logic inputs and outputs meet both MOS and TTL voltage level specifications Works with 2.5V (LM336) voltage reference On-chip clock generator 0V to 5V analog input voltage range with single 5V supply No zero adjust required 0.3Prime standard width 20-pin DIP big bucks 20-pin molded chip carrier or small outline package Operates ratiometrically or with 5 VDC, 2.5 VDC, or analog span adjusted voltage referenceCHOICE OF SCHEDULING algorithmic program.Many scheduling algorithm have been examine to guarantee the real(a) time constraints of real time process. Scheduling decisions of this algorithm is usually based on parameters which are assumed to be crisp. However, in many circumstances the values of these parameters are vague. The vagueness of parameters suggests us to make the usage of fuzzy logic to decide in what order the request should be executed to better utilize the system and as a results reduce the chance of a request being missed. Our main contribution is proposing a fuzzy approach to microprocessor/microcontroller real time scheduling in which the scheduling p arameters are treated as fuzzy variables.SAMPLING RATES OF CONTROLLED LOOPThe temperature measurement device Resistance Temperature detector a measure temperature in the range of -25-150 degree Celsius. But in this application the temperature inside the container is maintained at 25 degree Celsius. There is no much deviation of temperature inside the container. The container temperature doesnt vary that much in a second. The resolution of the device is 0.1 degree Celsius if the temperature inside the container varies more than the 0.1 degree Celsius the temperature sensing device can able to detect and the output will be shown. Suppose the temperature inside the container is changing at the rate of 0.1 degree Celsius per second the output has the frequency of 1 Hz. So the sampling rate for the device to sample or measure the temperature neednt be that high. So the device is using a sampling rate of 1 for measuring temperature i.e. temperature measurement device is having a sampling frequency of 1 HZ. Number of bits per second will be 10 bits per second (1 HZ*10 bits) which can be easily handled by 10 bit ATMEL ADC.Temperature Sensor Resolution 0.1 degree CelsiusTemperature change inside the container 1 degree Celsius per blink of an eyeSo the frequency would be 0.6 HZSampling frequency = 0.6*5 = 3Hz (to be greater)Sampling rate = 0.3 SecondsCHOICE OF REAL TIME SCHEDULING ALGORITHMThere are basically four types of real times scheduling algorithmRound RobinRound Robin with interruptFunction waiting line schedulingRTOS( Real Time Operating System)ROUND ROBINIt is the simplest algorithm. The Round Robin algorithm is characterized by the absence of interrupts. The algorithm consists of a main loop that checks each I/O device in turn and Service them if needed. it cannot suffer from shared data problems. Latency is limited by the maximum duration of a loop cycle. Attractive for simple environments. At the same time the disadvantage for the algorithm is it cannot set priorities. Its worst suit wait for an important caper code is the sum of execution time of all the other task code.ROUND ROBIN WITH INTERRUPTThe main advantage of Round Robin with interrupt routines deals with the very urgent needs of devices. Interrupt routines set flags to indicate the interrupt happened. Main while loop polls the status of the interrupt flags and does any follow up process required by a set flag. It moves more control over antecedence. FUNCTION QUEUE SCHEDULINGThe advantage of function dress scheduling is latency for high priority devices can be reduced compared to Round-Robin with Interrupts. In Round-Robin with Interrupts every loop may end up executing every reassessment task. Function-Queue Scheduling guarantees that at most a single follow-up task is executed per loop iteration. The main disadvantage is latency for low priority tasks can increase. Low priority tasks can actually starve. Queuing algorithm may be complex/costly to run/code. If a low priority follow-up task is very time consuming the latency for higher priority response times will suffer.RTOSThe advantage of RTOS is interrupts signal the need for follow-up tasks. But, hostile Function-Queue Scheduling, this is handled by the Real-Time Operating System and not by the interrupt routines manipulating flags or a queue. Instead of a loop deciding what to do next the RTOS decides. One follow-up task can be suspended by the RTOS in favouring of performing a higher priority task.-Queue. Suspension of tasks allows the worst case wait for the highest priority item to be zero. Built-in scheduling mechanism yields a system with very stable response characteristics even when changes to the code occur. wide available for purchase.This embedded system is usingRound Robin Schedulingas real time scheduling algorithm. The device is used to control only the temperature inside the steel container and so round robin architecture can be set here.FAILURE CONDITIONSThe system will fa il only if the temperature exceeds the range of the temperature sensor.Since it is a room temperature controller the variation in the room is very slow.PERFORMANCE MEASURESAs the performance measure of system is totally dependent on PID Controller performance. So the PID controller performance can be evaluated by the periodic of the parameter hereafter against some baseline values. The performance improvement actions are taken accordingly on a periodic manner. So theProcess VariableErrorOvershootSteady state hallucinationSettling timeMust be calculated by different values of PID controllersController tuning methods provide the controller parameters in the form offormula or algorithms. They ensure that the obtained control system would be stable and would meet. These methods require certain knowledge about the controlled process. This knowledge, which depends on the applied method, usually translates into a transfer function. The objectives which should be achieved by the applicatio n of the control system are associated with the control system features Regulating performance, Tracking performance, Robustness, noise attenuation.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.