Umar Proposal
Umar Proposal
Umar Proposal
BY
REG NO
ENG/17/MCT/00341
Supervised by
December 20
1
ABSTRACT
Highway rail crossing automatic gate control system is a mechatronic system used to stop
vehicle and allow train to pass throught and intersection between the train and vehicle and
regulate some accident between the train and the vehicles, traffic control devices goals is to
regulate and control traffic by providing information about the road and its environment for road
users in order to promote safety.
The analysis showed that there is an electrical component which was used by implementing
traffic control devices by drivers.
2
TABLE OF CONTENTS
1 INTRODUCTION 4
1.1 Background 4
1.2 Problem statement 4
1.3 Objective 5
2 LITERATURE REVIEW
5
2.1 Introduction
2.2 Discus the literature of your project 5
2.2.1 Other subsection 6
3 METHODOLOGY
14
3.1 Introduction 14
3.2 Methodology 14
3.3 Project tools and cost 15
3.4 Hardware design 16
3.5 Software design 17
3.6 Personal contribution 18
4 RESULT 19
4.1 Introduction 19
4.2 Discus of the result 20
5 CONCLUSION 22
5.1 Conclusion
22
5.2 Further work 22
3
INTRODUCTION
1.0 Introduction
Traffic safety has become a globally issue in yearsago because of the loss of live and accident
costs.
The organization responsible for traffic safety have taken extensive measures to achieve safety
in many locations of the traffic system.
A general research of the cause of traffic accidents shows that majority are due to driver’s
inpatient and traffic violations. One major factor affecting safe driving is the comprehensibility
of traffic control devices by drivers.
This project shows and explain the traffic safety which void the accident and loss of live, which
is happened in our neighboring countries and state.
Traffic control devices as a safety measure have been of keen interest to researchers in the past
few decades. The interest covered many areas such as safety, comprehension and design and
many more.
1.1 Background
This project works based on mechatronics principles because it consists of all the basic
requirement that is needed by a mechatronics system. This project has been implemented in
reality, but this project seeks to be an updated version by establishing an automatic control
system (sensors, traffic signals).
The project got it source from the base project done in class, this is to say that the project consist
of all the components of the base project and other component will be added to achieve this
project.
4
i. Simulation and debugging issue not really good due to some error connection to the
practical component.
ii. Perfect desing and good finishing work is hardly to see
iii. Cost of material
iv. Material selection to design rail and train.
LITERATURE
2.1 Introduction
Highway rail traffic automatic control system which is prototype, it was implemented by
such material got from the market. The materials which consist of poly-vinyl black tape and
white insulators materials, ceiling wood, trucking plastic material, roller shoes material and
unused bottle cover material. All those items mentioned was design and constructed to a
desire shape and suitable size to give a good representation of the project prototype.
i. Ultrasonic sensor:
Insulation material include fly wood, poly-vinyl black tape and white insulators
materials, ceiling wood, trucking plastic material, roller shoes material.
All are measured in a desired shape and size by the helps of each member precipitated
in the group work.
Pictures of the items listed above and constructed shown in figures below.
ii. Servo motor: is motor used to rotate as result of pulse width signal from the
controller.
iii. Microcontroller: from the name controller, is a control system in which the process or
plant to be controlled. Is the brain of the system in which all action of the control
system take place.
5
iv. Dc motor: was driven by the help of motor driver, which input higher current signal to
the motor after ADC operation.
v. Microcontroller: from the name controller, is a control system in which the process or
plant to be controlled. Is the brain of the system in which all action of the control
system take place.
All are measured in a desired shape and size by the helps of each member precipitated in the
group work.
Pictures of the items listed above and constructed shown in figures below.
7
FIG 2.1.7COMPLETED RAIL AND TRAIN
8
• Electromotive force constant ke=kf=0.01Nm/amp
• Electric resistance R=2ohm
• Electric inductance L=0.4H
• Input (v): Source Voltage
• Output (Ø): position of shaft
9
Fig 2.4.2 shows Simulation model of a DC motor.
10
Close loop response of DC motor without controller
11
METHODOLOGY
3.1 Introduction
Highway rail automatic control system is the project that promote safety among vehicle and
train to regulate collision and damages. The project design follows some steps of construction
and procedure to the final result. Material were used such as a celling wood, polyvinyl tape,
rollers, gum, and electronics components.
3.2 Methodology
Ultrasonic sensor:
the laws of physics which are indicating the propagation of sound waves through solid materials
have been used since ultrasonic sensors using sound instead of light for detection. we learn about
the ultrasonic sensor working principle and its applications.That why we used it, because it has
wide range of application with good accuracy.If the train come in a closeness range to the sensor
the sensor will sensed the presence of the train and tell the controller something is coming to the
crossing road, then it perceive to action let’s close the two gates and indicate the motorist to
stopped by closing the gate and shows red signals to them.
Servo motor: is an actuator used in position control such as rotary, angular and linear position.
In such of our case servo motor serve as angular control which is used as our gate both side of
the main road.
Microcontroller: is a control system in which the process or plant to be controlled. Is the brain
of the system in which all action of the control system take place.
Arduino IDE: is the sketcher where the program or instruction was written and uploaded it to
the Arduino UNO perform the action.
On the celling wood where all the plant and the process are mounted on it, in which all action
was commanded by microcontroller.
Two servo motor was place in opposite direction on the side of the main road, which are actuated
by the action of the sensor (when it sensed the presence of the train before reaching the crossing
road).
The main point of the system is actuating the two servo motor using sensor from microcontroller
(Arduino UNO).
Servo motor: is an actuator used in position control such as rotary, angular and linear position.
In such of our case servo motor serve as angular control which is used as our gate both side of
the main road.
12
13
3.3 Project tools and cost
14
3.4 Hardware design
Microcontroller Atmega328p :is the key factor for the hardware design, all pins both digital
and analog on microcontroller where collectively give us desired functionality on the
implementation.
Bread board : is a board where jumper wire has tapped from microcontroller and supply to the
others component and it eases for pins distributed wire identification, it has a specification on
voltage/ current supply distribution, base on rows and column. Proper connection was made to
avoid short circuit on the board.
Work space: is the field or region where all the electronic component and the art and craft
design (trail and main road) designed to give more clarification about the project.
Motor driver : is to drive the train to move on the rail, since microcontroller has no abilily to
drive the drive dc motor, it serve as current amplifier it take current from microcontroller
(Arduino Uno) and amplified it to a proportional higher current to drive the train.
Ultrasonic sensor: is a sensor that has two antennas which are the trigger and echo.the Trigger
used to transmit an ultrasonic sound wave using physic principles, if the sound hit an obstacle
then it reflected back to the echo antenna, and which will take to microcontroller by digital
means to do an action, as it’s commanded.
Potentiometer: serve as voltage regulator to regulate the voltage that enters into the motor driver
L289N to regulate the speed of the motor, after it has convert analog voltage into digital by
means of pulse width modulation PWM.
LED : was used as our traffic signals named from the sketcher as “redsignal and greensignal”,
Red signal: means all the motorist and everyone around the road should stop when the gate has
closed after some certain seconds in the prototype equivalent to certain minute in the real project.
Green signal: means all the motorist and everyone around the road should move safely no any
stoppage still the gate has close again.
Servo motor : Serve for angular position control, the shaft of the servo motor was gummed with
a plastic stick to shows more clarification on the main road open and close gate.
15
3.5 Software design
My program was written on Arduino IDE named mini-project sketchbook. #includeLibraries
provide extra functionality for use in sketches, working with hardware or manipulating data.
Void setup used to run my code once when I press reset bottom of my Arduino or if I supply
my Arduino with a power source. Void loop functionality is the loop runs over and over
again forever.
#include<Servo.h> // including servo library
Servo myservo; // named gate as myservo
int servo_pin=9; //declaring my servo digital pin
int trig_pin=6; //declaring my sensor trigger digital pin
int echo_pin =4; //declaring my sensor echo digital pin
int redsignal=A1; // declaring my red signal analog pin
int greensignal=A2; //declaring my green signal analog pin
int inter_time=0; // my sensor delay time
int time=0;
int IN1=2; // declaring motor driver IN1 digital pin
int IN2=8; //declaring motor driver IN2 digital pin
int ENA=5; // declaring motor driver ENA digital pin
int pot_pin=A0; // declaring pot-pin analog pin
float analog_vol;
float volt;
void setup() {
Serial.begin(9600); //visualize the monitor
myservo.attach(servo_pin);
myservo.write(90); // set my servo position at 90 degree
pinMode(trig_pin,OUTPUT); // sensor output to the arduino
pinMode(echo_pin,INPUT); // sensor input to the arduino
pinMode(redsignal,OUTPUT); // output to the arduino
pinMode(greensignal,OUTPUT); // output to the Arduino
pinMode(IN1,OUTPUT); // motor driver output clockwise direction
pinMode(IN2,OUTPUT); // motor diver output counter clockwise
pinMode(ENA,OUTPUT); // motor driver output PMW
pinMode(pot_pin,INPUT); //pot-pin input to be converted to ADC
delay(200);
}
void loop() {
analog_vol=analogRead(pot_pin); // reading the analog voltage to the Arduino
//volt= (5./1023.)*analog_vol;
volt=analog_vol;
Serial.print("variable voltage reading: ");
Serial.println(volt);
16
delay(1000);
float duration,distance;
digitalWrite(trig_pin,HIGH);
delayMicroseconds(1000);
myservo.write(90);
delay(100);
digitalWrite(trig_pin,LOW);
duration=pulseIn(echo_pin,HIGH); //the time taking after sensor has sensed tra
distance=(duration/2)/29; // constant formula for the sensor
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
analogWrite(ENA,volt);}
// regulating the speed of the train using pulsed width modulationPWM
17
RESULT
4.1 Introduction
The advantage of this project was to control the speed of the train (of a DC motor by varying
the applied input voltage). A linear differential equation describing the electromechanical
properties of a DC motor to model (transfer function) the relation between input (V) and
output (α) was first derived using mathematical model. This transfer function was used to
analyze the performance of the system.
The transfer function of the system was analyzed and obtain using mathematical model as
0.01
G ( S )= 2
0.008 s +0.048 s +0.0401
The transfer function of the dc motor of the train obtained and shown above the system is
second order system with two poles p1=-1.003 and p2=-4.997
18
Close loop response of DC motor without controller
The system is open loop system with a step input voltage no feedback since sensor that will
make a comparison between the output and the input.
CONCLUSION
5.1 Conclusion
In summary, the highway rail crossing automatic gate control systems of traffic control devices
by drivers is very important factor for increasing maximum safety on the roads.
It is proposed to implement an electric motor control system within the specifications used in the
simulation above.
Engine function simulation and simulation were performed using the MATLAB (SIMULINK)
software package.
5.2 Further works
19
My project should be improve by more designs and make my train to be moving continuously on
a circular rail track, to design well controller on the traffic control system and analyze the
feedback between the gate and the sensor.
REFERENCES
[1]. Highway-Rail Crossing HANDBOOK Third Edition
[2]. EML 4312: Control of Mechanical Engineering Systems Fall 2009, University of Florida by
Dr.Redmond Ramin Shamshiri
[3].Hassan Saeed Automatic control Engineering Textbook.
[4]. MCS3301 control engineering 1 by Dr. Ado H
20