You are on page 1of 15

ECP2036

Microprocessor System & Interfacing


Assignment
3rd Trimester 2007/2008

An 8051-based Garage Door Controller

ECP2036 Microprocessor Systems and Interfacing

General Information
Group project (7-8 students per group) Total: ~12 groups Date released: Week 4 Deadline: Week 12 Presentation: Week 13 Mode of Submission:
Garage Door Controller + report

Assessment Marks : 15%


ECP2036 Microprocessor Systems and Interfacing 2

Objective
The objective of this assignment is to allow students to gain
practical experience in designing an 8051-based hardware system.

Gain experience of assembly language programming & hardware construction. Appreciate the importance of coordinated teamwork and project management. Appreciate the nature of systems design
ECP2036 Microprocessor Systems and Interfacing 3

Project activities
Project activities involve: Hardware design and construction
C circuit board DC motor Push buttons Switches and sensor Power supply Etc
ECP2036 Microprocessor Systems and Interfacing 4

Presentation
A short presentation (max. 10 min) has to be performed before the demo. Scope of presentation Introduce group members and job distributions Describe the overall design and your special strategies and features Describe the hardware system and the program flowchart Discuss the problems encountered and what you have learnt in this project Demonstration (accuracy and speed)** Q&A
**some mathematic expressions will be tested on the spot!!
ECP2036 Microprocessor Systems and Interfacing 5

Report Format
(Max. 15 pages, excluding appendix) 1. Project Overview 2. Design Considerations & Schematic Diagrams 3. Algorithm and Flowchart (not the program listing!) 4. Additional features (optional) 5. Conclusion 6. Appendix (program listing, datasheets, etc.)
ECP2036 Microprocessor Systems and Interfacing 6

Assessment Scheme
(15 marks)
Report Marks: Demo Marks: Program Marks: Hardware Marks: Effort Marks: Result Marks
(accuracy+speed)

10 % 10 % 20 % 20 % 20 % : 20 %

Total:

100 %
ECP2036 Microprocessor Systems and Interfacing 7

Functional Block Diagram


+ 5 V Voltage Regulator Main Supply

P0

Two limit switches and one photoelectric sensor

8051 C

P1 Push buttons (up, down and stop)

P2

DC motor

ECP2036 Microprocessor Systems and Interfacing

Connections for reset and Crystal oscillator


5V P1.0 P1.1 5V P1.2 P1.3 P1.4 100R 10uF P1.5 P1.6 P1.7 RESET (RxD) P3.0 (TxD) P3.1 (INT0) P3.2 (INT1) P3.3 (T0) P3.4 (T1) P3.5 (WR) P3.6 (RD) P3.7 XTAL2 XTAL1 VSS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 0 38 37 36 35 34 33 32 VCC P0.0 (AD0) P0.1 (AD1) P0.2 (AD2) P0.3 (AD3) P0.4 (AD4) P0.5 (AD5) P0.6 (AD6) P0.7 (AD7) EA ALEE PSEN P2.7 (A15) P2.6 (A14) P2.5 P2.4 P2.3 P2.2 P2.1 (A13) (A12) (A11) (A10) (A9)

Push Button 8K2

8051

31 30 29 28 27 26 25 24 23 22 21

12MHz

33pF

P2.0 (A8)

ECP2036 Microprocessor Systems and Interfacing

Design Tip: 9V to 5V voltage regulation


7805 IN4002 7 ~ 12V Input 1 2 10uF 0.1uF 10uF 0.1uF 3 +5V, Regulated

7805

ECP2036 Microprocessor Systems and InterfacingCapacitor Diode

10

Design Tip: Push Button (Micro switch)


Button + LED

A button can be accompanied by a LED indicator.


BX LX

Button/LED
Schematic Diagram +5V

0 = Pressed/On

1k LX 3mm LED P1.X 8051 C BX

LED
ECP2036 Microprocessor Systems and Interfacing

Button
11

Switches connections
+5V +5V R2 = 10K Limit switch 1, LS1 P0.1 Limit switch 2, LS2 P0.0 R1 = 10K

ECP2036 Microprocessor Systems and Interfacing

12

Photoelectric sensor

PS1 P0.2

ECP2036 Microprocessor Systems and Interfacing

13

Relay and motor connections


+12V

Relay 1 D1

M Motor

Relay 2

R5 = 3.3K P2.0 2N3904


Or 2N2222

R6 = 3.3K P2.1 2N3904


Or 2N2222

ECP2036 Microprocessor Systems and Interfacing

14

END

ECP2036 Microprocessor Systems and Interfacing

15

You might also like