Dejenie Fikir CBTP
Dejenie Fikir CBTP
transportation
1. ABAS
MUSA..00302/03
2. BILISUMA GELANA..01673/03
3. DEJENIE
FIKIR...00742/03
4. FEYISA
KENENISA.00866/03
5. FISIHA
TIGABU..03841/03
6. GIRMA
TOLI00983/03
SUBMITTED TO:
SCHOOL
OF
ECE
Page I
Page II
Contents
Acknowledgment ............................................................................................................................. I
Abstract ........................................................................................................................................... II
List of figure .................................................................................................................................. V
List of table ................................................................................................................................... VI
Abbreviation ................................................................................................................................ VII
CHAPTER ONE ............................................................................................................................. 1
1.
INTRODUCTION ................................................................................................................... 1
1.1.
Background .......................................................................................................................... 1
1.2.
1.3.
1.4.
1.5.
1.6.
1.7.
1.8.
Methodology ........................................................................................................................ 7
2.1.1.
2.1.2.
2.1.3.
2.1.4.
RS 232 Circuit......................................................................................................... 15
2.1.5.
20x4 LCD................................................................................................................ 16
3.1.1.
Page III
3.1.3.
3.1.4.
3.1.5.
3.1.6.
Power supply........................................................................................................... 20
3.1.7.
3.1.8.
3.1.9.
Conclusion...................................................................................................................... 27
4.2.
Recommendation ............................................................................................................ 28
Reference ...................................................................................................................................... 29
Appendix .................................................................................................................................... VIII
Page IV
Page V
Page VI
Abbreviation
ADC analog digital converter
GPS- Global Positioning System
GMSK - Gaussian minimum shift keying
Page VII
continuously and a message is sent to bus station. Using SMS on LCD every 10 minutes, using
this system, the operator can monitor the signals from anywhere. The GSM modem is
connected to microcontroller using RS232 interface. Whenever an SMS is sent to the GSM
modem, the GSM modem receives the data and sends to microcontroller. After receiving the
signal from the microcontroller it processes the data and sends the read data to GSM modem.
The GSM sends data to bus station.
Page 1
Always the traffic police enter to the bus and count the number of passengers (people)
within the bus. But extra passengers tries to hidden himself from the traffic police by
sleeping inside the chair or placed in the back side.
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
While these GSM modems are most frequently used to provide mobile internet
connectivity, many of them can also be used for sending and receiving SMS and MMS
messages. The working of GSM modem is based on commands, the commands always start with
AT and finish with a <CR> character. For example, the dialing command is ATD<number>;
ATD3314629080; here the dialing command ends with semicolon. The AT commands are
given to the GSM modem with the help of PC or controller. The GSM modem is serially
interfaced with the controller with the help of MAX 232. GSM modems can be a quick and
efficient way to get started with SMS, because a special subscription to an SMS service provider
is not required. In most parts of the world, GSM modems are a cost effective solution for
receiving SMS messages, because the sender is paying for the message delivery.
Page 8
Page 9
2.1.1.1.
GSM network
GSM provides recommendations, not requirements. The GSM specifications define the
functions and interface requirements in detail but do not address the hardware. The
reason for this is to limit the designers as little as possible but still to make it possible for
the operators to buy equipment from different suppliers. The GSM network is divided
into three major systems: the switching system (SS), the base station system (BSS), and
the operation and support system (OSS).
2.1.1.2.
Page 10
[7]
Page 11
change.
Figure 2-2 PIR sensor
Page 12
2.1.2.2.
Connecting PIR sensors to a microcontroller is really simple. The PIR acts as a digital output so
all you need to do is listen for the pin to flip high (detected) or low (not detected). Its likely that
you'll want retriggering, so be sure to put the jumper in the H position! Power the PIR with 5V
and connect ground to ground. Then connect the output to a digital pin
[3]
Page 13
Page 14
CC
MICROCONTR
OLLER
GSM
HELLO BUS
STATION
[4]
Page 15
Page 16
3.1.
In bus module
RS 232
GSM modem
Databas
e server
MAX232
Garage
computer
MICROCON
TROLLER
CONPIM
(Serial port
communicating device)
Page 17
POWER
SUPPLY
LCD
PIR
SENSOR 1
PIR
SENSOR 2
MICROCONTROLLE
R
89c51
GSM
MODEM
BUZZER
ALARM
Figure 3-2 in bus module
The system basically has three things: Data collecting, transmitting and analyzing. The objective
of this project is sending bus information to office computer (bus station). This informations
are:
Number of passengers
Page 18
We can get the number of passengers from the directional counting sensor. The sensor count
passengers based on infrared technology i.e. detecting the radiated waves (emitted heat level)
from the person. Bear in mind that human beings emit infrared waves (signal) from 8 to 12
microwaves. These listed informations are given to the on board computer (microcontroller),
which is implemented inside the bus. The on board computer tries to understand what these
inputs says.
GSM modem
Rs 232
MAX232
LCD display
MICROCONT
ROLLER
Page 19
BUS STATION
MODULE
GSM
NETWOR
K
BUS STOP
MODULE
IN BUS MODULE
3.1.6.Power supply
The power supply section is very important for all electronic circuits. The 230V, 50Hz AC mains
is stepped down by transformer X1 to deliver a secondary output of 12V, 500 mA. The
transformer output is rectified by a full-wave rectifier comprising diodes D1 through D4, filtered
by capacitor C1 and regulated by ICs 7812 (IC2) and 7805 (IC3). Capacitor C2 bypasses the
ripples present in the regulated supply. LED1 acts as the power indicator and R1 limits the
current through LED1.The power supply section is shown in the
Page 20
STEP DOWN
TRANSFOR
MER
RECTIFIER
FILTER
REGULATOR
Page 21
Page 22
3.1.8.Software design
Software Developed and Its Operation (Will Be Uploaded Here)
The software used in the project developed in Kiel C. As a programme flow as specified above
are into following steps:
Then Microcontroller studies the given data and stores it to serial EEPROM.
GSM modem sends the data in the form of SMS to selected device.
There the data is processed and number of passengers are tracked and displayed on the
screen.
Page 23
Initialization
Count=0
NO
NO
YES
No
Pir2=1
Pir1=1
Pir2=1
YES
YES
Count =count+1
Pir1
=1
Count =cont-1
Count>
NO
Require
d
LCD display
Buzzer
alarm on
YES
Page 24
GSM ON
NO
Valid (count>
holding capacity)
YES
END
Page 25
Cost estimation
Material name
Datasheet
quantity
Cost(birr)
Code
1
microcontroller
AT89c51
76
Pir sensor
PIR231
40
Max232
MAX232
20
LCD
20x4
35
Alarm
Buzzer
30
GSM modem
SIM900
40
Total
557
Page 26
Page 27
Page 28
accessed on date
2/02/2015
[6]. D.t.sp. sadiku, microprocessor, ff.th. Printed, Norway, 1999
[7]. Hra.ftr., GSM basics, gofer.printed.access, indian, 2014
Page 29
#include <REGX51.H>
for(j=0;j<1275;j++);
}
void lcd_command(unsigned char
item)
{
LCD=item;
rs=0;
rw=0;
e=1;
delay(100);
e=0;
gled=0;
delay(1);
e=0;
delay(1);
}
void display_data(unsigned char
*item)//..................... display data on
LCD............//
int x;
delay(1);
for(x=0;item[x]!=0;x++)
lcd_command(0x06); //display ON
delay(1);
lcd_data(item[x]);
}
}
delay(1);
top:
//..............main function..............
void main(void)
{
P1=0xff;
cnt=0;
alarm=0;
rled=0;
yled=0;
if (pir1==1)
goto in;
else if(pir2==1)
goto out;
else
{
goto top;
}
Page X
else
if(pir2==1)
gled=1;
{gled=1;
delay(100);
delay(100);
cnt=cnt+1;
else
display_data("person entered");
goto top;
delay(100);
out:
lcd_command(0x01);
if(pir1==1)
display_data("2persons entered");
{rled=1;
delay(100);
delay(100);
lcd_command(0x01);
cnt=cnt-1;
display_data("3persons entered");
display_data("person out");
delay(100);
delay(100);
lcd_command(0x01);
lcd_command(0x01);
if(cnt==3)
if(cnt<1)
{gled=0;
{rled=0;
delay(100);
delay(100);
rled=1;
yled=1;
delay(100);
delay(100);}
alarm=1;
else
delay(1000);
gled=1;
display_data("empity bus");
Page XI
Page XII