temperature based fan control with atmega32 microcontroller
#1

please sent me the program for temperature controlled dc fan using atmega microcontroller.
Reply
#2

Temp based fan speed control
1. IISTTEMPERATURE BASED FAN SPEED CONTROL INSTRUMENTATION AND MEASUREMENT LAB PROJECT 5TH SEMESTER AVIONICS KOSURU SAI MALLESWAR (SC09B093) DHRUTI RANJAN GAAN (SC09B017) MYNAM HARINATH (SC09B146)
2. Contents 1. INTRODUCTION 2. THEORY 2.1. LM35 (Temperature sensor) 2.2. ATMEGA micro controller unit 2.3. Brushless variable speed DC motor [DR-6634-514] 2.4. N mosfet (BUK9575-100A) 2.5. PWM (Pulse width modulation) 3. METHODOLOGY 3.1. Circuit schematic 3.2. Control algorithm - Flow chart 3.3. Hardware implementation 3.4. Software implementation 4. APPLICATIONS 5. CONCLUSION APPENDIX Program code List of components
3. 1. INTRODUCTIONThe idea behind the project TEMPERATURE BASED FAN SPEED CONTROL is to control thespeed of the fan using microcontroller based on the variation in temperature detected by thetemperature sensor.In this project we are using LM35 series analog temperature sensor. This is a precision integrated-circuit, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. It israted to operate over a -55° to +150°C temperature range. It has + 10.0 mV/°C linear scalefactor.The output of this sensor will be connected to ATMEGA-32 micro controller’s PORT-A. Theinbuilt ADC in ATMEGA is used for converting into Digital format. That will be used by ATMEGAto generate control logic. Then the PWM output from ATMEGA micro-controller is given tovariable speed DC motor through a motor driver stage.
4. 2. THEORY2.1. LM35 TEMPERATURE SENSORThe LM35 series are precision integrated-circuit temperature sensors, whose output voltage islinearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage overlinear temperature sensors calibrated in ° Kelvin, as the user is not required to subtract alargeconstant voltage from its output to obtain convenient Centigradescaling. The LM35 does notrequire any external calibration or trimming to provide typical accuracies of ± 1/4°Cat roomtemperature and ±3/4°C, over a full -55 to +150°Ctemperature range. Low cost is assured bytrimming andcalibration at the wafer level. The LM35’s low output impedance,linear output, andprecise inherent calibration makeinterfacing to readout or control circuitry especially easy. Itcan beused with single power supplies, or with plus andminus supplies. As it draws only 60 µA from itssupply, it hasvery low self-heating, less than 0.1°C in still air. The LM35 israted to operate over a -55° to +150°C temperature range.Full range centigrade temperature sensor:MATHEMATICAL MODELLING:Range of sensor output: -550 mV to 1500mV (for temperature range of -55 to 150 degree Celsius).Range of ADC input for ATMEGA: 0 to 5 VADC output: 0 To1023 (10 bit)For every 1 degree Celsius temperature rise , rise of sensor output is 10mVFor every 5 milli volt input rise to ADC, count increments by 1ADC_OUT = 1023 * (ADC_IN)/5000;So Temperature = ADC_OUT /2.046;
5. 2.2. ATMEGA-32 MICRO CONTROLLER UNIT:Microcontrollers must contain at least two primary components – memory (RAM), and aninstruction set. RAM is a type of internal logic unit that stores information temporarily. RAMcontents disappear when the power is turned off. While RAM is used to hold any kind of data, someRAM is specialized, referred to as registers. The instruction set is a list of all commands and theircorresponding functions. During operation, the microcontroller will step through a program (thefirmware). Each valid instruction set and the matching internal hardware that differentiate onemicrocontroller from another.Most microcontrollers also contain read-only memory (ROM), programmable read-only memory(PROM), or erasable programmable read-only memory (EPROM). Al1 of these memories arepermanent: they retain what is programmed into them even during loss of power. They are used tostore the firmware that tells the microcontroller how to operate. They are also used to storepermanent lookup tables. Often these memories do not reside in the microcontroller; instead, theyare contained in external ICs, and the instructions are fetched as the microcontroller runs. Thisenables quick and low-cost updates to the firmware by replacing the ROM.Where would a microcontroller be without some way of communicating with the outside world?This job is left to input/output (I/O) port pins. The number of I/O pins per controllers varies greatly,plus each I/O pin can be programmed as an input or output (or even switch during the running of aprogram). The load (current draw) that each pin can drive is usually low. If the output is expectedto be a heavy load, then it is essential to use a driver chip or transistor buffer.Most microcontrollers contain circuitry to generate the system clock. Thissquare wave is theheartbeat of the microcontroller and all operations aresynchronized to it. Obviously, it controls thespeed at which the microcontrollerfunctions. All that needed to complete the clock circuit would bethe crystal or RCcomponents. We can, therefore precisely select the operating speed critical tomanyapplications.To summarize, a microcontroller contains (in one chip) the following elements:  Instruction set  RAM  ROM,PROM or EPROM  I/O ports  Clock generator  Reset function  Watchdog timer  Serial port  Interrupts  Timers  Analog-to-Digital converters  Digital-to-Analog converters
6. In order to maximize performance and parallelism, the AVR uses a HARVARD architecture with separatememories and buses for program and data. Instructions in the program memory are executed with a singlelevel pipelining. While one instruction is being executed, the next instruction is pre-fetched from the programmemory. This concept enables instructions to be executed in every clock cycle.
7. 2.3. Brushless variable speed DC motor [DR-6634-514]Brushless DC motors use a rotating permanent magnet or soft magnetic core in the rotor, and stationaryelectrical magnets on the motor housing. A motor controller converts DC to AC. This design is simplerthan that of brushed motors because it eliminates the complication of transferring power from outside themotor to the spinning rotor. Advantages of brushless motors include long life span, little or nomaintenance, and high efficiency. Disadvantages include high initial cost, and more complicated motorspeed controllers. Some such brushless motors are sometimes referred to as "synchronous motors"although they have no external power supply to be synchronized with, as would be the case with normalAC synchronous motors.DC Motor DR-6634-514:
8. 2.4. BUK9575-100A:Logic level N-channel enhancement mode Metal Oxide SemiconductorField-Effect Transistor(MOSFET) in a plasticpackage, using Trench MOS technology. This product has been designed and qualified to the appropriate AEC standardfor use in automotive critical applications. It has low conduction losses due to low on-state resistance.This transistor canbe switched on and off very rapidly (millions of times per second) and can handle the large currents required for bigmotors.Specifications:2.5. PULSE WIDTH MODULATION:The Pulse-Width-Modulation (PWM) in microcontroller is used to control duty cycle of DC motordrive. PWM is an entirely different approach to controlling the speed of a DCmotor. Power issupplied to the motor in square wave of constant voltage butvarying pulse-width or duty cycle. Dutycycle refers to the percentage of one cycleduring which duty cycle of a continuous train of pulses.Since the frequency is heldconstant while the on-off time is varied, the duty cycle of PWM isdetermined by thepulse width. Thus the power increases duty cycle in PWM.The expression of duty cycle is determined by, Basically, the speed of a DC motor is a function of the input power and drive characteristics. Whilethe area under an input pulse width train is measure of theaverage power available from such aninput.
9. 3. METHODOLOGY3.1. CircuitschematicTongueins used in ATMEGA 32TongueORTA: pin 0 is for giving analog input from sensorPORTC: pins 0,1,2,3 are connected to D4, D5, D6, D7 for data transmission to LCD; Pins 4, 5, 6 are connected to EN, RD, RS of LCD module.PORTB: pin 3 is used for PWM output
10. 3.2. Control algorithm Flow chart:
11. 3.3. Hardware implementation:Micro controller unit is used as the controller to maintain the DC motor speed at desired value, based on theinput from the temperature sensor, in order to control the temperature.The duty cycle of the PWM (Pulsewidth modulation) from microcontroller will determine the speed of the DC motor.Block diagram:Most digital logic circuits and processors need a +5 volt power supply. To use these parts we need tobuild a regulated +5 volt source. Usually, we start with an unregulated power supply ranging from 9volts to 15 volts DC. To make +5 volt power supply, we can use a LM7805 voltage regulator IC.Sometimes the input supply line may be noisy. To help smooth out this noise and get a better 5 voltoutput, capacitors can be added to the circuit.3.4. Software Implementation:For software implementation, we used AVR STUDIO for writing programs for microcontroller inEmbedded C language. We have imported the HEX file formed into EXTREME BURNER-AVR,and then programmed the micro controller through USB cable interface.Main steps involved in the program:  Initialization of the port A for analog input from sensor  Initialization of LCD module for displaying temperature  Initialization of the PWM module  Initialization of the TIMER 1The micro controller reads the input from the sensor with fixed amount of delays. Then, the analoginput is converted into 10 bit digital format by ADC unit inside the micro controller, which indicatesthe temperature. Depending on the temperature value, the PWM duty cycle will be adjusted by themicro controller.
12. PWM output waveforms for different temperature ranges:For Duty cycle 20% (25 to 35 deg) For Duty cycle 40% (35 to 45 deg)For duty cycle 60% (45 to 55 deg) For Duty cycle 80% (55 to 65 deg)
13. 4. Applications Temperature based fan speed controller is useful for cooling the processor in the laptops and personal computers “more efficiently”. Generally fan in laptop comes with only two or three possible speeds. So it results in more power consumption. The fan designed in this project, has different values of speed according to temperature change. This can be also used in small scale industries for cooling the electrical/mechanical equipment. The whole circuit except motor and fan can be manufactured on a single PCB, and it can be used for temperature based control operations. 5. CONCLUSION Here, we did the project with a fan speed with fixed PWM duty cycle for each 10 degree centigradeinterval from 25 to 65 degree Celsius. Care should be taken such that delays will not affect the open loopcontrol system performance. Temperature should not vary abruptly, otherwise it will cause degradation ofthe system performance.
14. APPENDIXPROGRAM CODE:#include <avr/io.h>#include <avr/delay.h>#include <avr/interrupt.h>#include <avr/signal.h>#include "lcd.h"void InitPWM(){ TCCR0|=(1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00); DDRB|=(1<<PB3); }void InitADC(){ ADMUX=(1<<REFS0);ADCSRA=(1<<ADEN)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0); }uint16_t ReadADC(uint8_t ch){ ch=ch&0b00000111; ADMUX|=ch; ADCSRA|=(1<<ADSC); while(!(ADCSRA & (1<<ADIF))); ADCSRA|=(1<<ADIF); return(ADC); }void SetPWMOutput(uint8_t duty){ OCR0=duty; }void Wait(){ uint8_t i; for(i=0;i<20;i++) _delay_loop_2(0); }int main(void){ uint16_t temp;uint8_t i=0;uint16_t j=0,k=0;
15. initPWM(); uint16_t adc_result; InitLCD(LS_BLINK|LS_ULINE); LCDClear();InitADC();while (1){ LCDClear(); LCDWriteString("FAN CONTROL"); LCDWriteStringXY(0,1,"TEM="); adc_result=ReadADC(0); temp=(adc_result/2); LCDWriteIntXY(4,1,temp,4); if (temp<=25) { SetPWMOutput(0); } if (temp>25&&temp<=35) { SetPWMOutput(50); } if (temp>35&&temp<45) { SetPWMOutput(100); } if (temp>45&&temp<=55) { SetPWMOutput(150); } if (temp>55&&temp<=65) { SetPWMOutput(200); } if (temp>=65) { SetPWMOutput(245); }_delay_loop_2(0);}}
16. LIST OF COMPONENTS: 1. LM35 (Temperature sensor) 2. ATMEGA32 micro-controller unit 3. Brushless variable speed DC motor [DR-6634-514] 4. N mosfet (BUK9575-100A) 5. Resistors (10k ohm,1k ohm) 6. Breadboard 7. Red LED 8. LM7805 voltage regulator IC 9. Diodes (1N914) 10. Capacitors (0.1uf )

