Batch-6 Final Document of Movable Railway
Batch-6 Final Document of Movable Railway
On
MOVABLE RAILWAY PLATFORM BASED ON TRAIN ARRIVAL
A Real Time Research Project Report Submitted to
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY
HYDERABAD
In Partial Fulfillment of the requirement for the Award of the Degree of
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
GADAM CHAITHANYA 22N01A0439
YAMA PAVANI 22N01A0407
MADDULA SHIVANI 22N01A0446
SUDAGONI AMULYA 22N01A0416
MEDIDHA SHIVA KUMAR 22N01A0443
Under the Supervision of
Dr. M SAGAR
Assistant Professor
2024-25
CERTIFICATE
This is to certify that the real time research project report entitled “Design An Movable
Railway Platform based on Train arrival” is being submitted by Gadam Chaithanya
(HT.No:22N01A0439),Yama Pavani(HT.No:22N01A0407),Maddula Shivani
(HT.No:22N01A0446), Sudagoni Amulya (HT.No:22N01A0416), And Medidha Shiva
Kumar (HT.No: 22N01A0443) for partial fulfillment of the requirement for the award of the
degree of Bachelor of Technology in Electronics and Communication Engineering discipline
to the Jawaharlal Nehru Technological University, Hyderabad during the academic year
2024 - 2025 is a bonafide work carried out by them under my guidance and supervision.
The result embodied in this report has not been submitted to any other University or
institution for the award of any degree or diploma.
EXTERNAL EXAMINER
ii
CIN NUM: U80900TG2019PTC134293
Date: 14-06-2025
They have done the Industrial oriented mini project under the guidance of Mr.
Sudharsan Reddy, Asst. Manager, in MSR EDUSOFT PVT LTD, Hyderabad.
During the period of their project work with us, we found their conduct and character
are Good.
We wish all the best for their future endeavors.
Managing Director
(D.MAHESWARA REDDY)
iii
DECLARATION
It contains no material previously published or written by another person nor material which
has been accepted for the award of any other degree or diploma of the university or other
institute of higher learning, except where due acknowledgment has been made in the text.
Date:
Place:
iv
ACKNOWLEDGEMENT
The Satisfaction that accomplishes the successful completion of any task would be
incomplete without the mention of the people who make it possible and whose constant
guidance and encouragement crown all the efforts with success.
We would like to express our sincere gratitude and indebtedness to our project supervisor
Dr. M SAGAR, Assistant Professor, Department of Electronics and Communication
Engineering, Sree Chaitanya College of Engineering, LMD Colony, Karimnagar for his
valuable suggestions and interest throughout the course of this project.
We convey our heartfelt thanks to the lab staff for allowing us to use the required equipment
whenever needed.
Finally, we would like to take this opportunity to thank our family for their support through
the work.
We sincerely acknowledge and thank all those who gave directly or indirectly their support
in completion of this work.
GADAM CHAITHANYA
YAMA PAVANI
MADDULA SHIVANI
SUDAGONI AMULYA
MEDIDHA SHIVA KUMAR
v
ABSTRACT
This project proposes a Movable Railway Platform System. Based on Train Arrival Detection,
designed to enhance passenger safety and convenience at railway stations. The system uses two IR
sensors to detect the arrival and departure of a train. When a train is detected approaching the platform,
the system automatically activates a motor (controlled via a motor driver) to extend a movable platform
that bridges the gap between the train and the station platform, ensuring safe and easy boarding and
alighting, especially for elderly and differently-abled passengers.
Once the train departs, the IR sensors detect its exit, and the motor retracts the platform to its
original position to avoid obstructing other tracks or train movements. A 16x2 LCD displays the system
status (e.g.“Train Arriving”,“Platform Extended",“Train Departed”), and a buzzer provides audio alerts
during platform movement.
The system also includes an IoT module (e.g., ESP8266/ESP32) to send real-time notifications
to a mobile device, keeping station authorities or operators informed about the train's status and
platform movement.
This intelligent and automated solution enhances railway safety, reduces the need for manual
intervention, and supports smart transportation infrastructure in model railway systems.
vi
TABLE OF CONTENTS
1. INTRODUCTION 1-2
1.1 Overview 2-3
1.2 Motivation 3-4
1.3 Existing System 4-5
1.4 Proposed System 5
1.5 Objectives 6
2. Literature Survey 7-8
3. Problem Definition 9
4. Introduction to Embedded System 10
4.1 Introduction 10-11
4.2 Overview of Embedded System 11-12
5. Block Diagram and Hardware Description 13
5.1 Block Diagram 13
5.2 Power Supply 13
5.2.1 Transformer 14-16
5.2.2 Filter Capacitor 17-18
vii
5.2.3 Voltage Regulator 19
5.3 Circuit Diagram 19
5.4 IC 7805 19-20
5.5 IR Sensor 20-22
5.6 LCD Display 23-26
5.7 Bluetooth Module 26-30
5.8 Motor Driver(L293D) 30-33
5.9 Buzzer 33-36
6. CONTROLLER 37
6.1 Arduino 37-38
6.2 History 38-39
6.3 Hardware 39-40
6.4 Software development 40-41
6.5 Technical Specification 42
6.6 Programming 42-44
6.7 Memory 45
6.9 Communication 45-46
6.10 Automatic (software) Reset 46-47
SOFTWARE 48
7. 7.1 Software Introduction 48-52
7.2 Coding 53-55
7.3 Working 56
7.4 Advantages 56-57
7.5 Applications 57-58
RESULTS AND OUTPUT SCREENS 59
8. CONCLUSION AND FUTURE SCOPE 60
9. 9.1 Conclusion 60
9.2 Future Scope 61
REFERENCES 62
viii
LIST OF FIGURES
x
CHAPTER 1
INTRODUCTION TO PROJECT
Introduction to Movable Railway Platforms Based on Train Arrival Movable railway
platforms, also known as dynamic or retractable platforms, are innovative solutions designed to
enhance passenger safety and accessibility at railway stations. These platforms automatically adjust
their position based on the real-time arrival and departure of trains, facilitating seamless transitions for
passengers, especially those with mobility challenges.
Key Features and Functionality
Automated Adjustment: Utilizing sensors such as infrared (IR) modules or load cells, the
system detects the proximity of an approaching train. Upon detection, the platform moves into position,
aligning itself with the train doors to provide a level boarding surface.
Safety Enhancements: By ensuring that the platform is only extended when a train is present, these
systems minimize the risk of accidents, such as passengers attempting to cross tracks when no train is
available.
Accessibility Improvements: The dynamic nature of these platforms eliminates the need for
passengers, particularly the elderly and differently-abled individuals, to navigate stairs or uneven
surfaces, thereby promoting inclusive travel.
Integration with IoT: Advanced implementations incorporate Internet of Things (IoT) technology,
allowing for remote monitoring and control of platform status, providing real-time updates to station
staff and passengers.
Applications and Benefits:
Movable railway platforms are particularly beneficial in stations with varying train heights or
where traditional fixed platforms may not align perfectly with train doors. They are also advantageous
in areas with high foot traffic, where efficient and safe boarding is critical. By automating platform
adjustments, these systems contribute to smoother operations and improved passenger experiences.
In summary, movable railway platforms based on train arrival detection represent a significant
advancement in railway station infrastructure, aligning with modern needs for safety, accessibility, and
operational efficiency.
Railway platforms frequently present a persistent safety hazard due to the unavoidable
horizontal and vertical gap between the train and the platform edge. Known as the platform–train
interface (PTI), this gap arises from structural constraints, curved tracks, historical platform designs,
and differences in train width or suspension. While modest gaps may go unnoticed by many passengers,
1
wheelchairs, or heavy luggage. Indeed, research indicates that up to one-third of platforms in some
regions maintain gaps exceeding 25 cm. Traditional safety measures—such as signage, public
announcements, or static warnings like London’s celebrated “Mind the Gap”—cannot completely
eliminate the risk, motivating the development of mechanical solutions that actively bridge this
interface.
Moving-to-gap fillers typically operate automatically using a sequence synchronized with train
arrival and departure. Upon a train’s halt, sensors—IR, laser, or radar—detect its presence and trigger
the filler’s deployment to bridge the gap before doors open. Once doors close and departure is initiated,
sensors trigger retraction to allow the train to leave safely. Control systems must interlock with
signaling infrastructure or train controls to prevent misalignment or premature movement. Vehicle-
mounted systems often tie fillers to the door mechanism, ensuring they only extend once the doors are
closed and retract before door unlocking. While automation dramatically improves passenger safety by
removing manual steps, the systems also demand precise timing, robust logic, and high reliability to
prevent hazards or delays.
1.1 OVERVIEW
A movable railway platform is an innovative solution designed to optimize railway station
operations and enhance passenger convenience. This system involves platforms that can move along
the tracks to align with arriving trains, eliminating the need for fixed platforms and allowing for more
efficient use of railway infrastructure.
The implementation of movable railway platforms requires careful planning, coordination,
and investment in advanced technology and infrastructure. However, the benefits of improved
efficiency, safety, and passenger experience make it an attractive solution for modernizing railway
stations.
Challenges:
1. Technical Complexity: Implementing movable platforms requires advanced technology and
infrastructure, including sophisticated control systems and safety features.
2. Safety Concerns: Ensuring the safety of passengers and staff is crucial, requiring careful design and
implementation of safety features.
3. Integration with Existing Infrastructure: Movable platforms must be integrated with existing railway
infrastructure, requiring careful planning and coordination.
By embracing innovative solutions like movable railway platforms, the railway industry can
improve efficiency, safety, and passenger experience, setting the stage for a more sustainable and
efficient transportation system.
2
A retractable footbridge/platform installed between two railway platforms that automatically
opens or closes based on train movement. When a train approaches, the platform retracts, preventing
crossing. Once the train departs, the platform extends, allowing pedestrians to cross track-level safely,
without stairs or overpasses.
• Sensing the Train
IR transceivers or proximity sensors are placed near track ends. These detect an approaching
or leaving train.
• Control Unit
A microcontroller (Arduino UNO, P89V51 series, etc.) receives sensor signals and decides
movement timing.
• Actuation Mechanism
A motorized actuation system—via H-bridge-driven DC or stepper motors—physically
moves the platform to retract or extend it.
• Safety & User Feedback
Integrated LEDs and buzzers signal when the platform is closing (red for stop) or open
(green for go) to guide users safely.
• Power Supply
Typically powered by a regulated 5 V DC supply using a 7805 regulator. Some advanced
versions include piezoelectric energy harvesters, converting footstep energy into backup
power.
• IoT & Monitoring (Optional)
Modern designs can include IoT modules for remote monitoring, status updates, and data
collection.
1.2 MOTIVATION
The motivation behind developing movable railway platforms based on train arrival stems from
the need to optimize railway station operations, enhance passenger experience, and improve overall
efficiency. Traditional fixed-platform systems often lead to limitations in capacity, flexibility, and
safety.
Key Drivers:
1. Increasing Passenger Demand: Growing passenger numbers require more efficient use of existing
infrastructure.
2. Capacity Constraints: Fixed platforms can lead to bottlenecks, delays, and reduced capacity.
3. Safety Concerns: Traditional platforms can pose safety risks, particularly during peak hours or in
3
high-density stations.
4. Technological Advancements: Advances in automation, sensors, and control systems enable
innovative solutions like movable platforms.
Future Prospects:
1. Integration with Smart Railway Systems: Movable platforms can be integrated with smart railway
systems, enabling real-time monitoring and optimization.
2. Sustainability: Movable platforms can be designed with sustainability in mind, reducing energy
consumption and environmental impact.
3. Global Applicability: The concept of movable platforms can be applied to various railway systems
worldwide, improving efficiency and passenger experience.
By adopting movable railway platforms, railway stations can address capacity constraints,
improve safety, and enhance passenger experience, ultimately contributing to a more efficient and
sustainable transportation system.
1.3 EXISTING SYSTEM
In the current railway infrastructure, platforms are fixed in length and height, constructed as
permanent structures with no capability for dynamic adjustment. These static platforms are designed
based on average train lengths and do not accommodate variations in train models, coach
configurations, or door positions. As a result, when longer or different types of trains arrive, there is
often a mismatch between the platform and the train doors.
This mismatch creates significant safety and accessibility challenges. Passengers—particularly
the elderly, differently-abled, and children—face difficulties while boarding or alighting, especially
when there is a large horizontal or vertical gap between the train and the platform. In some rural or
space-constrained stations, certain train coaches may not align with the platform at all, forcing
passengers to disembark onto the trackbed, increasing the risk of injury.
Furthermore, the current system lacks any automation or smart features to adapt to real-time
train arrivals. There is no mechanism to detect incoming train type or position and accordingly adjust
the platform dimensions or alignment. As a result, boarding and deboarding processes are inefficient
and often unsafe, especially during peak hours or in emergency situation.
Now the braking is applied directly to the trains. So the interchanging of poles becomes too
late, so the train will stop with some time delay. On viewing the platform crossing, it is difficult for the
physically challenged people. Since it has steps over the tracks. Normally manual braking system is
used to avoid collision. In addition to this we are using switching of tracks and train timing adjustments
which is time consuming process. Manual braking too works only if it is noticed by the train driver.
4
No artificial platform to minimize the distance to travel from one platform to other.
DRAWBACKS IN EXISTING SYSTEM
• Accidents may occurs.
• During platform passengers may fall in tracks.
• We cannot change the tracks immediately.
• Trains also cannot stopped immediately.
1.3 PROPOSED SYSTEM
The proposed system introduces an intelligent, automated movable railway platform that
dynamically aligns with train doors based on real-time arrival information. The primary objective is to
enhance passenger safety and convenience by minimizing the gap between the train and the platform,
especially at stations with limited or non-uniform platform infrastructure.
The system utilizes a combination of sensors (such as IR, ultrasonic, or LIDAR),
microcontrollers, and train arrival data (via GPS or railway signaling systems) to detect the incoming
train’s length, type, and stopping position. Based on this data, the platform extension mechanism is
activated to adjust or extend the platform precisely to the location of the train doors.
Our platform design uses single track between platforms so that passengers can board the train
from both sides. Once train departed the platforms will be connected through the movable platform
extensions so that the passengers can walks over them and cross the platforms. When a train is about
to arrive at the station the buzzer alarms rings so that the passengers will walk away from the moving
platform extension and once cleared platform will open for the train. The train status is monitored
through the IR sensors to identify the extract position with in station premises. The train’s status will
be displayed on LCD displays over the platform for the passenger convenience. The platform control
unit consist of Atmega16 micro controller unit. In order to communicate with the train RF
communication modules are used with transmitter at platform control unit and receiver being on the
train control unit.
Key features of the proposed system include:
• Real-time train detection using embedded sensors or data from centralized railway systems.
• Automated platform extension and retraction using motorized mechanisms.
• Safety controls to prevent operation during passenger movement or in case of malfunction.
• Integration with train schedules and signaling systems for accurate deployment.
• Fail-safe design to revert to manual operation in case of system failure.
5
1.5 OBJECTIVES
The primary objective of the Automatic Movable Railway Platform project is to enhance
passenger safety and accessibility by automating the pedestrian crossing over railway tracks. This
system aims to eliminate the need for stairs or manual intervention, providing a seamless and secure
passage for passengers, especially those with mobility challenges.
Main Objectives
Automated Pedestrian Crossing: To design a platform that automatically adjusts its position in
response to train arrivals and departures, allowing passengers to cross the tracks without the need for
stairs or manual operation.
Real-Time Train Detection: Utilizing infrared (IR) sensors to detect the presence and movement of
trains, ensuring the platform is only accessible when it is safe for passengers to cross.
Enhanced Safety Measures: Implementing features that
prevent accidents, such as automatic retraction of the platform when a train is approaching and real-
time monitoring of train status to avoid collisions.
Energy Efficiency: Incorporating renewable energy sources, such as piezoelectric sensors, to power
the system, reducing dependency on external power supplies and promoting sustainability.
User-Friendly Interface: Providing clear announcements and visual indicators to inform passengers
of train arrivals and platform status, improving the overall user experience.
By achieving these objectives, the project seeks to create a safer, more accessible, and efficient railway
environment for all passengers.
6
CHAPTER 2
LITERATURE SURVEY
A literature survey on movable railway platforms based on train arrival reveals systems that
use sensors and microcontrollers to detect approaching trains and automatically move a platform,
either to provide access or to clear a path for the train. These systems aim to improve safety,
accessibility, and efficiency at railway stations.
Several research studies and technological developments have been carried out in the field of
intelligent railway infrastructure and dynamic platform systems. However, the integration of a
movable platform mechanism based on real-time train arrival data remains a relatively unexplored
area. Below is a summary of relevant works:
1.Automated Train Detection and Station Management Systems
Researchers have developed systems that utilize sensors, RFID, and GPS to monitor and
manage train positions and arrivals in real-time. These systems are primarily used for signaling and
scheduling but can provide foundational data for platform automation.
[Ref: S. Sharma et al., “Real-time Train Monitoring using GPS,” IJERT, 2020]
2. Platform Gap Reducer Mechanisms
Some urban transit systems, such as the London Underground and Tokyo Metro, have
implemented platform gap fillers to bridge the space between the train and platform. These are usually
static or semi-automatic and only function at designated doors, lacking full train-length adaptability.
[Ref: T. Nakamura, “Automatic Gap Filler in Japanese Railway Systems,” IEEE Trans. on Intelligent
Transportation, 2018]
3. Robotic Platform Extensions
Research into robotic arms and linear actuators for platform edge adjustment has shown
promising results in improving accessibility. However, most of these projects are in prototype stages
and have not been integrated with train arrival detection systems.
[Ref: K. Kumar et al., “Design of a Robotic Platform Edge Adjustment System,” IJRASET, 2021]
4. Smart Railway Station Concepts
With the emergence of smart city initiatives, several papers discuss IoT-based railway station
automation, including crowd monitoring, information systems, and basic safety mechanisms. While
dynamic platforms are occasionally mentioned, there is limited implementation of such systems in real-
world settings.
7
[Ref: P. Singh et al., “IoT-based Smart Railway Station Management,” IRJET, 2022]
5. Challenges in Accessibility and Safety
Studies highlight the hazards posed by static platforms, particularly for differently-abled
passengers. These papers call for adaptable infrastructure, though most solutions focus on coach
modifications rather than platform-side innovations.
8
CHAPTER 3
PROBLEM DEFINITION
CORE REQUIREMENTS
1. Inputs:
o A list of train schedules, each with:
▪ Arrival time (arr[i])
▪ Departure time (dep[i])
o Times are within a single day (00:00–23:59), with arr[i] < dep[i].
o Note: If arr[j] == dep[i] for trains i and j, they cannot share the same static platform; a
new platform deployment is needed.
2. Constraints:
o Platforms (movable segments) cannot be shared by two trains at overlapping times—
i.e., if train B arrives before train A departs, they require separate platforms .
o The system must anticipate arrival times to deploy the platform in time and retract
post-departure.
3. Goal:
o Determine the minimal number of simultaneous platforms needed so that no train waits
due to platform unavailability.
o For automation control: develop a scheduling logic to activate/deactivate platforms
using sensors (like IR detectors), microcontrollers, and actuators (e.g., H-bridge
controlled motor).
Control & System Design Layer
On the hardware/software side:
• Use IR sensors to detect train presence.
• A microcontroller receives these signals and runs a timing-based control algorithm.
• H-bridge/motors physically move the platform into position before scheduled arrival, and
retract it after departure.
• The logic must also consider earliest safe time windows for movement to avoid interfering
with trains or passengers.
9
CHAPTER 4
INTRODUCTION TO EMBEDDED SYSTEM
4.1 INTRODUCTION
Microprocessors are commonly referred to as general purpose processors as they simply accept
the inputs, process it and give the output. In contrast, a microcontroller not only accepts the data as
inputs but also manipulates it, interfaces the data with various devices, controls the data and thus finally
gives the result.
An Embedded System is a combination of computer hardware and software, and perhaps
additional mechanical or other parts, designed to perform a specific function. A good example is the
microwave oven. Almost every household has one, and tens of millions of them are used every day,
but very few people realize that a processor and software are involved in the preparation of their lunch
or dinner.
This is in direct contrast to the personal computer in the family room. It too is comprised of
computer hardware and software and mechanical components (disk drives, for example). However, a
personal computer is not designed to perform a specific function rather; it is able to do many different
things. Many people use the term general-purpose computer to make this distinction clear. As shipped,
a general-purpose computer is a blank slate; the manufacturer does not know what the customer will
do wish it. One customer may use it for a network file server another may use it exclusively for playing
games, and a third may use it to write the next great American novel.
Frequently, an embedded system is a component within some larger system. For example,
modern cars and trucks contain many embedded systems. One embedded system controls the anti-lock
brakes, other monitors and controls the vehicle's emissions, and a third displays information on the
dashboard. In some cases, these embedded systems are connected by some sort of a communication
network, but that is certainly not a requirement.
At the possible risk of confusing you, it is important to point out that a general-purpose
computer is itself made up of numerous embedded systems. For example, my computer consists of a
keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each of which is an
embedded system. Each of these devices contains a processor and software and is designed to perform
a specific function. For example, the modem is designed to send and receive digital data over analog
10
telephone line. That's it and all of the other devices can be summarized in a single sentence as well.
4.2 OVERVIEW OF EMBEDDED SYSTEM :
Every embedded system consists of custom-built hardware built around a Central Processing
Unit (CPU). This hardware also contains memory chips onto which the software is loaded. The
software residing on the memory chip is also called the ‘firmware’.
The same architecture is applicable to any computer including a desktop computer. However,
there are significant differences. It is not compulsory to have an operating system in every embedded
system. For small appliances such as remote control units, air conditioners, toys etc., there is no need
foran operating system and you can write only the software specific to that application.
For applications involving complex processing, it is advisable to have an operating system. In
such a case, you need to integrate the application software with the operating system and then transfer
the entire software on to the memory chip. Once the software is transferred to the memory chip, the
software will continue to run for a long time you don’t need to reload new software. Now, let us see
the details of the various building blocks of the hardware of an embedded system. As shown in Fig. the
building blocks are:
a. Central Processing Unit (CPU)
b. Memory (Read-only Memory and Random Access Memory)
c. Input Devices
d. Output devices
e. Communication interfaces
f. Application-specific circuitry
11
but you need to use many external components with them. D5P is used mainly for applications
in which signal processing is involved such as audio and video processing.
b. MEMORY:
The memory is categorized as Random Access 11emory (RAM) and Read Only Memory
(ROM). The contents of the RAM will be erased if power is switched off to the chip, whereas ROM
retains the contents even if the power is switched off. So, the firmware is stored in the ROM. When
power is switched on, the processor reads the ROM; the program is program is executed.
c.INPUT DEVICES:
Unlike the desktops, the input devices to an embedded system have very limited capability.
There will be no keyboard or a mouse, and hence interacting with the embedded system is no easy task.
Many embedded systems will have a small keypad-you press one key to give a specific command. A
keypad may be used to input only the digits. Many embedded systems used in process control do not
have any input device for user interaction; they take inputs from sensors or transducers 1’fnd produce
electrical signals that are in turn fed to other systems.
d.OUTPUT DEVICES:
The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of the
system modules, or for visual indication of alarms. A small Liquid Crystal Display (LCD) may also be
used to display some important parameters.
e.COMMUNICATION INTERFACES:
The embedded systems may need to, interact with other embedded systems at they may have
to transmit data to a desktop. To facilitate this, the embedded systems are provided with one or a few
communication interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB), IEEE 1394,
Ethernet etc.
f.APPLICATION-SPECIFIC CIRCUITRY:
Sensors, transducers, special processing and control circuitry may be required fat an
Embedded system, depending on its application. This circuitry interacts with the processor to carry
out the necessary work. The entire hardware has to be given power supply either through the 230 volts
main supply or through a battery. The hardware has to design in such a way that the power consumption
is minimized.
12
CHAPTER 5
BLOCK DIAGRAM AND HARDWARE DISCRIPTION
5.1 BLOCK DIAGRAM:
13
5.2.1 TRANSFORMER
Fig:5.3 Transformer
A transformer consists of two coils also called as “WINDINGS” namely PRIMARY &
SECONDARY. They are linked together through inductively coupled electrical conductors also called
as CORE. A changing current in the primary causes a change in the Magnetic Field in the core & this
in turn induces an alternating voltage in the secondary coil. If load is applied to the secondary then an
alternating current will flow through the load. If we consider an ideal condition then all the energy
from the primary circuit will be transferred to the secondary circuit through the magnetic field.
So
The secondary voltage of the transformer depends on the number of turns in the Primary as well as
in the secondary.
Rectifier
A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we
use a diode, a diode is a device that allows current to pass only in one direction i.e. when the anode of
the diode is positive with respect to the cathode also called as forward biased condition & blocks current
14
in the reversed biased condition.
Rectifier can be classified as follows:
1) Half Wave rectifier.
15
across the load. One of the disadvantages of Full Wave Rectifier design is the necessity of using a
center tapped transformer, thus increasing the size & cost of the circuit. This can be avoided by using
the Full Wave Bridge Rectifier
3) Bridge Rectifier
As the name suggests it converts the full wave i.e. both the positive & the negative half cycle
into DC thus it is much more efficient than Half Wave Rectifier & that too without using a center
tapped transformer thus much more cost effective than Full Wave Rectifier. Full Bridge Wave
Rectifier consists of four diodes namely D1, D2, D3 and D4. During the positive half cycle diodes
D1 & D4 conduct whereas in the negative half cycle diodes D2 & D3 conduct thus the diodes keep
switching the transformer connections so we get positive half cycles in the output.
If we use a center tapped transformer for a bridge rectifier we can get both positive & negative
half cycles which can thus be used for generating fixed positive & fixed negative voltages.
16
5.2.2 FILTER CAPACITOR
Even though half wave & full wave rectifier give DC output, none of them provides a constant
output voltage. For this we require to smoothen the waveform received from the rectifier. This can be
done by using a capacitor at the output of the rectifier this capacitor is also called as “FILTER
CAPACITOR” or “SMOOTHING CAPACITOR” or “RESERVOIR CAPACITOR”. Even after using
this capacitor a small amount of ripple will remain. We place the Filter Capacitor at the output of the
rectifier the capacitor will charge to the peak voltage during each half cycle then will discharge its
stored energy slowly through the load while the rectified voltage drops to zero, thus trying to keep the
voltage as constant as possible.
If we go on increasing the value of the filter capacitor then the Ripple will decrease. But then
costing will increase. The value of the Filter capacitor depends on the current consumed
by the circuit, the frequency of the waveform & the accepted ripple.
Where,
Vr = accepted ripple voltage.( should not be more than 10% of the voltage)
17
I = current consumed by the circuit in Amperes.
F = frequency of the waveform. A half wave rectifier has only one peak in one cycle
so F=25hz
After filtering the rectifier output the signal is given to a voltage regulator. The maximum input
voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the regulator
so the input voltage should be at least 2-3 Volts higher than the output voltage. If the input voltage gets
below the Vmin of the regulator due to the ripple voltage or due to any other reason the voltage
regulator will not be able to produce the correct regulated voltage.
18
5.3 CIRCUIT DIAGRAM:
5.4 IC 7805:
7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an input
voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp although
lower current models are available. Its output voltage is fixed at 5.0V. The 7805 also has a built-in
current limiter as a safety feature. 7805 is manufactured by many companies, including National
Semiconductors and Fairchild Semiconductors. The 7805 will automatically reduce output current if it
gets too hot.The last two digits represent the voltage; for instance, the 7812 is a 12-volt regulator. The
78xx series of regulators is designed to work in complement with the 79xx series of negative voltage
regulators in systems that provide both positive and negative regulated voltages, since the 78xx series
can't regulate negative voltages in such a system. The 7805 & 78 is one of the most common and well-
known of the 78xx series regulators, as it's small component count and medium-power regulated 5V
make it useful for powering TTL devices.
19
SPECIFICATIONS IC 7805
V
out 5V
V - V Difference
ein out 5V - 20V
Operation Ambient Temp 0 - 125°C
Output I max 1A
Fig:5.11 Specifications of IC 7805
5.5 IR Sensors (Infrared Sensors)
IR sensor is an electronic device, that emits the light in order to sense some object of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion. Usually,
in the infrared spectrum, all the objects radiate some form of thermal radiation. These types of
radiations are invisible to our eyes, but infrared sensor can detect these radiations.
Fig:5.12 IR Sensor
The emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR
photodiode . Photodiode is sensitive to IR light of the same wavelength which is emitted by the IR
LED. When IR light falls on the photodiode, the resistances and the output voltages will change in
proportion to the magnitude of the IR light received.
There are five basic elements used in a typical infrared detection system: an infrared source, a
transmission medium, optical component, infrared detectors or receivers and signal processing.
Infrared lasers and Infrared LED’s of specific wavelength used as infrared sources.
The three main types of media used for infrared transmission are vacuum, atmosphere and optical
fibers. Optical components are used to focus the infrared radiation or to limit the spectral response.
IR Sensor Working Principle
An IR sensor consists of two parts: the emitter circuit and the receiver circuit. This is
collectively known as a photo-coupler or an optocoupler.
The emitter is an IR LED, and the detector is an IR photodiode. The IR photodiode is sensitive
to the IR light emitted by an IR LED. The photodiode’s resistance and output voltage change in
20
proportion to the IR light received. This is the underlying working principle of the IR sensor.The type
of incidence can be direct incidence or indirect incidence. In direct incidence, the IR LED is placed in
front of a photodiode with no obstacle.In indirect incidence, both diodes are placed side by side with
an opaque object in front of the sensor. The light from the IR LED hits the opaque surface and reflects
back to the photodiode.
21
IR SENSOR MODULE:
22
• Rail safety
• Gas Analyzers
ADVANTAGES:
• It gives made sure about correspondence because of view or highlight point method of
correspondence.
• The battery utilized in infrared gadgets keep going for long term because of lower power
utilization.
• Infrared movement sensors identify movement in daytime and evening dependably.
• The sensor doesn't need any contact with the item to be detected. The infrared gadgets are more
proper for targets which are close than 10 mm.
• Infrared gadgets can quantify distance to delicate items which may not be effortlessly identified
by ultrasound.
• They are truly more modest in size and are more moderate.
• It has reaction time quicker than thermocouple.
• It gives great soundness after some time.
• No consumption or oxidation can influence the precision of infrared sensor.
• It conveys high repeatability.
23
Fig:5.15 LCD Display
Working of Liquid Crystal Display
The basic working principle of LCD is blocking of light. It does not produce light on its own.
So external light source is used. When the external light passes from one polarizer to the next polarizer,
external supply is given to the liquid crystal ,the polarized light aligns itself so that the image is
produced in the screen.
24
Fig:5.17 LCD display with pins descriptions
In the segment arrangement, the conducting segment looks dark and the other segment looks
clear. To display number 2 , the segments A,B,G,E,D are energized.
26
Fig:5.19 HC-05 Bluetooth Module
Bluetooth serial modules allow all serial enabled devices to communicate with each other using
Bluetooth.
It has 6 pins,
1. Key/EN: It is used to bring Bluetooth module in AT commands mode. If Key/EN pin is set to high,
then this module will work in command mode. Otherwise by default it is in data mode. The default
baud rate of HC-05 in command mode is 38400bps and 9600 in data mode.
HC-05 module has two modes,
1. Data mode: Exchange of data between devices.
2. Command mode: It uses AT commands which are used to change setting of HC-05. To send
these commands to module serial (USART) port is used.
2. VCC: Connect 5 V or 3.3 V to this Pin.
3. GND: Ground Pin of module.
4. TXD: Transmit Serial data (wirelessly received data by Bluetooth module transmitted out serially
on TXD pin)
5. RXD: Receive data serially (received data will be transmitted wirelessly by Bluetooth module).
6. State: It tells whether module is connected or not.
28
APPLICATIONS OF HC-05 BLUETOOTH MODULE
1. Robotics:
• Remote control of robots: The HC-05 allows for controlling robots from a distance using a
smartphone or other Bluetooth-enabled device.
• Data acquisition from robots: It can transmit sensor data from robots to a central control system
for analysis and monitoring.
2. Home Automation:
• Controlling appliances: Users can control lights, fans, and other appliances wirelessly via a
smartphone or other control interface.
• Automated systems: The module can be integrated into automated systems for tasks like
controlling blinds, opening doors, etc.
3. IoT (Internet of Things):
• Enabling device communication: The HC-05 facilitates communication between various IoT
devices, allowing them to interact with each other or with a central hub.
• Data transmission: It can transmit data from sensors and other devices to cloud platforms or
other networked systems.
4. Data Logging:
• Collecting sensor data: The module can send data collected from various sensors to a computer
or smartphone for logging and analysis.
• Environmental monitoring: It can be used for transmitting data from sensors in environmental
monitoring systems.
5. Other Applications:
• Wireless headsets and headphones
• Game controllers
• Wireless mice and keyboards
• GPS receivers
• Embedded projects
• Industrial automation
ADVANTAGES:
1. Master and Slave Functionality:
• The HC-05 can initiate connections (master mode) or accept connections from other devices
(slave mode). This flexibility makes it suitable for various applications, from controlling
devices with a smartphone to enabling communication between two microcontrollers.
29
• The HC-06, a similar module, only works as a slave, limiting its application in certain scenarios.
2. Easy Serial Communication:
• The HC-05 uses the UART protocol for communication, which is straightforward to implement
with most microcontrollers.
• It simplifies the process of sending and receiving data wirelessly, making it ideal for beginners
and experienced users alike.
3. Cost-Effective:
• The HC-05 is an affordable option for adding wireless capabilities to projects, making it
accessible for hobbyists and students.
4. Versatile Applications:
• Its ability to operate in both master and slave modes and its simple interface make it suitable
for a wide range of projects, including:
o Controlling devices remotely (e.g., turning LEDs on/off, controlling motors).
o Enabling wireless communication between microcontrollers.
o Building wireless sensor networks.
o Creating wireless data bridges.
5. Enhanced AT Commands:
• The HC-05 supports a comprehensive set of AT commands that allow for extensive
configuration and customization of the module's behavior.
6. Enhanced Security:
• It uses frequency-hopping spread spectrum (FHSS) technology, which provides some level of
security and prevents the signal from being easily jammed or hacked.
7. Range and Speed:
• While the range can vary depending on the environment, it typically offers a range of up to 30
meters.
• The data transfer speed is typically around 115200 bps.
30
L293D motor driver is the most commonly used driver for Bidirectional motor driving
applications.This L293D IC allows DC motor to drive on either direction. L293D is a 16-pin IC which
can control a set of two DC motors simultaneously in any direction. It means that you can control two
DC motor with a single L293D IC. Because it has two H-Bridge Circuit inside. The L293D can drive
small and quiet big motors as well. There are various ways of making an H-bridge motor control circuit
such as using transistors, relays, and using L293D/L298. Before going into detail, first we will see what
is H-Bridge circuit.
Working Principle:
1. Direction Control:
By manipulating the input pins (2 & 7 or 10 & 15), the direction of the motor's rotation is
controlled.
• For example, to make a motor connected to the left H-bridge rotate clockwise, pin 2 is
set to HIGH and pin 7 to LOW. To rotate it counterclockwise, pin 2 is set to LOW and
pin 7 to HIGH.
2. Enable/Disable:
The enable pins (1 and 9) act as switches to turn the corresponding H-bridge and motor on or
off.
3. Speed Control:
The L293D can be used with PWM (Pulse Width Modulation) signals to control the speed of
the motor. By varying the duty cycle of the PWM signal, the average voltage applied to the motor can
be adjusted, thus controlling its speed.
31
4. H-Bridge Operation:
When a motor is connected to an H-bridge, different switch configurations (e.g., S1 & S4
closed, S2 & S3 open) allow current to flow in one direction, causing the motor to rotate in one
direction. Reversing the current flow (e.g., S2 & S3 closed, S1 & S4 open) causes the motor to rotate
in the opposite direction.
32
• Pin-10 (Input-3): When this pin is high, then the flow of current will through output-3
• Pin-9 (Enable3-4): When this pin is high, then the right part of the IC will work & when it is
low the right part of the IC won’t work. This pin is also called as a master control pin for the
right part of the IC.
It serves as an interface between a microcontroller or other control system and the motor itself,
enabling precise control of the motor's speed, direction, and other parameters. Motor drivers are
commonly used in various applications, including robotics, automation, automotive systems, and
industrial machinery.
ADVANTAGES
• Dual Motor Control:
The L293D can control two separate DC motors independently, making it ideal for applications
requiring two-motor operation, such as robot movement.
• Bidirectional Control:
It allows for both forward and reverse rotation of the motors by controlling the polarity of the voltage
applied to the motor.
• Moderate Current Handling:
The L293D can handle a continuous current of up to 600mA per channel, which is sufficient for many
small to medium-sized DC motors and stepper motors.
• Wide Voltage Range:
It operates with a wide input voltage range, typically from 4.5V to 36V, making it compatible with a
variety of power sources.
• Built-in Protection:
The L293D includes protection diodes to safeguard the circuit from back EMF (electromotive force)
generated by the motors, which can damage other components.
• Affordable and Compact:
It is a relatively inexpensive motor driver, and its compact size makes it suitable for space-constrained
projects.
5.9 BUZZER
An audio signaling device like a beeper or buzzer may be electromechanical or piezo or
mechanical type. The main function of this is to convert the signal from audio to sound. Generally, it
is powered through DC voltage and used in timers, alarm devices, printers, alarms, computers, etc.
Based on the various designs, it can generate different sounds like alarm, music, bell & siren.
33
Fig:5.22 Buzzer Pin Configuration
The pin configuration of the buzzer is shown below. It includes two pins namely positive and
negative. The positive terminal of this is represented with the ‘+’ symbol or a longer terminal. This
terminal is powered through 6Volts whereas the negative terminal is represented with the ‘-‘symbol or
short terminal and it is connected to the GND terminal.
Working Principle
The working principle of a buzzer depends on the theory that, once the voltage is given across
a piezoelectric material, then a pressure difference is produced. A piezo type includes piezo crystals
among two conductors.
Once a potential disparity is given across these crystals, then they thrust one conductor & drag
the additional conductor through their internal property. So this continuous action will produce a sharp
sound signal.
Specifications
The specifications of the buzzer include the following.
• Color is black
• The frequency range is 3,300Hz
• Operating Temperature ranges from – 20° C to +60°C
• Operating voltage ranges from 3V to 24V DC
• The sound pressure level is 85dBA or 10cm
• The supply current is below 15mA
34
BUZZER CIRCUIT DIAGRAM
The circuit diagram of the water level indicator using the buzzer is shown below. This circuit
is used to sense or detect the water level within the tank or washing machine or pool, etc. This circuit
is very simple to design using few components such as a transistor, buzzer, 300K variable resistor, and
power supply or 9V battery.
35
• Annunciator Panels
• Game Shows
ADVANTAGES
• Low Power Consumption:
Buzzers, especially piezo buzzers, require very little power to operate, making them ideal for
battery-powered devices.
• Small Size and Lightweight:
Their compact design allows for easy integration into small and portable devices.
• Long Lifespan:
Buzzers generally have a long operational lifespan, reducing the need for frequent replacements.
• Cost-Effective:
They are relatively inexpensive compared to other sound-producing components, like speakers,
making them a budget-friendly option.
• Reliability:
Buzzers are known for their robustness and ability to withstand various environmental conditions.
• Versatility:
They can be used to generate a wide range of sounds and can be integrated into various applications,
from simple alarms to more complex signaling systems.
• Ease of Use:
Buzzers are easy to connect and operate, often requiring just a simple voltage signal to produce
sound.
• No Arcing or RF Noise:
Unlike some other components, buzzers do not produce arcing or RF noise, minimizing interference
with other electronic circuits.
• Wide Operating Temperature Range:
Buzzers can function effectively across a wide range of temperatures, making them suitable for
diverse environments.
36
CHAPTER 6
CONTROLLER
6.1 Arduino
Arduino is a computer hardware and software company, project, and user community that
designs and manufactures microcontroller kits for building digital devices and interactive objects that
can sense and control objects in the physical world. The project's products are distributed as open
software and hardware, which are licensed under the GNU Lesser General Public License (LGPL) or
the GNU General Public License (GPL), permitting the manufacture of Arduino boards and software
distribution by anyone. Arduino boards are available commercially in preassembled form, or as do-it-
yourself kits.
Arduino board designs use a variety of microprocessors and controllers. The boards are
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various
expansion boards (shields) and other circuits. The boards feature serial communications interfaces,
including Universal Serial Bus (USB) on some models, which are also used for loading programs from
personal computers. The microcontrollers are typically programmed using a dialect of features from
the programming languages C and C++. In addition to using traditional compiler toolchains, the
Arduino project provides an integrated development environment (IDE) based on
the Processing language project.
The Arduino project started in 2005 as a program for students at the Interaction Design institute
Ivrea in Ivrea, Italy, aiming to provide a low-cost and easy way for novices and professionals to create
devices that interact with their environment using sensors and actuators. Common examples of such
devices intended for beginner hobbyists include simple robots, thermostats and motion detectors.
The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of the project
used to meet. The bar was named after Arduino of Ivrea, who was the margrave of the March of Ivrea
and king of Italy from 1002 to 1014.
37
Fig:6.1 Arduino UNO
6.2 History
The origin of the Arduino project started at the interaction Design Institute Ivrea (IDII)
in Ivrea, Italy. At that time, the students used a BASIC Stamp microcontroller at a cost of $100, a
considerable expense for many students. In 2004, Colombian student Hernando Barragán created the
development platform wiring as a Master's thesis project at IDII, under the supervision of Massimo
Banzi and Casey Reas, who are known for work on the Processing language. The project goal was to
create simple, low cost tools for creating digital projects by non-engineers. The Wiring platform
consisted of a printed circuit board (PCB) with an ATmega168 microcontroller, an IDE based on
Processing and library functions to easily program the microcontroller.
In 2005, Massimo Banzi, with David Mellis, another IDII student, and David Cuartielles,
added support for the cheaper ATmega8 microcontroller to Wiring. But instead of continuing the work
on Wiring, they copied the Wiring source code and renamed it as a separate project, called Arduino.
The initial Arduino core team consisted of Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca
Martino, and David Mellis, but Barragán was not invited to participate. Following the completion of
the Wiring platform, lighter and less-expensive versions were distributed in the open-source
community. Adafruit Industries, a New York City supplier of Arduino boards, parts, and assemblies,
estimated in mid-2011 that over 300,000 official Arduinos had been commercially produced, and in
2013 that 700,000 official boards were in users' hands.
38
6.3 Hardware
39
programs to the on-chip flash memory. The default bootloader of the Aduino UNO is the optiboot
bootloader. Boards are loaded with program code via a serial connection to another computer. Some
serial Arduino boards contain a level shifter circuit to convert between RS-2322 logic levels
and transistor-transistor logic (TTL) level signals. Current Arduino boards are programmed
via Universal Serial Bus (USB), implemented using USB-to-serial adapter chips such as the FTDI
FT232. Some boards, such as later-model Uno boards, substitute the FTDI chip with a separate AVR
chip containing USB-to-serial firmware, which is reprogrammable via its own ICSP header. Other
variants, such as the Arduino Mini and the unofficial Boarduino, use a detachable USB-to-serial
adapter board or cable, Bluetooth or other methods, when used with traditional microcontroller tools
instead of the Arduino IDE, standard AVR in-system programming (ISP) programming is used.
The Arduino board exposes most of the microcontroller's I/O pins for use by other circuits.
The Diecimila, Duemilanove, and current Uno provide 14 digital I/O pins, six of which can
produce pulse width modulateed signals, and six analog inputs, which can also be used as six digital
I/O pins. These pins are on the top of the board, via female 0.1-inch (2.54 mm) headers. Several plug-
in application shields are also commercially available. The Arduino Nano, and Arduino-compatible
Bare Bones Board and Boarduino boards may provide male header pins on the underside of the board
that can plug into solder less bread boards. Many Arduino-compatible and Arduino-derived boards
exist. Some are functionally equivalent to an Arduino and can be used interchangeably. Many enhance
the basic Arduino by adding output drivers, often for use in school-level education, to simplify making
buggies and small robots. Others are electrically equivalent but change the form factor, sometimes
retaining compatibility with shields, sometimes not. Some variants use different processors, of varying
compatibility.
6.4 Software development
A program for Arduino may be written in any programming language for a compiler that
produces binary machine code for the target processor. Atmel provides a development environment for
their microcontrollers, AVR Studio and the newer Atmel Studio.
The Arduino project provides the Arduino integrated development environment (IDE), which
is a cross platform application written in the programming language Java. It originated from the IDE
for the languages Processing and Wiring. It includes a code editor with features such as text cutting
and pasting, searching and replacing text, automatic indenting, brace matching, and syntax
highlighting, and provides simple one-click mechanisms to compile and upload programs to an
Arduino board. It also contains a message area, a text console, a toolbar with buttons for common
functions and a hierarchy of operation menus.
40
A program written with the IDE for Arduino is called a sketch. Sketches are saved on the
development computer as text files with the file extension .ino. Arduino Software (IDE) pre-1.0 saved
sketches with the extension.pde. The Arduino IDE supports the languages C and C++ using special
rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which
provides many common input and output procedures. User-written code only requires two basic
functions, for starting the sketch and the main program loop, that are compiled and linked with a
program stub main() into an executable cyclic executive program with the GNU chaintool, also
included with the IDE distribution. The Arduino IDE employs the program avrdude to convert the
executable code into a text file in hexadecimal encoding that is loaded into the Arduino board by a
loader program in the board's firmware.
Applications
1. Xoscillo, an open-source oscilloscope
2. Ardiunome, a MIDI controller device that mimics the Monome
3. OBDunio, a trip computer that uses the on-board diagonistics interface found in most
modern cars
4. Ardupilot, drone software and hardware
5. Gameduino, an Arduino shield to create retro 2D video games
6. Arduino Phone, a do-it-yourself cellphone
7. Water quality testing platform
8. Automatic titration system based on Arduino and stepper motor
9. Low cost data glove for virtual reality applications
10. Impedance sensor system to detect bovine milk adulteration
11. Homemade CNC using Arduio and DC motors with close loop control by Homofaciens
12. DC motor control using Arduino and H-Bridge
41
6.5 Technical specifications
43
Warnings
The Arduino/Genuino Uno has a resettable polyfuse that protects your computer's USB ports
from shorts and overcurrent. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will
automatically break the connection until the short or overload is removed.
Differences with other boards
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-
serial converter.
Power
The Arduino/Genuino Uno board can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB) power can come either
from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm
center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND and
Vin pin headers of the POWER connector.
The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may become unstable. If using more
than 12V, the voltage regulator may overheat and damage the board. The power pins are as follows:
• Vin. The input voltage to the Arduino/Genuino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power jack, access
it through this pin.
• 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board. We don't advise it.
• 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
• IOREF. This pin on the Arduino/Genuino board provides the voltage reference with which
the microcontroller operates. A properly configured shield can read the IOREF pin voltage
and select the appropriate power source or enable voltage translators on the outputs to work
with the 5V or 3.3V.
44
6.7 Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
6.8 Input and Output
See the mapping between Arduino pins and ATmega328P ports. The mapping for the
Atmega8, 168, and 328 is identical. Each of the 14 digital pins on the Uno can be used as an input or
output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin
can provide or receive 20 mA as recommended operating condition and has an internal pull-up resistor
(disconnected by default) of 20-50k ohm. A maximum of 40mA is the value that must not be exceeded
on any I/O pin to avoid permanent damage to the microcontroller.
In addition, some pins have specialized functions:
• Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
• External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value,
a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
• PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
• SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using
the SPI library.
• LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
• TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
• The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though
is it possible to change the upper end of their range using the AREF pin and the
analogReference() function. There are a couple of other pins on the board:
o AREF. Reference voltage for the analog inputs. Used with analogReference().
o Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
6.9 Communication
Arduino/Genuino Uno has a number of facilities for communicating with a computer, another
Arduino/Genuino board, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
45
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board
channels this serial communication over USB and appears as a virtual com port to software on the
computer. The 16U2 firmware uses the standard USB COM drivers, and no external driver is needed.
However, on Windows,a.inf file is requried. The Arduino Software (IDE) includes a serial monitor
which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board
will flash when data is being transmitted via the USB-to-serial chip and USB connection to the
computer (but not for serial communication on pins 0 and 1). A Software serial library allows serial
communication on any of the Uno's digital pins. The ATmega328 also supports I2C (TWI) and SPI
communication. The Arduino Software (IDE) includes a Wire library to simplify use of the I2C bus;
see the documentation for details. For SPI communication, use the SPI Library.
6.10 Automatic (Software) Reset
Rather than requiring a physical press of the reset button before an upload, the
Arduino/Genuino Uno board is designed in a way that allows it to be reset by software running on a
connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is
connected to the reset line of the ATmega328 via a 100 nano farad capacitor. When this line is asserted
(taken low), the reset line drops long enough to reset the chip. The Arduino Software (IDE) uses this
capability to allow you to upload code by simply pressing the upload button in the interface toolbar.
This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-
coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running
Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the
following half-second or so, the bootloader is running on the Uno. While it is programmed to ignore
malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of
data sent to the board after a connection is opened. If a sketch running on the board receives one-time
configuration or other data when it first starts, make sure that the software with which it communicates
waits a second after opening the connection and before sending this data.
The Uno board contains a trace that can be cut to disable the auto-reset. The pads on either side
of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to
disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum
thread for details.
Revisions:
Revision 3 of the board has the following new features:1.0 pin out: added SDA and SCL pins
that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that
46
allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible
with both the board that uses the AVR, which operates with 5V and with the Arduino Due that operates
with 3.3V. The second one is a not connected pin, that is reserved for future purpose.
47
CHAPTER 7
SOFTWARE
7.1 Software introduction:
Arduino IDE Software. You can get different versions of Arduino IDE from the Download
page on the Arduino Official website. You must select your software, which is compatible with your
operating system (Windows, IOS, or Linux). After your file download is complete, zip the file.
48
Fig:7.2 Launch Arduino IDE
Open your first project. Once the software starts, you have two options:
• Create a new project.
• Open an existing project example.
To create a new project, select File --> New
49
Fig:7.4 Open an Existing Project Example
Here, we are selecting just one of the examples with the name Blink. It turns the LED on and
off with some time delay. You can select any other example from the list Select your serial port. Select
the serial device of the Arduino board. Go to Tools -> Serial Port menu. This is likely to be COM3 or
higher (COM1 and COM2 are usually reserved for hardware serial ports). To find out, you can
disconnect your Arduino board and re-open the menu, the entry that disappears should be of the
Arduino board. Reconnect the board and select that serial port.
50
A- Used to check if there is any compilation error.
B- Used to upload a program to the Arduino board.
C- Shortcut used to create a new sketch.
D- Used to directly open one of the example sketch.
E- Used to save your sketch.
F- Serial monitor used to receive serial data from the board and send the serial
data to the board.
Now, simply click the "Upload" button in the environment.
Wait a few seconds; you will see the RX and TX LEDs on the board, flashing. If the upload is
successful, the message "Done uploading" will appear in the status bar.
Fig 7.6 function of each symbol appearing in the Arduino IDE toolbar
In this chapter, we will study in depth, the Arduino program structure and we will learn more
new terminologies used in the Arduino world. The Arduino software is open-source. The source code
for the Java environment is released under the GPL and the C/C++ microcontroller libraries are under
the LGPL. Sketch: The first new terminology is the Arduino program called “sketch”. Structure
Arduino programs can be divided in three main parts: Structure, Values (variables and constants), and
Functions. In this tutorial, we will learn about the Arduino software program, step by step, and how we
can write the program without any syntax or compilation error. Let us start with the Structure. Software
structure consist of two main functions:
Setup( ) function
Loop( ) function
51
Fig: 7.7 Bare minimum code
Data types in C refers to an extensive system used for declaring variables or functions of
different types. The type of a variable determines how much space it occupies in the storage and how
the bit pattern stored is interpreted. The following table provides all the data types that you will use
during Arduino programming.
52
7.2 CODING:
#include <Wire.h>
#include <LiquidCrystal.h>
// IR sensor pins
#define IR1 8 // Train arrival sensor
#define IR2 13 // Train departure sensor
// State variables
bool trainArrived = false;
bool platformMoved = false;
void setup() {
pinMode(IR1, INPUT);
pinMode(IR2, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("Railway Platform");
53
Serial.println("System Ready");
}
void loop() {
int sensor1 = digitalRead(IR1);
int sensor2 = digitalRead(IR2);
// Train Arriving
if (sensor1 == LOW && !trainArrived) {
trainArrived = true;
platformMoved = false;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Train Arrived");
digitalWrite(buzzer, HIGH);
delay(1000);
digitalWrite(buzzer, LOW);
// Train Departing
if (sensor2 == LOW && trainArrived && !platformMoved) {
platformMoved = true;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Train Departed");
digitalWrite(buzzer, HIGH);
delay(500);
digitalWrite(buzzer, LOW);
54
Serial.println("Train Departed - Platform Resetting");
movePlatformBackward();
void movePlatformForward() {
lcd.setCursor(0, 1);
lcd.print("Platform Moving ");
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
Serial.println("Motor: Forward");
delay(3000); // Time to move platform forward
stopMotor();
}
void movePlatformBackward() {
lcd.setCursor(0, 1);
lcd.print("Returning Back ");
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
Serial.println("Motor: Backward");
delay(3000); // Time to reset platform
stopMotor();
}
void stopMotor() {
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
Serial.println("Motor: Stopped");
}
55
7.3 WORKING:
The movable platform system operates on the principle of detecting a train's arrival using an
infrared (IR) sensor and controlling a mechanical platform—repurposed from a DVD loader tray—
through an Arduino-based setup. When a train approaches and comes within range of the IR sensor,
the sensor detects the obstruction and sends a signal to the Arduino microcontroller. The Arduino
processes this signal and recognizes it as the arrival of the train. In response, it triggers a series of
actions: it activates a buzzer to audibly alert nearby individuals, displays a message such as "Train
Arrived - Platform Extending" on a 16x2 LCD, and optionally transmits this status to a paired mobile
device via the HC-05 Bluetooth module for remote monitoring.
Simultaneously, the Arduino sends control signals to the L293D motor driver, which powers
the small motor inside the DVD loader. This causes the tray to extend outward, effectively simulating
a movable platform that aligns with the train doors for safer and easier boarding. Once the train departs
and the IR sensor no longer detects its presence, the Arduino again updates the LCD with a new
message like "Train Departed - Platform Retracting", briefly activates the buzzer, sends a new
Bluetooth status update, and reverses the motor direction through the L293D. This causes the DVD
tray to retract to its original position, preparing the system for the next train. This setup provides a
compact, automated, and demonstrative model for a train-responsive platform extension system.
7.4 ADVANTAGES
1. Enhanced Passenger Safety
• Gap elimination between platform and train reduces risk of falls—common at non-level
interfaces .
• Ideal for children, elderly, or mobility-impaired passengers, preventing slips and injuries.
2. Improved Accessibility
• Allows smooth boarding without stairs or steep steps—especially helpful for
wheelchair/pushchair users .
• Removes need for ramps or bridge-crossings, easing boarding process for all.
3. Adaptive to Train Types
• Automatically adjusts to varying floor heights and profiles (e.g., conventional vs. LHB coaches)
• Supports diverse rolling stock without costly static rebuilds.
4. Optimized Efficiency
• Speeds up dwell times since passengers get on/off quickly and safely.
56
• Reduces need for staff or manual assistance, saving operational costs
7.5 APPLICATIONS
1. Enhanced Passenger Accessibility:
• Eliminating Footbridges:
Movable platforms could eliminate the need for passengers, particularly those with mobility issues
(elderly, disabled, or those with luggage), to use footbridges to cross tracks.
• Facilitating Easier Boarding:
The platform could extend or retract to align with the train doors, making it easier for passengers to
board and disembark, reducing congestion around train doors.
• Safety for Vulnerable Passengers:
By providing a level and stable surface, the movable platform can significantly improve safety for
vulnerable passengers.
2. Streamlined Train Operations:
• Increased Platform Efficiency:
A movable platform could allow trains to use both sides of a platform, effectively doubling its
capacity and reducing waiting times for trains to arrive and depart.
• Reduced Turnaround Times:
By enabling faster boarding and deboarding, the platform could contribute to shorter turnaround
times for trains, leading to increased operational efficiency.
• Potential for Automated Systems:
The platform could be integrated with sensors and automated systems to detect train arrivals and
departures, allowing for seamless and timely movement of the platform.
57
3. Integration with Existing Railway Infrastructure:
• Adaptability to Existing Stations:
Movable platforms can be designed to integrate with existing railway infrastructure, making it a
feasible solution for upgrading existing stations.
• Potential for Smart Railway Stations:
The platform could be part of a larger smart railway system, incorporating features like real-time
information displays, automated announcements, and integrated safety systems.
4. Safety and Security:
• Accident Prevention:
By preventing passengers from crossing tracks directly, especially during train movements, the
movable platform could significantly reduce the risk of accidents.
• Controlled Access:
The platform could be designed with controlled access features, ensuring that only authorized
personnel or passengers are allowed to use it during specific times.
These applications highlight the potential benefits of movable railway platforms in enhancing safety,
accessibility, and operational efficiency at railway stations, particularly in areas like Karimnagar,
Telangana, where improved connectivity and passenger facilities are crucial.
58
CHAPTER 8
RESULTS AND OUTPUT SCREENS
The project “MOVABLE RAILWAY PLATFORM BASED ON TRAIN ARRIVAL ” was
designed presence of every module has been reasoned out and placed carefully thus contributing to the
best working of the unit. With the help of growing technology the project has been successfully
implemented.
59
CHAPTER 9
CONCLUSION AND FUTURE SCOPE
9.1 CONCLUSION:
In conclusion, the proposed system demonstrates a practical and automated solution for
enhancing passenger safety and convenience at railway platforms through the implementation of a
movable platform mechanism. By integrating basic electronic components such as an IR sensor,
Arduino microcontroller, L293D motor driver, DVD loader, buzzer, LCD, and HC-05 Bluetooth
module, the system effectively detects the arrival and departure of a train and responds by extending
or retracting the platform accordingly. The use of a DVD loader as a moving platform, while small-
scale, successfully simulates the real-world application of a larger motorized platform extension.
This automation minimizes the need for manual intervention and provides timely visual and
audible alerts to users. Additionally, the integration of Bluetooth communication allows for remote
monitoring, making the system more intelligent and connected. The modular nature of the design
means it can be easily scaled or adapted using more robust actuators and sensors for deployment in real
railway stations.
Furthermore, the system improves safety, particularly for elderly or disabled passengers who
may have difficulty navigating wide gaps between the train and the platform. It also contributes to
reducing accidents that occur due to misalignment between the train and the platform edge. Overall,
this project showcases a cost-effective, efficient, and reliable method for improving the functionality
and safety of public transport infrastructure through embedded systems and automation technologies.
60
9.1 FUTURE SCOPE
The proposed movable platform system, though implemented on a small scale using
components like a DVD loader and basic sensors, has significant potential for further development and
real-world applications. One major area of future scope is scalability—the concept can be extended to
full-sized railway platforms using industrial-grade linear actuators or hydraulic systems capable of
handling the weight and size of real passenger boarding areas. These larger systems can be deployed
at metro stations, high-speed rail platforms, or rural stations where platform gaps are common and
often pose safety hazards.
Another promising direction is the integration of more advanced sensors and AI-based
detection systems. Instead of relying solely on IR sensors, more accurate train detection could be
achieved using LIDAR, ultrasonic sensors, or machine vision systems that identify the type and
position of the train coach. This would ensure more precise platform alignment and timing.
Moreover, the system could be enhanced with IoT (Internet of Things) features, enabling real-time
monitoring and control from centralized stations or mobile apps. Cloud connectivity can be added to
record train arrival data, system performance, and maintenance needs, enabling predictive maintenance
and improved system reliability.
For crowded urban stations, passenger flow management systems can be integrated to
automatically activate only the platform sections where boarding is expected, based on real-time coach
occupancy or smart ticketing data. Additionally, solar power integration and energy-efficient designs
could make the system more sustainable, especially for rural or remote areas with limited power access.
In future iterations, the system could also include automated safety barriers or gates that open
and close in sync with the platform's movement, adding another layer of safety. The concept could
even be adapted for airport boarding bridges, bus terminals, or other forms of public transport
infrastructure that require dynamic platform adjustment.
Overall, the project has a wide and impactful future scope, both in terms of technical enhancement and
practical deployment across modern and smart transportation networks.
61
REFERENCES
[1] J.Banuchandar, V. Kaliraj, P. Balasubramanian, S. Deepa, N. Thamilarasi “Automated unmanned
Railway Level Crossing System”, International Journal of Modern Engineering Research (IJMER)
www.ijmer.com Vol.2, Issue.1, Jan-Feb 2012 pp-458-463 ISSN: 2249-6645.
[2] Silla, A. and J. Luoma (2011). “Effect of Three Counter measures against the Illegal Crossing of
Railway Tracks”. Accident Analysis and Prevention, Volume 43, Issue 3.
[3] Oza S. et al. (2020), “ IoT: The Future for Quality of Services". In: Kumar A., Mozar S. (eds)
ICCCE 2019. Lecture Notes in Electrical Engineering, vol 570. Springer, Singapore.
[4] Delmonte, E. and S. Tong (2011). “Improving Safety and Accessibility at Level 29 Crossings for
Disabled Pedestrians”. Report Number T650. Rail Safety and Standards 30 Board, London, United
Kingdom, February 2011.
[5] www.electronicprojects.com
[6] Prashantha B, Harisha S “Smart railway crossing embedded with automated platform bridge” issue
on August 2015 by IJRET in 2321-730.Engineering and Technology eISSN: 2319-1163
[7] Manu Kanchan & Ankur Bansal “Conceptual design to transfer handicapped an people from one
railway platform to another” issue on 2014.
[8] U.S. Department of Transportation, Federal “Highway Administration. Motor Vehicle Accident
Costs “(Technical Advisory T7570.2, 31 October)
62