Microprocessor Based Dot Matrix LED Display System For Pedestrian Light.

UNIVERSITI TEKNIKAL MALAYSIA MELAKA
FACULTY OF ELECTRICAL ENGINEERING

FINAL YEAR PROJECT REPORT

BEKU 4973

MICROPROCESSOR BASED DOT MATRIX LED DISPLAY SYSTEM FOR
PEDESTRIAN LIGHT

NAME

: HON YEEN SEONG

MATRIX NO

: B 010510122

COURSE

: POWER ELECTRONIC AND DRIVE (BEKE)


YEAR

: 2008/2009

SUPERVISOR

: PROF. MADYA DR. ZULKIFILIE BIN IBRAHIM

“I hereby that I have read through this report entitle “Microprocessor Based Dot
Matrix LED Display System for Pedestrian Light” and found that it has comply the
partial fulfillment for awarding the degree of Bachelor of Electrical Engineering
(Power Electronic and Drive)”

Signature

:

…………………………………………..


Supervisor’s name

:

Prof. Madya Dr. Zulkifilie Bin Ibrahim

Date

:

MICROPROCESSOR BASED DOT MATRIX LED DISPLAY SYSTEM FOR
PEDESTRIAN LIGHT

HON YEEN SEONG

This Report is Submitted In Partial Fulfillment of Requiremants For The Degree
of Bachelor In Elctrical Engineering (Power Electronic and Drive)

Faculty of Electrical Engineering
UNIVERSITI TEKNIKAL MALAYSIA MELAKA


APRIL 2009

iii

I declare that this report entitle “Microprocessor Based Dot Matrix LED Display System for
Pedestrian Light” is the result of my own research expect as cited in the references. The report
has not been accepted for any degree and is not concurrently submitted in candidature of any
other degree.

Signature

:

……………………..

Name

:


Hon Yeen Seong

Date

:

21 April 2009

iv

To my beloved father and mother

v

ACKNOWLEDGEMENT

I would like to take this opportunity to thank a well experienced person, my supervisor,
Prof. Madya Dr. Zulkifilie bin Ibrahim, who assist and guide me a lot in executing my project.
He has opened my sights in a number of things through our conversations and I really do
appreciate it. I would also like to thank both the panels for their guidance and advice.


Hereby, I also would like to thanks Justin Looh, Quan Voon Bing, Kim Ling Sheng,
Fabien Lee, and Tay Guo Wei, for they had provided me with good ideas, advices and
comments in order to help me accomplish my project according to the planned schedule. Last
but not least, I would like to thank my family who has always been there and supported me.
Their encouragements were such a boost in confidence and capabilities to overcome any faced
obstacles.

vi

ABSTRACT

This project is about design and development microprocessor based led display system for
pedestrian light. Microprocessor programs are developed to generate image characters for this
module. The objective of this project is to design a led display panel with human detector as
an input. This project consists of three major parts, which are the microprocessor, led display
panel and sensor. LED display is well known as an effective and economical means of data
distribution to the masses. The encoded image character is stored into the memory of
microprocessor. During the process, the sensor is used to detect the presence of pedestrian.
Once pedestrian presence is detected, the pedestrian stage is requested and data are sent to the

led display system. The led display panel displayed in two colors- a red light that means ‘stop’
and a green light that means ‘walk’.

vii

ABSTRAK

Project ini adalah berkenaan merekacipta dan membangun sebuah led panel untuk digunakan
sebagai lampu trafik pejalan kaki. Sebuah program mikropemproses akan dibangunkan untuk
menghasilkan watak-watak imej untuk modul ini. Objektif projek ini adalah untuk
merekacipta sebuah paparan led panel dengan menggunakan pengesan manusia sebagai input.
Projek ini mengandungi tiga bahagian utama, iaitu mikropemproses, paparan led dan penderia.
Paparan led adalah alat yang berkesan dan ekonomi dalam penghantaran data untuk papran
umum. Data watak-watak imej yang dikodkan akan disimpan ke dalam ingatan
mikropemproses. Semasa proses, penderia adalah digunakan bagi mengesan kehadiran pejalan
kaki. Sekiranya kehadiran pejalan kaki dikesan, peringkat pejalan kaki diminta dan data akan
dihantar untuk mengetuai sistem paparan led. Panel paparan led dapat dipamerkan dalam dua
warna

iaitu


lampu

bermakud ’berjalan’.

merah

yang

bermaksud

’berhenti’

dan

lampu

hijau

yang


viii

TABLE OF CONTENTS

CHAPTER

TITLE

PAGE

DECLARATION OF SUPERVISOR
PROJECT TITLE

1

DECLARATION OF STUDENT

iii


