You are on page 1of 14

Department of Computer Science &

Engineering
University of Barisal
Electrical Engineering Project

Project Title:
A PROJECT ON METAL DETECTOR

Submitted By

Haasn Shahriar Boni

Roll No.:14CSE009

Supervised By

Samiran Roy
Lecturer,
Department of Physics,
University of Barisal.
Date of Submission: 12 JUNE, 2016
Page |2

Acknowledgement

We
are very happy to express our gratitude to everyone who supported us on
our project work. We have the deepest appreciation to them for
providing us the possibility to complete this project and report. We are
highly indebted to Samiran Roy, our project supervisor for his guidance and constant
supervision. We are also thankful to all our friends and well wishers who make us guided
about this project. We are sincerely grateful to them for sharing their truthful and
illuminating views on a number of issues related to the project.
Page |3

Abstract

This is a sample electrical device and circuit project report. The project report is based on a
two way traffic control system. The system will be embedded with three LED lights (RED,
GREEN and YELLO) in a light post. These three lights are used to control traffic in a
convenient way. The project is implemented by a PIC16F887 microcontroller with additional
programming.
Page |4

Table of content

Acknowledgement-----------------------------------------------02

Abstract------------------------------------------------------------03
1. Introduction 6

2. Theory and Design Methods 7-8

2.1 Methodology-------------------------------------------- 7

2.2 Implementation----------------------------------------8

3. Description of Design 9-12

3.1 Required Instrument:------------------------9

3.2 Circuit diagram-------------------------------- 10

3.3 Source code for Microcontroller--------- 11

3.4 Burning----------------------------------------- 12

4 .Measured and Simulated Results 13-14

4.1 Simulated Result------------------------------- 13-14

5 Conclusions/Recommendations 14

Reference 16

Chapter 1: Introduction
This is a project proposal for traffic control system. The traffic control system is done by a light post
using three lights. We can establish two light post on a way of road. Here we use a microcontroller
device to control the light. On the post the RED light used to stop the vehicles on one way and then
Page |5

the green light on the other side will on to imply that the vehicles can go. The yellow light used to
understand that the vehicles can go or have to stop after sometime.

The main objective of the project is to manage the traffic in a convenient way. In respect of
Bangladesh traffic jam is a common problem. Because of traffic jam people have to suffer very
much and have to lost their time. The number of traffic police in Bangladesh is insufficient. To solve
this problem traffic management system can be a good way. Although this is a simple project, the
future scope of this project is much bright.

In our document in next chapters we will describe the theory of the project, descriptive and
theatrical approach to solve the problem and how the system has been implemented in details.
Then we discuss about the result and output of the project and give suggestion for further
improvement.

Chapter 2: Theory and Design Methods


2.1 Methodology

The traffic control system is going to be a smart system which will be controlled automatically. In this
system we will need some electronics devices but the project mainly implemented by a PIC
microcontroller. This is a very good device to use because it has many control option.
Page |6

The advantage of using microcontroller is:

1. Microcontrollers are special types of processor chips that are very small and somewhat
flexible, due to their programmable nature.
2. Since microcontrollers are fully integrated inside the processor, i.e., a “computer on a chip,”
these devices operate at faster speeds to execute instructions compared to general purpose
microprocessors.
3. Microcontrollers are cheap and very small in size, therefore they can be embedded on any
device.
4. Programming of Microcontrollers is simple to learn. Its not much complicated.
5. We can use simulators on Computers to see the practical results of our program. Thus we can
work on a Embedded project without even buying the required Components and Chips. Thus
we can virtually see the working of our project or program.
6. As microcontrollers are fully integrated onto one chip, these devices are cheap to
manufacture. Usually, microcontrollers have much lower specifications than low-power
consumer-grade general-purpose microprocessors, making them even easier to mass
produce.
7. Once microcontrollers are programmed, typically they cannot be reprogrammed, if
microcontrollers are controlled by Read-Only Memory (ROM) only rather than Random
Access Memory (RAM) .
8. Many tasks can be performed by microcontrollers repetitively and human efforts can be
saved. The programmable nature of these devices also allows manufacturing robots to
reproduce these motions very quickly and consistently, increasing productivity.
9. Size of a circuit can be reduced significantly - one microcontroller can replace several other
ICs.

Because of these advantages we use this chip on our project. This makes our project more simple
and less complex. Using this we can avoid many electrical devices. And most of all this chip is
programmable so we can use it for further improvement of our project easily.

