18
HOME AUTOMATION TEMPRATURE CONTROL SUBMITTED BY:- AJITESH PAL SINGH

Fan automation

Embed Size (px)

DESCRIPTION

8051 FAN AUTOMATION WITH PROGRAMMING IN C

Citation preview

Page 1: Fan automation

HOME AUTOMATION

TEMPRATURE CONTROL

SUBMITTED BY:-

AJITESH PAL SINGH

Page 2: Fan automation

INTRODUCTION

The goal of our project is to design a user-friendly home automation system which can be easily integrated into existing homes and businesses.

 It is automation of the home, housework or household activity. 

Home automation may include centralized control of lighting, HVAC (heating, ventilation and air conditioning), appliances, security locks of gates and doors and other systems, to provide improved convenience, comfort, energy efficiency and security.

Page 3: Fan automation

How it works?

Basically it is used to control temperature. At 30°C temp it will work normally but when the

temperature above 30°C the fan will start moving. Temperature will show in the LCD display. Connector is connected with the motor driver and it

will help to rotate the fan.

Page 4: Fan automation

Advantages

 Increasing safety System.  Lighting Control (Centralized). Heat and Cool Control system. Video systems. 

Page 6: Fan automation

Power supply

This is used to control the voltage and current coming from the main supply.

We use step down center tap transformer with fullwave rectifier and 7805 voltage regulator.

Page 7: Fan automation

Fullwave Rectifier

A bridge is simply two fullwave circuits... So. fullwave has the advantage of having half the diode drop.

The PIV is one half that of the center tap circuit.

Page 8: Fan automation

MICROCONTROLLER (AT89S52)

It has inbuilt ram, rom, timer or we can say that it is a small cpu which is used for performing specific task.

AT89S52 microcontroller is made up with c mos technology with operation form 2.7 to 5.5v.

It has 256 B ram and 8k rom,32 i/o lines,16 bit counter/timer,6 interrupts.

It has one full duplex UART.

Page 9: Fan automation

LCD(Liquid Crystal Display)

It is used to display a data It is a 16*2 lcd . It has 16 pins from which it has 8 data lines. Its one block is 5*7 dot matrix pattern.

Page 10: Fan automation

Temperature Sensor LM35

It is precision temperature sensor in celcius. Its sensitivity is linear + 10 mV/°C. It can measure from -55°C and 150°C. Can be used to detect ambient air temperature LM35 Linear Temperature Sensor is based on the

semiconductor LM35 temperature sensor.  The output voltage is proportional to the temperature.

Page 11: Fan automation

ADC0808 (ANOALG TO DIGITAL

CONVERTOR )

It is commonly called ADC. ADC0808 is an 8 bit analog to

digital converter with eight input analog channels.

The default step size is 19.53mV corresponding to 5V reference voltage.

The ADC needs some specific control signals for its operations like start conversion and bring data to output pins.

The voltage reference can be set using the Vref+ and Vref- pins.

Page 12: Fan automation

Motor Driver(L293D) L293D is a dual H-bridge motor

driver integrated circuit (IC). Motor drivers act as current

amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors.

L293D contains two inbuilt H-bridge driver circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in forward and reverse direction.

Page 13: Fan automation

Program

#include<reg51.h> #include"lcd.h" #define MYDATA P3 sbit ADDR_A=P1^7; sbit ADDR_B=P1^6; sbit ADDR_C=P1^5; sbit ALE =P1^4; sbit clock =P1^3; sbit OE =P1^2; sbit EOC =P1^1; sbit SC =P1^0; sbit m1a =P2^0; sbit m1b =P2^1;  unsigned char adc_start(unsigned char ); unsigned char *display_numbers(unsigned

char); unsigned int

speed_on=0,speed_value_on_time=0,speed_value_off_time=1020,t;

Page 14: Fan automation

void timer0(void) i{ clock=~clock;}• unsigned char adc_start(unsigned

char kkk )• { unsigned char value;• TR0=1;• MYDATA=0XFF;• EOC=1;• ALE=0;• OE=0;• SC=0;• ADDR_C=(kkk>>2)&0x01;• ADDR_B=(kkk>>1)&0x01;• ADDR_A=(kkk>>0)&0x01;• delay(50);//for 4ms• ALE=1;• delay(50);//for 4ms• SC=1;• delay(50);//for 4ms• ALE=0;• SC=0;

Page 15: Fan automation

• delay(50);//for 4ms• while(EOC==1);• while(EOC==0);• OE=1;• delay(10);//for 4ms• value=MYDATA;• OE=0;• TR0=0;• return(value);• }• unsigned char *display_numbers(unsigned char

abbc)• {• unsigned char kkk[3],ttt=0;• while(ttt<3)• {• kkk[ttt]=abbc%10;• ttt++;• abbc=abbc/10; • }• return(kkk);}

Page 16: Fan automation

void main(){unsigned char *bb,temp_resister;initialize(); m1a=0;m1b=0;cmd(0x80);ptr("Temperature= ");TMOD=0X02; //mode 2TH0=0xfb;IE=0X82;TR0=0; //timer stopcmd(0xc0);bb[0]=0;bb[1]=0;bb[2]=0;

Page 17: Fan automation

• while(1)• {• temp_resister=adc_start(0x00);• if(temp_resister>30)• {• m1a=0;• m1b=1;• cmd(0xc0);• ptr(" FAN ON ");}•  else• {• m1a=0;• m1b=0;• cmd(0xc0);• ptr(" FAN OFF ");}• bb=display_numbers(temp_resister);• delay(50);• cmd(0x8C);• } • }

Page 18: Fan automation

Thank you