DEDICATION

iv

ACKNOWLEDGEMENT

v

ABSTRACT

vi

ABSTRAK

vii

TABLE OF CONTENTS

viii


LIST OF TABLES

xi

LIST OF FIGURES

xii

LIST OF ABBREVIATIONS

xiv

LIST OF APPENDICES

xv

INTRODUCTION

1


1.1

Introduction

1

1.2

Project Objectives

2

1.3

Scope of Project

2

1.4

Problem Statement

2

1.5

Project Schedule

3

1.6

Literature Review

4

1.6.1

Microprocessor Based System

4

1.6.2

Why use Microprocessor?

5

1.6.3

Microprocessor History and Background

5

ix
1.6.4

Light Emitting Diode (LED)

7

1.6.5

Background of the Invention of LED Traffic

8

Light
1.6.6

2

Pedestrian Crossing

9

MATERIALS AND METHOD

12

2.1

Introduction

12

2.2

Hardware Parts

14

2.2.1

Rabbit Microprocessor, Rabbit 3000

14

2.2.1.1 Features and Specification of

15

Rabbit 3000

2.3

2.2.1.2 The CPU of Rabbit 3000

15

2.2.2

Rabbit Core Module, RCM 3100

17

2.2.3

Multi-Color Light Emitting Diode (LED)

20

2.2.4

4 to 16 Decoder / Demultiplexer 74HC154

21

2.2.5

Ultrasonic Motion Detector

22

Software Part

24

2.3.1

Dynamic C (Integrated Development System)

24

2.3.1.1

25

Initialization of Parallel I/O Ports
Using Dynamic C

2.4

Design and Development of Hardware Prototype Board

29

2.4.1

Circuit Design

29

2.4.1.1 LED Array Circuit

29

2.4.1.2 LED Driver Circuit

30

PCB Design

34

2.4.2.1 LED Array

35

2.4.2.2 LED Driver Circuit

36

Steps to Make Printed Circuit Board (PCB)

37

2.4.2

2.4.3

x
2.5

2.6

3

5

38

2.5.1

38

Sample of Source Code

Measuring and test equipments

41

2.6.1

Digital Multimeter

41

2.6.2

AC/DC Adapter

43

RESULTS

44

3.1

Overview of the LED Display Panel

44

3.1.1

LED Array Circuit

46

3.1.2

Ultrasonic Motion Detector

47

3.2

4

Design and Development of Software

Displaying Animation

48

DICUSSION

49

4.1

49

Discussion

CONCLUSION

51

5.1

Conclusion

51

5.2

Recommendation

52

REFERENCES

53

APPENDIX A

54

APPENDIX B

64

APPENDIX C

67

APPENDIX D

70

APPENDIX E

72

APPENDIX F

74

xi

LIST OF TABLES

NO

TITLE

PAGE

1.1

Time Schedule.

3

1.2

Technical data for LEDs.

8

2.1

Specification of Multi-color LED.

21

2.2

Function Table of Decoder 74HC154.

31

4.1

Measured voltage of Demultiplexer.

49

xii

LIST OF FIGURES

NO

TITLE

PAGE

1.1

Block Diagram of a Microprocessor-Based System.

4

1.2

Types of LEDs.

7

2.1

Flow Chart of Project.

13

2.2

Rabbit 3000 in LQFP package.

14

2.3

Block Diagram of Rabbit 3000.

16

2.4

RCM3100 connector pinouts.

17

2.5

Subsystems of RCM3100.

18

2.6

RCM3100 prototyping board.

18

2.7

Multi-color LED.

20

2.8

74HC154.

21

2.9

Ultrasonic Motion Detector.

22

2.10

Crystal-lock Ultrasonic Motion Detector.

22

2.11

Signal at IC1.

23

2.12

Block diagram of parallel port initialization

26

2.13

Port initialization

28

2.14

LED Array Circuit Diagram.

29

2.15

LED Driver Circuit (GREEN Color).

30

2.16

LED Driver Circuit (RED Color).

30

2.17

Current Limiting Circuit Diagram.

32

2.18

Current limiting circuit.

32

2.19

Proteus Design Suite Software.

34

2.20

Upper Side of LED Array PCB Layout.

35

xiii

2.21

Bottom Side of LED Array PCB Layout.

36

2.22

LED Driver Circuit PCB Layout.

36

2.23

Sample of source code to turn ON led.

38

2.24

Sample of source code to flash LED repeatedly.

39

2.25

Sample of source code to flash two leds at different intervals.

40

2.26

Digital Multimeter.

41

2.27

AC/DC Adapter.

43

3.1

Front View of LED display panel.

44

3.2

Side View of LED Display Panel.

