• 沒有找到結果。

尋熱變頻風扇系統之設計與製作

N/A
N/A
Protected

Academic year: 2021

Share "尋熱變頻風扇系統之設計與製作"

Copied!
36
0
0

加載中.... (立即查看全文)

全文

(1)

The Design and Development of a Heat-seeking Varying Speed Fan System

作者:張太和、張庭瑞、張晉哲、柯昱彰、黃楷淯

系級:電機工程學系 二甲

學號:D0073383、D0073663、D0073322、D0073719、D0031904

開課老師:何子儀

課程名稱:微處理機系統實習

開課系所:電機工程學系

開課學年:101 學年度 第 2 學期

(2)

AT89S52

ADC0804

CONN FLEX2

ADC0804

3

(

/

(3)

Abstract

This is primarily used AT89S52, ADC0804, CONN FLEX2

(thermistor) to detect the temperature change.

The internal resistance of the thermistor varies as the temperature

changes.

The variation of the internal resistance is convected to the digital

signal by using the ADC convecter and then fed to the microcontroller .

Then through the program to determine the temperature difference at

both ends.

If the ends of the temperature sense were the sensed temperature is

not much difference, that the temperature on both sides of the temperature

almost without heat source is heating.

If the temperature is a little big difference represents one side of the

thermistor has to feel heat, we need to find the direction of the heat source

and determines the temperature level.

The use of three kinds of lights flashing (red / yellow / green ) each

representing different temperature ranges .

The current range of high and low temperature heat source is

displayed.

When it is judged complete, the motor and the fan will start turning

toward the higher temperature side, if the same side of the thermistor

resistance moment.

Then a big difference on behalf of the heat source heating is very fast,

the fan starts after a few seconds will be staying near a heat source, to

achieve immediate cooling effect.

In addition, if the temperature is high, the fan speed will be enhanced

and sustained detect heat.

If the heat source or away from the temperature decreases, the fan

speed will be reduced, to achieve a frequency effect.

(4)

……….i

Abstract

………ii

………..iii

... 1

... 3

... 11

... 13

... 17

... 18

... 19

... 21

……….26

(5)

(6)
(7)

2.1

(1)

AT89S52

2.2

2.3

AT89S52

(2)ADC0804

(3)

conn flex 2

(4)

(5)

(6)LED

(7)

8051

ADC0804

LED

ADC0804

0

1

8051

8051

8051

(8)

LED

:

(9)

2.1.2

ADC0804

A/D

/

Analog to Digital Converter

ADC

2.4

ADC0804

CS

VREF

/RD

/INTR

CLK IN

CLK R

R

C

100KHz~1460KHz

VCC

/WR

/WR

HI

LO

/WR

HI

DB0~DB7

8

AGND

DGND

VIN

+

VIN

-

VIN

(10)

-ADC0804

VREF=2.560

F

1111

15/16

15/256

4.800

0.300

E

1110

14/16

14/256

4.480

0.280

D

1101

13/16

13/256

4.160

0.260

C

1100

12/16

12/256

3.840

0.240

B

1011

11/16

11/256

3.520

0.220

A

1010

10/16

10/256

3.200

0.200

9

1001

9/16

9/256

2.880

0.180

8

1000

8/16

8/256

2.560

0.160

7

0111

7/16

7/256

2.240

0.140

6

0110

6/16

6/256

1.920

0.120

5

0101

5/16

5/256

1.600

0.100

4

0100

4/16

4/256

1.280

0.080

3

0011

3/16

3/256

0.960

0.060

2

0010

2/16

2/256

0.640

0.040

1

0001

1/16

1/256

0.320

0.020

0

0000

0

0

(11)

2.4 ADC0804

2.1.3

conn flex 2

T

(12)

-PTC Positive Temperature Coefficient

NTC

Negative Temperature Coefficient

CTR

Critical Temperature Resistance

2.1.4

(duty cycle)

2.1.5

2.1.6 LED

2.1.7

AT89S52

2.2

:

8051

(13)

1.

Sensor

2.

Sensor

LED

3.

2.2.1

(14)
(15)

1.

CONN FLEX2(

)

ADC0804

8

bit

0/1

AT89S52

2.

LED

3

(

/

/

)

:55

:20

~55

:20

3.

(16)
(17)
(18)

4.1

1.

4.2

4.2

(19)

3.

4.4

4.4

(20)

4.2

1.

LED

0

C~20

C

2.

(

)

3.

LED

20

C~50

C

4.

LED

50

C

(21)

:

5.1

:

5.2

:

(22)

word

ppt

word

word

ppt

(23)

:3

7

~3

12

:3

13

~3

19

Keil

:3

20

~3

26

00~30

:3

27

~4

2

(

BJT

)

(

BJT

)

:4

3

~4

9

:3

7

~3

12

(24)

Keil

:3

20

~3

26

00~30

:3

27

~4

2

(

BJT

)

(

BJT

)

:4

3

~4

9

(25)
(26)
(27)

,

,

,

,

,

,

,

,

,

,

,

,

,

!!

(28)

[

]

:

sensor

sensor

;

?

?

?;

(29)

8052

LAYOUT

(30)

:

ORG 0000H

AJMP MAIN

MAIN:

MOV P1,#0FFH

MOV P3,#0FFH

MOV P2,#00H

MOV R0,#00H

MOV R1,#00H

MOV R2,#00H

MOV R3,#00H

MOV R4,#20

CHANGE:

SETB P0.6

SETB P0.7

CLR P0.6

CLR P0.7

ACALL DELAY

MOV R0,P1

MOV R1,P3

CLR C

(31)

SUBB A,R1

JC LEFT

LJMP RIGHT

LEFT:

SETB P0.6

SETB P0.7

CLR P0.6

CLR P0.7

ACALL DELAY

MOV R0,P1

MOV R1,P3

MOV R2,#01001001B

MOV A,R0

CLR C

SUBB A,R2

JC LRED

MOV R2,#01101011B

MOV A,R0

CLR C

SUBB A,R2

JC MID1

AJMP LGREEN

(32)

LGREEN:

MOV R3,#20

LG:

MOV P0,#11111110B

ACALL DELAY

MOV P0,#0FFH

ACALL DELAY

CLR P2.0

SETB P2.3

ACALL DELAY

SETB P2.0

ACALL DELAY(8

)

CJNE R3,#1,SENSOR1

AJMP WAIT1

WAIT1:

CLR P2.0

SETB P2.3

ACALL DELAY

SETB P2.0

ACALL DELAY(8

)

DJNZ R4,WAIT1

AJMP MAIN

SENSOR1: SETB P0.6

SETB P0.7

(33)

CLR P0.7

ACALL DELAY

MOV A,P1

MOV R1,P3

SUBB A,R1

CLR C

SUBB A,#00010000B

JNC LT1

DJNZ R3,LG

AJMP MAIN

LT1:

MOV P2,#10011000B

ACALL DELAY

ACALL DELAY

MOV P2,#10001001B

ACALL DELAY

DJNZ R3,LG

AJMP MAIN

LRED:

MOV R3,#20

LR:

MOV P0,#11111011B

ACALL DELAY

(34)

CLR P2.0

SETB P2.3

ACALL DELAY(9

)

SETB P2.0

ACALL DELAY

CJNE R3,#1,SENSOR2

AJMP WAIT2

AJMP MAIN

DELAY: MOV R7,#50

DL2:

MOV R6,#200

DL1:

DJNZ R6,DL1

DJNZ R7,DL2

RET

END

(35)

C3 33p R21 10k U5 ADC0804 +IN 6 -IN 7 8 A G N D VREF/2 9 G N D 1 0 DB7 11 DB6 12 DB5 13 DB4 14 DB3 15 DB2 16 DB1 17 DB0 18 CLKR 19 V C C /V R E F 2 0 CLKIN 4 INTR 5 CS 1 RD 2 WR 3 U1 8051 V C C 4 0 G N D 2 0 E A 3 1 X1 19 X2 18 RST 9 P0.0/AD0 39 P0.1/AD1 38 P0.2/AD2 37 P0.3/AD3 36 P0.4/AD4 35 P0.5/AD5 34 P0.6/AD6 33 P0.7/AD7 32 P1.0 1 P1.1 2 P1.2 3 P1.3 4 P1.4 5 P1.5 6 P1.6 7 P1.7 8 P2.0/A8 21 P2.1/A9 22 P2.2/A10 23 P2.3/A11 24 P2.4/A12 25 P2.5/A13 26 P2.6/A14 27 P2.7/A15 28 P3.0/RXD 10 P3.1/TXD 11 P3.2/INT0 12 P3.3/INT1 13 P3.4/T0 14 P3.5/T1 15 P3.6/WR 16 P3.7/RD 17 C10 150p C11 150p R23 10k R1 10K C1 10u VCC VCC R29 330 D6 LED 330 R30 D7LED 330 R31 D8 LED 330 R32 D9 LED 330 R33 D10 LED 330 R34 D11 LED Y 1 12MHz VCC J4 HEADER 8 1 2 3 4 5 6 7 8 J5 HEADER 9 1 2 3 4 5 6 7 8 9 J2 CONN FLEX 2 1 2 VCC R20 10k C8 150p C9 150p U2 ADC0804 +IN 6 -IN 7 8 A G N D VREF/2 9 G N D 1 0 DB7 11 DB6 12 DB5 13 DB4 14 DB3 15 DB2 16 DB1 17 DB0 18 CLKR 19 VC C /V R E F 2 0 CLKIN 4 INTR 5 CS 1 RD 2 WR 3 R22 10k J6 HEADER 4 1 2 3 4 C2 33p J3 CONN FLEX 2 1 2 VCC

2.1 CAPTURE

(36)

[1].

Temperature Measured Meter and Remote

Controller System

:

:

[2].

:

:

[3].

Labview

:

:

參考文獻

相關文件

 From a source vertex, systematically follow the edges of a graph to visit all reachable vertices of the graph.  Useful to discover the structure of

The mean free path is very large compared to the substrate to source distance, so that the transport of the vapor stream is collisionless.

Place the code elements in order so that the resulting Java source file will compile correctly, resulting in a class called “com.sun.cert.AddressBook”。..

• When a system undergoes any chemical or physical change, the accompanying change in internal energy, ΔE, is the sum of the heat added to or liberated from the system, q, and the

If the source is very highly coherent and the detector is placed very far behind the sample, one will observe a fringe pattern as different components of the beam,

Miroslav Fiedler, Praha, Algebraic connectivity of graphs, Czechoslovak Mathematical Journal 23 (98) 1973,

The finite difference equations will now be applied to solve the problem of a doubly drained clay layer, undergoing one dimensional consolidation. The assumptions made in deriving

/** Class invariant: A Person always has a date of birth, and if the Person has a date of death, then the date of death is equal to or later than the date of birth. To be