Temperature based speed control of fan using microcontroller
1. GUIDED BY :SUMAN SWAMI PREPARED BY :SUCHITRA [10EEBEC081] SUMAN SIDH [10EEBEC083]
2. INTRODUCTION In this project we are using LM35 series analog temperature sensor. This is a precision integrated circuit, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. It is rated to operate over a -55 degree to + 150 degree Celsius temperature range. It has +10.0mV/Celsius linear scale factor. The output of this sensor will be connected to ATMEGA-32 Micro-controller ‘s PORT-A. The inbuilt ADC in ATMEGA is used for converting into Digital format. That will be used by ATMEGA to generate control logic. Then the PWM output from ATMEGA micro-controller is given to variable speed DC motor through a motor driver stage.
3. COMPONENTS 1) LM35(TEMPERATURE SENSOR)
4. 2) ATMEGA32 micro-controller unit A micro-controller contains (in one chip) the following elements : 1) Instruction set 2) RAM 3) ROM, PROM or EPROM 4) I/O ports 5) Clock generator 6) Reset function 7) Watching timer 8) Serial port 9) Interrupts 10)Timers 11)Analog-to-Digital converters 12)Digital-to-Analog converters
5. 3) Brushless variable speed DC Motor [DR-6634-514]
6. 4) N-MOSFET (BUK9575-100A)
7. 5) Resistors (10k ohm, 1k ohm) 6) LM7805 Voltage regulator IC 8) Breadboard 7) Diodes(1N914) 9) Capacitors(0.1 ) & Red LED
8. PULSE WIDTH MODULATION The expression of duty cycle is determined by : METHODOLOGY
9. Control Algorithm Flow Chart
10. Hardware Implementation Block Diagram Software Implementation Main steps involved in the program:  Initialization of the port A for analog input from sensor  Initialization of LCD module foe displaying temperature  Initialization of the PWM module  Initialization of the TIMER 1
11.     Personal computers Exhaust fans in large hotels Washing machines CD and DVD players
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: atmega32 microcontroller based scrolling display, pid controller atmega32 code, temperature based motorspeed control using canbus, create a speedometer lcd avr atmega32, microcontroller based temprature control fan, dc motor speed control using microcontroller atmega32, microcontroller based temperature and control,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Lm35 Temperature Sensor using Microprocessor 8086 0 783 23-06-2021, 02:59 PM
Last Post:
  code for avr atmega16 with gsm 900 to control light 2 975 24-01-2019, 12:03 PM
Last Post:
  effect of avenue trees on temperature under canopy and outside project 0 1,071 20-10-2018, 01:12 PM
Last Post: Guest
  download ajay deshmukh microcontroller 8051 pdf 0 705 13-10-2018, 02:02 AM
Last Post: Guest
  project on door lock system using 8085 microcontroller 0 753 04-10-2018, 10:39 PM
Last Post: Guest
  adaptive cruise control seminar report pdf for download 0 1,141 02-10-2018, 11:48 AM
Last Post: Guest
  download journal papers on new techniques of erosion control in hilly roads 0 681 12-08-2018, 11:12 PM
Last Post: Guest
  ppt on automatic vehicle speed control by using rfid 0 664 03-08-2018, 09:24 PM
Last Post: Guest
  traffic light control system using 8086 code 0 831 12-07-2018, 09:46 AM
Last Post: Guest
  project on door lock system using 8085 microcontroller 0 649 14-05-2018, 11:03 PM
Last Post: Guest

Forum Jump: