Temperature Dependent Speed Controller Using Thermistor Computer Science Essay

This undertaking is a standalone automatic fan velocity accountant that controls the velocity of an electric fan harmonizing to our demand. This closed loop feedback control system is efficient and dependable by utilizing embedded engineering. Micro accountant ( AT89C51 ) allows dynamic and faster control. Liquid crystal show ( LCD ) makes the system user-friendly. The perceived temperature and fan velocity degree values are at the same time displayed on the LCD panel. It is really compact utilizing few constituents and can be implemented for several applications including air-conditioners, water-heaters, snow meltars, ovens, heat-exchangers, sociables, furnaces, brooders, thermic baths and veterinary operating tabular arraies. AT89C51 micro accountant is the bosom of the circuit as it controls all the maps.

The temperature detector thermal resistor senses the temperature and converts it into an electrical ( parallel ) signal, which is applied to the micro accountant through ADC. The linear signal is converted into digital format by the parallel to-digital convertor ( ADC ) . The perceived and fit values of the temperature are displayed on the 16×2-line LCD. The micro accountant thrusts control relays by agencies of ULN driver circuit to command the fan velocity with the aid of high electrical power tagged wire lesion resistance. Single pole dabble throw ( SPDT ) relays are connected to the micro accountant through a ULN driver circuit. The relays require 12 Vs at a current of around 50 ma, which can non provided by the micro accountant. So the ULN driver circuit is added. The relays are used to run the electrical fan or for operating any other electrical device. Normally the relays remain away. Equally shortly as pin of the micro accountant goes high, the relays operate

This undertaking uses regulated 5V, 500mA & A ; 12V, 500mA power supply. 7805 and 7812 three terminal electromotive force regulators are used for electromotive force ordinance. Bridge type full moving ridge rectifier is used to rectify the Ac out put of secondary of 230/12V measure down transformer. This undertaking is utile in procedure industries for care and controlling temperature.

CHOICE OF MICROCONTROLLER

There are different types of processors and accountants available in the market. Industrial and control application/may necessitate mechanization of the procedure such as temperature, force per unit area, liquid flow, etc. , in order to minimise manual intercession. To automatize any application an intelligent accountant plays a major function. One such accountant proposed for the undertaking is AT89C51, an 8-bit microcontroller.

The AT89C51 is a low-power, high-performance CMOS 8-bit personal computer with 4K bytes of Flash Programmable and Erasable Read Merely Memory ( PEROM ) . The device is manufactured utilizing Atmel ‘s high denseness nonvolatile memory engineering and is compatible with the industry standard MCS-51a„? direction set and pinout. The on-chip Flash allows the plan memory to be reprogrammed in-system or by a con- ventional nonvolatilizable memory coder. By uniting a various 8-bit CPU with Flash on a massive bit, the Atmel AT89C51 is a powerful personal computer which provides a extremely flexible and cost effectual solution to many embedded control appli- cations

The AT89C51 provides the following standard characteristics: 4Kbytes of Flash, 128 bytes of

RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt

architecture, a full semidetached house consecutive port, on-chip oscillator and clock circuitry.In add-on,

the AT89C51 is designed with inactive logic for operation down to zero frequence and

supports two package selectable power salvaging manners. The Idle Mode stops the CPU

while leting the RAM, timer/counters, consecutive port and interrupt system to go on

operation. The Power-down Mode saves the RAM contents but freezes the oscillator

disenabling all other bit maps until the following hardware reset.

CHOICE OF MEMORY

As the system under consideration is utilizing AT89C51 microcontroller it has 4K Bytes of In-System Reprogrammable Flash Memory and EPROM for its intents. The ATMEL AMR codification is stored in an built-in brassy memory. Flash memory can non be reprogrammed invariably. The temperature detector device besides supports the storage of last 10 braces of measurings and new measurings are over written to the older 1. Hence this system is utilizing EEPROM as a information storage memory. Even though EEPROM is slower than Flash memory it can be rewritten as many figure of times as wanted.

Memory Organization

The 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 stuff has been selected and rearranged to organize a speedy and convenient mention for the coders of Atmels microcontroller household of devices. This usher pertains specifically to the AT89C51, AT89LV51, AT89C52, and AT89LV52.

Memory Organization

Program Memory

The AT89C Microcontroller has separate reference infinites for plan memory and informations memory. The plan memory can be up to 64 Kbytes long. The lower references may shack onchip. Figure 1 shows a map of the AT89C51 plan memory, and Figure 2 shows a map of the AT89C52 plan memory. The AT89C10512051 do non hold off-board memory enlargement. Figure 1. AT89C51 Program Memory

Flash Microcontroller Memory Organization

