Sie sind auf Seite 1von 8

FSB23203 MICROCONTROLLER

PROJECT REPORT

TITLE: PLANT CONTROL AND MONITORING SYSTEM (PART 1)

LAB GROUP: M121D1


GROUP MEMBERS(S)

1) SITI HAJAR BT ZAKARIA


2) NOOR ZAFIRAH BINTI MOHD SHOBRI

DISCUSSION GROUP
1) SITI HAJAR BT ZAKARIA (50213112122)

2) NOOR ZAFIRAH BINTI MOHD SHOBRI (50213112205)

COOLING FAN INDICATORS


CIRCUIT
P1.3

C2

C3

27p

27p

10
11
12
13
14
15
16
17

10k

10

19

C
11.059MHz

XTAL2

18

R2
10k

C1
1u

RST

R3

FAN1R11
10

P3.0/RXD
P3.1/TXD
P3.2/INT0
P3.3/INT1
P3.4/T0
P3.5/T1
P3.6/WR
P3.7/RD

10k

29
30
31

FAN1

R9

R4

LED-RED

P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7

1
2
3
4
5
6
7
8

FAN2R10

D3

P1.1
10
LED-RED

10k
FAN2

PSEN
ALE
EA

D4

P1.0

10k
P2.0/A8
P2.1/A9
P2.2/A10
P2.3/A11
P2.4/A12
P2.5/A13
P2.6/A14
P2.7/A15

D5
LED-GREEN

P&P

XTAL1

R5

FAN3R8

D2

P1.2
10

P1.0
P1.1
P1.2
P1.3

80C51

LED-RED

10k
FAN3

21
22
23
24
25
26
27
28

P0.0/AD0
P0.1/AD1
P0.2/AD2
P0.3/AD3
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7

R12

R6

FAN4R7

D1

P1.3
10

10k

LED-RED

FAN4

39
38
37
36
35
34
33
32

R1

P1.7

U1
P&P
FAN1
FAN2
FAN3
FAN4

CONV

X1

INDICATOR

SWITCH

DESCRIPTION AND OPERATION


Circuit diagram above show the condition of the cooling fan indicator. When the switch button is
pressed, the LED-RED will turn ON. Each fan represents each LED in the circuit. There are four
fans in the HMI and the input is set as four switches and four LEDs in the circuit. The use of
microcontroller 8051 as the controller of the operation. All switches are connected to port 0 as it
had been set as input port in the program. It uses Port 0.2 till Port 0.5 for the switch. For the
output, Port 1 is used to turn ON the LED. Port 1.0 till Port 1.3 is connected to the LED for the
fan indicator. The operation of the cooling fan indicator is when the switch button is pressed,
LED will turn ON. Each switch will turn ON the LED that had been assigned in the 8051
controller.

PROGRAMMING CODE
AGAIN:
MOV P0,#0FFH
MOV P1,#00H
LOOP3:

JB P0.2,LOOP
CALL FAN1

LOOP:

JB P0.3,LOOP1
CALL FAN2

LOOP1:

JB P0.4,LOOP2
CALL FAN3

LOOP2:

JB P0.5,LOOP3
CALL FAN4
SJMP AGAIN

FAN1:

JB P0.2,$
SETB P1.0
JNB P0.2,$
CLR P1.0
RET

FAN2:

JB P0.3,$
SETB P1.1
JNB P0.3,$
CLR P1.1
RET

FAN3:

JB P0.4,$
SETB P1.2
JNB P0.4,$
CLR P1.2
RET

FAN4:

JB P0.5,$
SETB P1.3
JNB P0.5,$
CLR P1.3
RET

END

PICK AND PLACE ROBOTIC ARM

P1.3

CIRCUIT

C2

C3

27p

27p

X1

R1
A
10k

10
11
12
13
14
15
16
17

CONV

XTAL1

C
11.059MHz

18

XTAL2

1
2
3
4
5
6
7
8

P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7

16

P1.6

9
10
15

EN2
IN3
IN4

GND

8
VS OUT1
OUT2

OUT3
GND OUT4

3
6

L293D

R6
10k

U2

11
14

R5
10k

P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6

PICK AND PLACE

VSS

FAN1
FAN2