45

3.3

Back view of LED Display Panel.

45

3.4

LED Array Circuit.

46

3.5

LED Driver Circuit.

46

3.6

Ultrasonic Motion Detector.

47

3.7

Hardware setup.

48

3.8

Display of Red Stop Man Animation.

48

4.1

Connection Error.

50

xiv

LIST OF ABBREAVIATION

AC

Alternating Current

CLK

Clock

CPU

Central Processing Unit

DC

Direct Current

DIN

Dual In-Line Package

I/O

Input / Output

LED

Light Emitting Diode

PC

Personal Computer

RAM

Random Access Memory

RD

Read

ROM

Read Only Memory

xv

LIST OF APPENDICES

NO

TITLE

PAGE

A

SOURCE CODE

54

B

DATA SHEET OF 74HC154

64

C

DATA SHEET OF MULTI-COLOR LED

67

D

DATA SHEET OF 2N3904

70

E

DATA SHEET OF BC337

72

F

DATA SHEET OF BC327

74

xvi

CHAPTER 1

INTRODUCTION

1.1

Introduction

This project is titled as “Microprocessor based Dot Matrix LED Display System
for Pedestrian Light”. The purpose of this project is to develop a led display panel that able
to detect presence of human. This project is divided into two parts; hardware
implementation and software development.

In the hardware part, the led display system will be designed. The led display
panel designed will be used to display image characters of green walking and red stop
figure symbol. Besides, there will be a sensor which used to detect the presence of
pedestrian. Often, other displays, such as green and red image characters are included in
this panel with a red light that means ‘stop’ and a green light that means ‘walk’. Once
pedestrian stage is requested, the display panel will display according to desired image
character.

In the software part, the led image character algorithms will be developed by
using Dynamic C, a kind of high level programming language, instead of assembly
language. The led image character algorithm programmed will be compiled into the
memory system of Rabbit microprocessor. As the result, the led display panel developed is
able to provide precise image characters. Then, the Rabbit microprocessor will be
interfaced to the led driver and led display panel developed to run in real time and debug.

2
1.2

Project Objectives

The primary goal of this project is to allow us to implementation and design a LED display
for pedestrian light in the software and the hardware. This project goal is supported by the
following objectives:
-

To design a pedestrian display system with human detector as an input.

-

To display an image character.

1.3

Scope of Project

The scope of this project is stated as below:
-

To design the display panel by using 173 pieces of LEDs.

-

To program the Rabbit 3000 microprocessor by using Dynamic C software.

-

To display a green walking and a red stop image character.

1.4

Problem Statement

In our country, push button operated type are commonly used where a button must
be pressed in order to activate the timing system. However, most people belief that the
buttons are placebos, most buttons do work, but some only work at certain times. In an
event that the pedestrian button is malfunctioning, the pedestrian signal will be always
given automatically until the button is repaired. Thus, traffic is stopped unnecessarily leads
to overall vehicle delays due to unwanted pedestrian demands. The development of this
project will prevent the limitation of push button operated pedestrian traffic light system. A
sensor will be used to detect the presence of pedestrian automatically in order to overcome
the problems of malfunctioning push button.

3
1.5

Project Schedule

Table 1.1 Time Schedule.
Pr oj e ct Pla n ning
List major activities involved in the proposed project. Indicate duration of each activity to the related month(s).
2008
Project Activities

Project Briefing
Literature review on Project
Discuss on Proposal
Submit Project Proposal
Design Circuit
Identify Components
Circuit Construction
Troubleshooting
FYP I Progress Report Preparation
Submission FYP I Progress Report
Hardware construction
Software Development
Testing and troubleshooting
Project Presentation
PSM II draft report preparation
Submit PSM II draft report
Submit PSM II finalized report

June

July

Aug.

Sept.

2009
Oct.

Nov.

Dec.

Jan.

Feb.

Mac.

Apr.

May

June

4
1.6

Literature Review

1.6.1

Microprocessor Based System

A microprocessor-based system must of necessity have some standard element
such as memory, timing and input/output (I/O). Depending on the application, other exotic
circuit may be necessary as well. Figure 1.1 depicts a block diagram of a system containing
of the standard circuitry and functions normally used.

Parallel
I/O

Serial
I/O

Interrupt
circuitry

CPU

Memory

System bus
Timing

Figure 1.1: Block Diagram of a Microprocessor-Based System.

As the figure shown above, all components communicate via the system bus. The
system bus is composed of the processor address, data and control signals. The central
processing unit (CPU) is the heart of the system, the master controller of all operations that
can be performed. The CPU executes instructions that are stored in the memory section.
For the sake of future expansion, the system bus is commonly made available to the
outside world. Devices may be added easily as the need arises. All devices on the system
bus must communicate with the processor, usually within a tightly controlled period of
time. The timing section governs all system timing and thus is really responsible for the
proper operation of all system hardware. The timing section usually consists of a crystal
oscillator and timing circuitry set up to operate the processor at its specified clock rate.