2.2 Implementation

The system is basically powered by a microcontroller. The microcontroller, here PIC16F887 is the
main components of the project.

There are two major cases in this project operation. These are :

a) The first way is on and the other way is off: At first one road is shown Red signal (this
means “stop the vehicles” ) and the same time the other get green signal (this means “the
vehicles may go now). This can be vice versa for opposite situation.

b) The two way can be used : The two way can be used when the yellow light is on. This can
also used for understanding that the vehicles should be ready for go or stop.

The basic steps the system will be:


Page |7

1. For the time being one way get red signal from microcontroller. And the other way get yello
signal then.
2. After that the two way get yellow signal.
3. At last the first road get green signal and other get res signal simultaneously from
microcontroller.

We can manage the time for this purpose using the C program.

Chapter 3: Description of Design


3.1: Required Instrument:
Hardware:

1. A red LED,

2. A green LED,

3. A yellow LED,

4 . Microcontroller Programmer.

Software:

1. A MicroC IDE for PIC microcontroller,


2. Protieus Design Suit and simulator.
Page |8

3.2: Circuit diagram

3.3: Source code for Microcontroller


Page |9

the main element of this project is its microcontroller and the microcontroller’s main working fluid is
its programming. A microcontroller is a programmable device that can be programmed to do a task.
Depending on the programming, a microcontroller can virtually do all kind of task. A microcontroller
can be programmed by assembly language or by high level programming language such as C. Though
it is quit difficult to program a microcontroller in assembly, most of time they are programmed in c
then the code are converted into hex code. In this project the microcontroller is programmed in C
language. The editor used in this project is MicroC IDE. The code for the microcontroller is given
bellow:

void main() {

int i=1;

ANSEL=ANSELH=0;

TRISA.RA0=0;

PORTA.RA0=0;

TRISA.RA1=0;

PORTA.RA1=0;

TRISA.RA2=0;

PORTA.RA2=0;

TRISA.RA3=0;

PORTA.RA3=0;

TRISA.RA4=0;

PORTA.RA4=0;

TRISA.RA5=0;
P a g e | 10

PORTA.RA5=0;

while (1)

if (i=1)

PORTA.RA0=!PORTA.RA0;

PORTA.RA3=!PORTA.RA3;

Delay_ms (100);

PORTA.RA1=1;

PORTA.RA4=1;

PORTA.RA2=1;

PORTA.RA5=1;

i++;

if (i=2)

PORTA.RA1=!PORTA.RA1;

PORTA.RA4=!PORTA.RA4;

Delay_ms (300);

PORTA.RA0=1;

PORTA.RA3=1;

PORTA.RA5=1;

PORTA.RA2=1;
P a g e | 11

i++;

if (i=3)

PORTA.RA2=!PORTA.RA2;

PORTA.RA5=!PORTA.RA5;

Delay_ms (300);

PORTA.RA1=1;

PORTA.RA4=1;

PORTA.RA0=1;

PORTA.RA3=1;

3.4: Burning

The burning process is quite easy for a microcontroller. After coding the actual code for PIC16F887,
the code is compiled and converted into hex code that a microcontroller can understand. Then the
hex code is copied to the electrically erasable ROM. This process is called burning. The
microcontroller is burned by using a microcontroller programmer.
P a g e | 12

Chapter4: Measured and Simulated Results

4.1: Simulated Result


The working circuit of the smart water reserve systemis first simulated by using a simulation
software. In this case, the software has been used is PROTIOUS.
P a g e | 13

Chapter 5: Limitations/Recommendations
Though traffic control system is working well there are some limitations:

 In this system time change is not dynamic.

 The device can not understand when it is need to stop and when to let vehicle to go.

 This system is for only two way road. But when it can not be used for the traffic
system more ways.

 Sometimes it is needed to change the time period according to period of the day. But
it is very difficult.

Reference
1. https://www.wikipedia.org/
P a g e | 14

2. www.electronics-tutorials.ws/
3. https://www.newbiehack.com/
4. www.mikroe.com/
5. www.microcontrollerboard.com/pic_microcontroller.html
6. www.hobbyprojects.com/Microcontroller Tutorials – PIC.html
7. www.microchip.com/
8. www.circuitstoday.com/pic-tutorial-16f887
9. www.google.com
10. www.qora.com

You might also like