Arduino Projects    |   Raspberry Pi  |     Electronic Circuits   |   Electronics Reference Design Library  |   AVR    |    PIC    |    8051    |    Electronic Projects

Temperature Controlled Fan

Description

Table of Contents:

  1. Temperature Controlled Fan
  2. Components Description
Contributor: 
Saif Ullah Qureshi, Lahore, Pakistan

 A simple project using microcontroller AT89S51 to control the speed of 12V fan according to the surrounding temperature. In this project we use the concept of PWM (pulse width modulation) to increase or decrease the speed of fan. We also interface 2*16 characters LCD which shows the outside temperature through the temperature sensor. Followings are the details of the project.

 

Pulse-width modulation (PWM), OR pulse-duration modulation (PDM), is a commonly used technique for controlling power to inertial electrical devices, made practical by modern electronic power switches.

The average value of voltage (and current) fed to the load is controlled by turning the switch between supply and load on and off at a fast pace. The longer the switch is on compared to the off periods, the higher the power supplied to the load is.
 

Temperature Controlled Fan1

Components
•           Microcontroller AT89C52
•           ADC0804 LCN
•           Opt Coupler ILD74
•           Temperature Sensor LM35
•           16*2 LCD Display
•           Voltage Regulator L7805
•           Resistors
•           Capacitors
•           Diodes
•           Transistor TIP120
•           Crystal Oscillator 12MHz
•           Electric Fan 12 V
 
Working criteria
The temperature controlled fan circuit will automatically control the speed of fan according to the temperature. A temperature sensor is used to sense the temperature. The speed of fan increases with the increase in temperature and vice versa and the temperature sensed by temperature sensor on the LCD. We program the micro controller to operate the fan above 25c

Circuit Diagram

Source Code

[restrict:roles=anonymous user] This Code is only visible to Registered users. Please Login/Register [/restrict]

[restrict:roles=authenticated user]


                                ORG 0H

                                LJMP STRT

 

                                ORG 000BH

                                LJMP INTRR

               

                                ORG 0030H

STRT:    

                                SETB P1.5

                                MOV P0,#0FFH

PL:                          SETB P3.5

                                SETB P3.3

                                CLR P3.4

                                SETB P3.4

H9:                         JB P3.5,H9

                                CLR P3.3

                                LCALL INI

                                MOV A,#'M'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'I'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'C'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'R'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'O'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'C'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'O'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'N'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'T'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'R'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'O'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'L'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'L'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'E'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'R'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#0C4H

                                ACALL CW

                                ACALL DE

                                MOV A,#'P'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'R'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'O'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'J'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'E'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'C'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'T'

                                ACALL DWRO

                                ACALL DE

                                ACALL DELAY

                                MOV A,#01H

                                ACALL CW

                                ACALL DE

                                MOV A,#'T'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'E'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'M'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'P'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#' '

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'C'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'O'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'N'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'T'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'R'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'O'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'L'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#' '

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'F'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'A'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'N'

                                ACALL DWRO

                                ACALL DE

                                MOV A,#0C6H

                                ACALL CW

                                ACALL DE

                                MOV TMOD,#02H

                                MOV IE,#82H

                                MOV R1,P0

                                MOV A,R1

                                MOV R4,A

                                ACALL COMPAIR

                                MOV A,R4

                                LCALL CONV

                                LCALL DTA

                                ACALL DELAY

                                LJMP STRT

DELAY:                 

                                MOV R3,#0FFH

H12:       MOV R5,#0FFH

H11:       MOV 73H,#01FH

H13:       DJNZ 73H,H13

H14:       DJNZ R5,H11

                                DJNZ R3,H12

                RET

COMPAIR:

                                CLR C

                                CJNE R1,#30,A4

A4:                         JNC A3

                                CLR C

                                CJNE R1,#25,A5

A5:                         JNC A2

                                CLR TR0

                                LJMP A1                              

A3:                         ACALL GRAT

                                SJMP A1

A2:                         ACALL LOWER

A1:                         CLR C

                                RET

                               

CW:

                                MOV P2,A

                                CLR P3.1

                                CLR P3.0

                                SETB P3.2

                                ACALL DE

                                CLR P3.2

                                RET

DWRO:

                                MOV P2,A

                                SETB P3.1

                                CLR P3.0

                                SETB P3.2

                                ACALL DE

                                CLR P3.2

                                RET

DE:

                                MOV R3,#0FFH

H1:                         DJNZ R3,H1

                                RET

 

INI:         MOV A,#38H

                                ACALL CW

                                ACALL DE

                                MOV A,#0EH

                                ACALL CW

                                ACALL DE

                                MOV A,#01H

                                ACALL CW

                                ACALL DE

                                MOV A,#06H

                                ACALL CW

                                ACALL DE

                                MOV A,#081H

                                ACALL CW

                                ACALL DE

                                RET

DTA:

                                MOV A,R6

                                ACALL DWRO

                                ACALL DE

                                MOV A,R7

                                ACALL DWRO

                                ACALL DE

                                MOV A,#'C'

                                ACALL DWRO

                                ACALL DE

                                RET

 

CONV:

                                MOV B,#10

                                DIV AB

                                MOV R7,B

                                MOV B,#10

                                DIV AB

                                MOV R6,B

                                MOV A,R6

                                ADD A,#30H

                                MOV R6,A

                                MOV A,R7

                                ADD A,#30H

                                MOV R7,A

                                RET

INTRR:

                                CPL P1.5

                                CLR TR0

                                MOV 79H,R2

HE:                         DJNZ 79H,HE

                                SETB TR0

                                CPL P1.5

                                RETI      

GRAT:  

                                CLR TR0

                                MOV R2,#0AAH

                                MOV TH0,#0AFH

                                SETB TR0

                                RET

LOWER:               

                                CLR TR0

                                MOV R2,#0AAH

                                MOV TH0,#1FH

                                SETB TR0

                                RET

END

[/restrict]

 

Comments (49)

 i want c program sir........

 i want c program sir........

i want the whole project

i want the whole project details...........pls help me

 

i also need the c proramming

i also need the c proramming of this project....

pls attach the c coding

pls attach the c coding

can i get this whole project

can i get this whole project too..it will help me a lot...

why when i run this code,the

why when i run this code,the micro c programme display internal error

please tell me from where you

please tell me from where you get the code and how i am worry because they want subscription charges??

Hello Sir, can i get C code

Hello Sir, can i get C code too??? and a complete diagram, that will be great, thank you

 i want the whole

 

i want the whole project........

p/z send the circuit diagram on this email::

salman.ahmad771@gmail.com

i need the circuit diagram

i need the circuit diagram and code in C . plz if u could send me ... i'll be thankfull to you...

saad_noor23@yahoo.com

Plz attach c code...... 

Plz attach c code......

 

I would be very grateful if

I would be very grateful if you could email me the entire project Emmaokudu@yahoo.com

can i get the c proramming of

can i get the c proramming of this project.. sofea.pinky@yahoo.com

can i get the  c program for

can i get the  c program for this project..........

 

can i get the  circuit

can i get the  circuit diagram and code in hex and c for this project...........

 

Can i get the whole project

Can i get the whole project with programming code

can i get c program of this

can i get c program of this and ckt dig too

Please, can I get more

Please, can I get more details about this project and the code used? Thank you so much in advance.

My email address joe_rocky2000@yahoo.com

can i get this projectmy

can i get this project

my email id-parthchoksi16@yahoo.in

 

can i get c code and circuit

can i get c code and circuit diagram of this project.?

 

 

 can i get the circuit

 can i get the circuit diagram and the C code in hex.....what type of software u used to design the schematic circuit

 

Plg send c code

Plg send c code

Could you send me the C  code

Could you send me the C  code ? . Thank you.

Hi,I am having assembly code

Hi,

I am having assembly code you have given with this project,

will you please send me the meaning of each function with details ( how you have used that function or meaning of that line)

Hi sir  i need  c source code

Hi sir  i need  c source code of this project 

could  you please send me..my mail id prasanna.yadravi@gmail.com

 

thanks & regards

prasan.

Sir, Please may i have the C

Sir, Please may i have the C source code?

 

gimznc@gmail.com 

Interested in this project

Interested in this project can I get the video of the project and whole project programming code.

 

Thank You.

Latha Caleb

 

email: calebkumar1977@gmail.com

 

I want c code too sir...can u

I want c code too sir...

can u plz send it to me...

pnkboola@gmail.com

please send me the circuit

please send me the circuit and program of temprature controlled fan using 8051 its very urgent

hello sir    i need c code

hello sir

    i need c code for this alp 

       

Please send me complete

Please send me complete coding for keil....I Need it urgent at

'tahirfs111@yahoo.com'

Saif Ullah Qureshi you

Saif Ullah Qureshi you contributed a lot...... can i get the circuit diagram and the C code in hex.....Are you used Keil for hex and proteus to simulate??? Please send me further instructions if needed at tahirfs111@yahoo.com..........  I'm from faisalabad please send me your contact no or text me at '03029118492'

I,ll be thankful to you,

Regards Tahir from NFC IEFR FSD

I want whole project

I want whole project report...

i m goin to make this

i m goin to make this project,can u please mail the full details with the list of components mentioned properly,because its not mentioned which diodes should be used.And i also need the proper circuit diagram to understand where to connect which component.

want c

want c code, 

dhamecha_parth@yahoo.com

can i get the circuit diagrm

can i get the circuit diagrm and c code for this project. i need it...it urgent...

 

Can i get the whole project

Can i get the whole project please?

lsengaung@gmail.com, can u send to this gmail?? thank

can i get the whole

can i get the whole project?

my email is "eugene_liewyq"     "@hotmail.com"

i need a c program for

i need a c program for this

pls send it soon to my email id.........

i need c code 

i need c code

 

Hej, can I get all project

Hej, can I get all project details, please?

 

If yes, can you send it to my email: jantuoor@gmail.com

 

 

All best,

 

Jan

Please , can i get this code

Please , can i get this code in HEX file ?

or can i get the whole project please?

 my email: dimevski@hotmail.com

 Thank You !

 

 

                             

                         

 

                              very good project please try to get in c code aslo its very usefull to every one .

can i get the whole copy of

can i get the whole copy of the project with its full details

Assalamu Alaikum..Could u

Assalamu Alaikum..

Could u plss share C code if u have.

i want circuit and c coding

i want circuit and c coding of this project

plzz i neeed

plzz i neeed codee,,,,,,,,,,,,,send me

 

 

Sir...pls send me the c prog

Sir...pls send me the c prog ....its really urgent

Opto-coupler ILD74 is not

Opto-coupler ILD74 is not available. pls sugest an alternative coupler for it !! its urgent. thanks.

APPLICATIONS & TECHNOLOGIES

Learn about the latest applications and industry trends with tutorials and white paper design resources on vertical markets.

Automotive
Energy Harvesting
MEMS Technology
OpenSource Hardware
RFID & NFC
RF Wireless
Sensor
Solar
Touch
Wireless Charging

 

You are here