Figure 2. AT89C52 Program Memory

0498A

Data Memory

The AT89C can straight turn to up to 64 Kbytes of informations memory external to the bit. The MOVX direction accesses the external informations memory. ( Refer to the Instruction Set subdivision in this chapter for a elaborate description of instructions ) . The AT89C51 has 128 bytes of on-chip RAM ( 256 bytes in the AT89C52 ) plus a figure of Particular Function Registers ( SFRs ) . The lower 128 bytes of RAM can be accessed either by direct addressing ( MOV data addr ) or by indirect addressing ( MOV Ri ) .

CHOICE OF ADC

ADC0804 ( Analog to Digital Converter )

Figure 3 illustrates the chief map of the ADC0804 i.e. to change over the input signal from temperature

detector device to voltage signifier that has 8-bit end product. This device acts as a memory location or port entry

to the microprocessor and does non necessitate extra logic extension.

ADC0804 design.

To turn out that this design is harmonizing to the specifications hardware, the expression used is as

follows:

ADC out = Ain / Vmax X 256 ( 1.2 )

where ADC out = digital end product value

Ain = Input Gain

Vmax = Maximum electromotive force

Using expression ( 1.2 ) , it is found that:

without amplifier, ADC out = Ain / Vmax X 256

= ( 1/5 ) X 256

= 51 D

= 00110011 B

So that, the temperature value is = 100 / 51 = 1.96A°C a‰… 2A°C

If utilizing amplifier, ADC out = Ain / Vmax X 256

= ( 5 /5 ) X 256

= 256 D

= 1111 1111 B ( Proved )

ADC 0804 Analog to digital convertors find immense application as an intermediate device to change over the signals from parallel to digital signifier. These digital signals are used for farther processing by the digital processors. Assorted detectors like temperature, force per unit area, force etc. change over the physical features into electrical signals that are analog in nature.

A

ADC0804 is a really normally used 8-bit parallel to digital convertor.A It is a individual channel IC, i.e. , it can take merely one parallel signal as input. The digital end products vary from 0 to a upper limit of 255. The measure size can be adjusted by puting the mention electromotive force at pin9. When this pin is non connected, the default mention electromotive force is the operating electromotive force, i.e. , Vcc. The measure size at 5V is 19.53mV ( 5V/255 ) , i.e. , for every 19.53mV rise in the parallel input, the end product varies by 1 unit. To put a peculiar electromotive force degree as the mention value, this pin is connected to half the electromotive force. For illustration, to put a mention of 4V ( Vref ) , pin9 is connected to 2V ( Vref/2 ) , thereby cut downing the measure size to 15.62mV ( 4V/255 ) .A

A

ADC0804 needs a clock to run. The clip taken to change over the parallel value to digital value is dependent on this clock beginning. An external clock can be given at the Clock IN pin. ADC 0804 besides has an inbuilt clock which can be used in absence of external clock. A suited RC circuit is connected between the Clock IN and Clock R pins to utilize the internal clock.

A

Pin Diagram: A

An ADC is an electronic device that converts uninterrupted signals to discrete digital Numberss. The contrary operation is done by a DAC. The digital end product may be utilizing different coding strategies such as binary and two ‘s compliment double star.

Most ADC ‘s are of a type known as linear which means that the scope of input values that map to each end product value has a additive relationship with the end product value.

The ADC used is an IC, ADC 0804.

Features

i‚· Compatible with 8080 AµP derivatives-no interfacing logic needed – entree clip – 135 N

i‚· Easy interface to all microprocessors, or operates “ stand entirely ”

i‚· Differential parallel electromotive force inputs

i‚· Logic inputs and end products run into both MOS and TTL voltage degree specifications

i‚· Works with 2.5V ( LM336 ) electromotive force mention

i‚· On-chip clock generator

i‚· 0V to 5V parallel input electromotive force scope with individual 5V supply

i‚· No nothing adjust required

i‚· 0.3 [ Prime ] standard width 20-pin DIP bundle

i‚· 20-pin molded bit bearer or little outline bundle

i‚· Operates ratiometrically or with 5 VDC, 2.5 VDC, or parallel span adjusted electromotive force mention

CHOICE OF SCHEDULING ALGORITHM.

Many scheduling algorithm have been studied to vouch the existent clip restraints of existent clip procedure. Scheduling determinations of this algorithm is normally based on parametric quantities which are assumed to be chip. However, in many fortunes the values of these parametric quantities are obscure. The vagueness of parametric quantities suggests us to do the use of fuzzed logic to make up one’s mind in what order the petition should be executed to better use the system and as a consequences cut down the opportunity of a petition being missed. Our chief part is suggesting a fuzzed attack to microprocessor/microcontroller existent clip programming in which the programming parametric quantities are treated as fuzzed variables.