5
The CPU section consists of a microprocessor and the associated logic circuitry
required to enable the CPU to communicate with the system bus. The actual
microprocessor used depends on the complexity of the task that will be controlled or
performed by the system. The memory section usually has two components real-only
memory (ROM) and random access memory (RAM). The ROM is included to provide the
system with its intelligence, which is ordinarily needed at start-up (power-on) to configure
or initialize the peripherals. [12]

1.6.2

Why use Microprocessor?

A microprocessor is the integration of a number of useful functions into a single
IC (integrated circuit) package. In microprocessor, such as RAM, ROM, I/O devices are
connected externally. Besides, microprocessor has ability to do multiple tasks and
accomplish different type of tasks. The great advantage of microprocessor as opposed to
using microcontroller is that, its ability to execute a stored set of instructions to carry out
user defined tasks. Besides that, microprocessor also able to access external memory chips
to both read and write data from and to the memory.

1.6.3

Microprocessor History and Background

The CPU ("central processing unit," synonymous with "microprocessor," or even
simply "processor") is often referred to as the "brain" of the computer. It all began in 1971,
when Intel invented the microprocessor. Intel's first microprocessor contained as much
processing power as the most powerful computer that existed in the world at the time: the
ENIAC, which filled an entire room. The world's first microprocessor was dubbed the Intel
4004. It was quickly succeeded less than a year later by the 8008, which was twice as
powerful. In 1978, Intel released the 16-bit 8086 processor. The 8088, also a 16-bit chip,
followed less than a year later. The 8088 incorporated technologies designed to make it

6
backward-compatible with the 8-bit chips that were still in wide use at the time. IBM chose
the 8088 chip to power their original Personal Computer. And so it was that IBM, Intel,
and a little startup company called Microsoft brought computing to the masses. [1]

In the early 1990's, Intel released the i386 processor. The 386 was the first
commercially available 32-bit microprocessor. For the first time, it made multitasking
(running more than one program at a time) possible on desktop computers. The i486 added
an onboard math coprocessor, improved data transfer, and an onboard memory cache, all of
which were stunning advances in technology in that era. The Intel Pentium processor,
released in 1993, was the first commercially available microprocessor capable of executing
two instructions for every clock cycle. More recent releases in the Pentium line have
revolutionized everything from the way data is moved about on the chips, to the way that
multimedia content is handled.

In the years since Intel released the first microprocessor, a number of additional
players have entered the microprocessor arena. Today, Intel's most serious competitor is
AMD (Advanced Micro Devices). Once regarded as a manufacturer of cheap chips for
low-end machines, AMD's more recent releases, such at the Athlon XP processor, have
earned the company credibility as a manufacturer of reasonably priced, high-quality
processors. AMD is also on the forefront of 64-bit computing with it's high-end Athlon 64
processors and its economy-class Sempron 64 processors that have Intel scrambling to play
catch-up with "upstart" AMD. AMD's chips are very popular with home computer builders
because they are reasonably priced, perform well, and are well-supported both by AMD
and by a host of motherboard manufacturers.

7
1.6.4

Light Emitting Diode (LED)

A light-emitting diode (LED) is a semiconductor diode that emits light when an
electric current is applied in the forward direction of the device, as in the simple LED
circuit. LED panels are widely used as stadium displays, large television displays,
electronic billboards and dynamic decorative displays.

LEDs will only light with correct electrical polarity. When the voltage across the
p-n junction is in the correct direction, a significant current flows and the device is said to
be forward-biased. LEDs come in different types, shapes and sizes for different purposes.
The common shapes are round, rectangular, triangular or square. LEDs can be divided in
various size packages of 2mm, 3mm (T1), 5mm (T1¾) and 10mm. Besides that, LED also
has many color types. The colors available are mono-color, bi-color and tri-color. Single
and dual color led is widely used in indicator and alphanumeric displays in environments.

Figure 1.2: Types of LEDs.

LEDs present many advantages over traditional light sources including lower
energy consumption, longer lifetime, improved robustness, smaller size and faster
switching. However, they are relatively expensive and require more precise current and
heat management than traditional light sources. Applications of LEDs are diverse. They are
used as low-energy and also for replacements for traditional light sources in
well-established applications such as indicators and automotive lighting. The compact size
of LEDs has allowed new text and video displays and sensors to be developed, while their
high switching rates are useful in communications technology. [6]