10k

MOTOR DRIVE

IN1
IN2
EN1

R4

10k

29
30
31

PSEN
ALE
EA

R3
10k

R9

P3.0/RXD
P3.1/TXD
P3.2/INT0
P3.3/INT1
P3.4/T0
P3.5/T1
P3.6/WR
P3.7/RD

2
7
1

P&P

1u
9

80C51

P1.4
P1.5

10k

C1

RST

P2.0/A8
P2.1/A9
P2.2/A10
P2.3/A11
P2.4/A12
P2.5/A13
P2.6/A14
P2.7/A15

R2

FAN3

21
22
23
24
25
26
27
28

DA
DB
DC
DD

P0.0/AD0
P0.1/AD1
P0.2/AD2
P0.3/AD3
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7

FAN4

P&P
FAN1
FAN2
FAN3
FAN4

19

CONV

U1
39
38
37
36
35
34
33
32

CONVEYER

DESCRIPTION AND OPERATION


Circuit layout diagram above shows the connection between the switch to microcontroller and to
L293 Dual Full Bridge Driver and to DC motor for Pick and Place process. Switch P&P are
connected to Port 0.1 that had been configured as input in the microcontroller program. The
microcontroller 8051 will send signal to L293 through Port 1.4 and P1.5 that are connected to
the full bridge. L293 will trigger OUT1 and OUT2 and send the signal to the DC motor. DC motor
will rotate depends on the signal OUT1 and OUT2.The operation of the Pick and Place Robotic
Arm is in the initial condition, the motor will rotate clockwise and when the SWITCH P&P is
pressed, the motor will rotate anti-clockwise.

PROGRAMMING CODE
AGAIN:
MOV P0,#0FFH
MOV P1,#00H
CLR P1.5
SETB P1.4
JB P0.1,$
CALL PICK
SJMP AGAIN
PICK:

JB P0.1,$
SETB P1.5
CLRP1.4
JNB P0.1,$
CLR P1.4
SETB P1.5
RET

END

OPERATION STATUS INDICATOR- BLINKING LED


CIRCUIT
INDICATOR

P1.3

C2

C3

27p

27p

X1

P&P
FAN1
FAN2
FAN3
FAN4

DA
DB
DC
DD

CONV

P3.7

39
38
37
36
35
34
33
32
21
22
23
24
25
26
27
28
10
11
12
13
14
15
16
17

P0.0/AD0
P0.1/AD1
P0.2/AD2
P0.3/AD3
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7
P2.0/A8
P2.1/A9
P2.2/A10
P2.3/A11
P2.4/A12
P2.5/A13
P2.6/A14
P2.7/A15
P3.0/RXD
P3.1/TXD
P3.2/INT0
P3.3/INT1
P3.4/T0
P3.5/T1
P3.6/WR
P3.7/RD

R12

D5

U1
XTAL1

P3.7
10

19

LED-GREEN

11.059MHz
XTAL2

18

C1
1u

RST

R9
PSEN
ALE
EA

P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7

10k

29
30
31

1
2
3
4
5
6
7
8

P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6

80C51

DESCRIPTION AND OPERATION


In the operation status indicator, the circuit diagram is as shown above. The LED is connected
at the output of the controller 8051. The LED willblink due to the 8051 signal. The signal is
program in the 8051 using timer for the delay. Port 3.7 is used to send the blinking signal to the
LED. The operation for LED blinking is the when the operation start, the LED will start blinking.

PROGRAMMING CODE
AGAIN:
CALL BLINK
SJMP AGAIN
BLINK:

SETB P3.7
CALL DELAY
CLR P3.7
CALL DELAY
RET

DELAY:

MOV R2, #10

DLY1:

MOV R1, #10

DLY0:

MOV R0, #10


DJNZ R0, $
DJNZ R1, DLY0
DJNZ R2, DLY1
RET

END

REFERENCES

Our references:
Edsim51 8051 example.(http://www.edsim51.com/examples.html)
Lecture Note and Tutorial
L293N Dual Full-Bridge Driver Datasheet.
(http://www.cse.dmu.ac.uk/~mgongora/Resources/L293N.pdf)

Das könnte Ihnen auch gefallen