Sampling Ratess OF CONTROLLED LOOP

The temperature measuring device Resistance Temperature Detector a step temperature in the scope of -25-150 degree Celsius. But in this application the temperature inside the container is maintained at 25 degree Celsius. There is no much divergence of temperature inside the container. The container temperature does n’t change that much in a 2nd. The declaration of the device is 0.1 degree Celsius if the temperature inside the container varies more than the 0.1 grade Celsius the temperature feeling device can able to observe and the end product will be shown. Suppose the temperature inside the container is altering at the rate of 0.1 degree Celsius per second the end product has the frequence of 1 Hz. So the sampling rate for the device to try or mensurate the temperature need n’t be that high. So the device is utilizing a trying rate of 1 for mensurating temperature i.e. temperature measurement device is holding a sampling frequence of 1 HZ. Number of spots per second will be 10 spots per second ( 1 HZ*10 spots ) which can be easy handled by 10 spot ATMEL ADC.

Temperature Sensor Resolution -A 0.1 grade Celsius

Temperature alteration inside the container -A 1 degree Celsius per minute

So the frequence would be – 0.6 HZ

Sampling frequence = 0.6*5 = 3Hz ( to be greater )

Sampling rate = 0.3 SecondsA

CHOICE OF REAL TIME SCHEDULING ALGORITHM

There are fundamentally four types of existent times scheduling algorithm

Round Robin

Round Robin with interrupt

Function waiting line programming

RTOS ( Real Time Operating System )

A ROUND ROBIN

It is the simplest algorithm. The Round Robin algorithm is characterized by the absence of interrupts. The algorithm consists of a chief cringle that checks each I/O device in bend and Service them if needed. it can non endure from shared information jobs. Latency is limited by the maximal continuance of a loop rhythm. Attractive for simple environments. At the same clip the disadvantage for the algorithm is it can non put precedences. Its worst instance delay for an of import undertaking codification is the amount of executing clip of all the other undertaking codification.

ROUND ROBIN WITH INTERRUPT

The chief advantage of Round Robin with interrupt modus operandis trades with the really pressing demands of devices. Interrupt routines set flags to bespeak the interrupt happened. Main while cringle polls the position of the interrupt flags and does anyA A A A A A A A A A A follow up procedure required by a set flag. It moves more control over precedence.

A FUNCTION QUEUE Scheduling

The advantage of map waiting line programming is latency for high precedence devices can be reduced compared to Round-Robin with Interrupts. In Round-Robin with Interrupts every cringle may stop up put to deathing every follow-up undertaking. Function-Queue Scheduling warrants that at most a individual follow-up undertaking is executed per cringle loop. The chief disadvantage is latency for low precedence undertakings can increase. Low precedence undertakings can really hunger. Line uping algorithm may be complex/costly to run/code. If a low precedence follow-up undertaking is really clip devouring the latency for higher precedence response times will endure.

RTOS

The advantage of RTOS is interrupts signal the demand for follow-up undertakings. But, unlike Function-Queue Scheduling, this is handled by the Real-Time Operating System and non by the interrupt modus operandis pull stringsing flags or a waiting line. Alternatively of a cringle make up one’s minding what to make next the RTOS decides. One follow-up undertaking can be suspended by the RTOS in favouring of executing a higher precedence task.-Queue. Suspension of undertakings allows the worst instance delay for the highest precedence point to be zero. Built-in scheduling mechanism outputs a system with really stable response features even when alterations to the codification occur. Widely available for purchase.

This embedded system is usingA Round Robin SchedulingA as existent clip scheduling algorithm. The device is used to command merely the temperature inside the steel container and so circular redbreast architecture can be set here.

Failure CONDITIONS

The system will neglect merely if the temperature exceeds the scope of the temperature detector.

Since it is a room temperature controller the fluctuation in the room is really slow.

PERFORMANCE MEASURES

As the public presentation step of system is wholly dependent on PID Controller public presentation. So the PID accountant public presentation can be evaluated by the periodic of the parametric quantity afterlife against some baseline values. The public presentation betterment actions are taken consequently on a periodic mode. So the

Procedure Variable

Mistake

Overshoot

Steady province mistake

Settling clip

A

Must be calculated by different values of PID accountants

Controller tuning methods provide the accountant parametric quantities in the signifier of

expression or algorithms. They guarantee that the obtained control system would be stable and would run into. These methods require certain cognition about the controlled procedure. This cognition, which depends on the applied method, normally translates into a transportation map. The aims which should be achieved by the application of the control system are associated with theA control system features Regulating public presentation, Tracking public presentation, Robustness, noise fading.

A

A