Rush Collision Prevention in Railways Major Document
Rush Collision Prevention in Railways Major Document
ABSTRACT:
This project fundamentally arrangements with determination for decreasing those swarm What's
more looking after them in the track station by presenting an canny framework of a controller which
methodology those worldwide positioning framework signs sent Eventually Tom's perusing those
transmitter in the prepare. By using an evolutionary algorithm to process the number of people in
the station, which is the core of the project, we can achieve the purpose of maintaining the crowd
and reduce the possibility of stampede in a specific station by adjusting the arrival time period and
the location of the train at a specific station. This project is one of the solutions proposed for the
trampling tragedy of Elphinstone Station in Mumbai.
1
Chapter-1
2
"designed to perform one or a few dedicated functions", and is thus appropriate to call
"embedded".
Labelled parts include microprocessor (4), RAM (6), flash memory (7) Embedded systems
programming is not like normal PC programming. In many ways, programming for an embedded
system is like programming PC 15 years ago. The hardware for the system is usually chosen to
make the device as cheap as possible. Spending an extra dollar a unit in order to make things
easier to program can cost millions. Hiring a programmer for an extra month is cheap in
comparison. This means the programmer must make do with slow processors and low memory,
while at the same time battling a need for efficiency not seen in most PC applications. Below is
a list of issues specific to the embedded field.
1.1.1 History:
In the earliest years of computers in the 1930–40s, computers were sometimes dedicated
to a single task, but were far too large and expensive for most kinds of tasks performed by
embedded computers of today. Over time however, the concept of programmable controllers
evolved from traditional electromechanical sequencers, via solid state devices, to the use of
computer technology.
One of the first recognizably modern embedded systems was the Apollo Guidance
3
Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At the
project's inception, the Apollo guidance computer was considered the riskiest item in the Apollo
project as it employed the then newly developed monolithic integrated circuits to reduce the size
and weight. An early mass- produced embedded system was the Automatics D-17 guidance
computer for the Minuteman missile, released in 1961. It was built from transistor logic and had
a hard disk for main memory. When the Minuteman II went into production in 1966, the D-17
was replaced with a new computer that was the first high-volume use of integrated circuits.
1.1.2 Tools:
Embedded development makes up a small fraction of total programming. There's also a
large number of embedded architectures, unlike the PC world where 1 instruction set rules, and
the Unix world where there's only 3 or 4 major ones. This means that the tools are more expensive.
It also means that they're lowering featured, and less developed. On a major embedded project,
at some point you will almost always find a compiler bug of some sort.
Debugging tools are another issue. Since you can't always run general programs on your
embedded processor, you can't always run a debugger on it. This makes fixing your program
difficult. Special hardware such as JTAG ports can overcome this issue in part. However, if you
stop on a breakpoint when your system is controlling real world hardware (such as a motor),
permanent equipment damage can occur. As a result, people doing embedded programming
quickly become masters at using serial IO channels and error message style debugging.
1.1.3 Resources:
To save costs, embedded systems frequently have the cheapest processors that can do the job.
This means your programs need to be written as efficiently as possible. When dealing with large
data sets, issues like memory cache misses that never matter in PC programming can hurt you.
Luckily, this won't happen too often- use reasonably efficient algorithms to start, and optimize
only when necessary. Of course, normal profilers won't work well, due to the same reason
debuggers don't work well.
Memory is also an issue. For the same cost savings reasons, embedded systems usually have the
least memory they can get away with. That means their algorithms must be memory efficient
(unlike in PC programs, you will frequently sacrifice processor time for memory, rather than the
reverse). It also means you can't afford to leak memory. Embedded applications generally use
4
deterministic memory techniques and avoid the default "new" and "malloc" functions, so that
leaks can be found and eliminated more easily.
1.2.1 Debugging:
Embedded debugging may be performed at different levels, depending on the facilities
available.
From simplest to most sophisticate they can be roughly grouped into the following areas:
• Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic)
• External debugging using logging or serial port output to trace operation using either a
monitor in flash or using a debug server like the Remedy Debugger which even works
for heterogeneous multi core systems.
• An in-circuit debugger (ICD), a hardware device that connects to the microprocessor via
a JTAG or Nexus interface. This allows the operation of the microprocessor to be
5
controlled externally, but is typically restricted to specific debugging capabilities in the
processor.
• An in-circuit emulator replaces the microprocessor with a simulated equivalent,
providing full control over all aspects of the microprocessor.
• A complete emulator provides a simulation of all aspects of the hardware, allowing all
of it to be controlled and modified and allowing debugging on a normal PC.
• Unless restricted to external debugging, the programmer can typically load and run
software through the tools, view the code running in the processor, and start or stop its
operation. The view of the code may be as assembly code or source-code.
Because an embedded system is often composed of a wide variety of elements,
the debugging strategy may vary. For instance, debugging a software (and
microprocessor) centric embedded system is different from debugging an embedded
system where most of the processing is performed by peripherals (DSP, FPGA, co-
processor). An increasing number of embedded systems today use more than one single
processor core. A common problem with multi-core development is the proper
synchronization of software execution. In such a case, the embedded system design may
wish to check the data traffic on the busses between the processor cores, which requires
very low-level debugging, at signal/bus level, with a logic analyzer, for instance.
1.2.2 Reliability:
Embedded systems often reside in machines that are expected to run
continuously for years without errors and in some cases recover by themselves if an error
occurs. Therefore the software is usually developed and tested more carefully than that
for personal computers, and unreliable mechanical moving parts such as disk drives,
switches or buttons are avoided.
6
control systems, safety-critical chemical factory controls, train signals, engines on
single-engine aircraft.
• The system will lose large amounts of money when shut down: Telephone switches,
factory controls, bridge and elevator controls, funds transfer and market making,
automated sales and service.
A variety of techniques are used, sometimes in combination, to recover from
errors—both software bugs such as memory leaks, and also soft errors in the hardware:
• Watchdog timer that resets the computer unless the software periodically notifies the
watchdog
• Subsystems with redundant spares that can be switched over to
• software "limp modes" that provide partial function
• Designing with a Trusted Computing Base (TCB) architecture ensures a highly secure
& reliable system environment
• An Embedded Hypervisor is able to provide secure encapsulation for any subsystem
component, so that a compromised software component cannot interfere with other
subsystems, or privileged-level system software. This encapsulation keeps faults from
propagating from one subsystem to another, improving reliability. This may also allow
a subsystem to be automatically shut down and restarted on fault detection.
• Immunity Aware Programming
7
controller receiving a byte. These kinds of systems are used if event handlers need low
latency and the event handlers are short and simple.
Usually these kinds of systems run a simple task in a main loop also, but this task is not
very sensitive to unexpected delays. Sometimes the interrupt handler will add longer
tasks to a queue structure. Later, after the interrupt handler has finished, these tasks are
executed by the main loop. This method brings the system close to a multitasking kernel
with discrete processes.
• Cooperative Multitasking:
A non-pre emptied multitasking system is very similar to the simple control loop
scheme, except that the loop is hidden in an API. The programmer defines a series of
tasks, and each task gets its own environment to ―run‖ in. When a task is idle, it calls
an idle routine, usually called ―pause‖, ―wait‖, ―yield etc. The advantages and
disadvantages are very similar to the control loop, except that adding new software is
easier, by simply writing a new task, or adding to the queue-interpreter.
• Primitive Multitasking:
In this type of system, a low-level piece of code switches between tasks or
threads based on a timer (connected to an interrupt). This is the level at which the system
is generally considered to have an "operating system" kernel. Depending on how much
functionality is required, it introduces more or less of the complexities of managing
multiple tasks running conceptually in parallel.
As any code can potentially damage the data of another task (except in larger
systems using an MMU) programs must be carefully designed and tested, and access to
shared data must be controlled by some synchronization strategy, such as message
queues, semaphores or a non-blocking synchronization scheme.
8
Microkernel is a logical step up from a real-time OS. The usual arrangement is that the
operating system kernel allocates memory and switches the CPU to different threads of
execution. User mode processes implement major functions such as file systems,
network interfaces, etc.
9
Eg: Consider a TV remote control system, if the remote control takes a few milliseconds delay it
will not cause damage either to the TV or to the remote control. These systems which will not
cause damage when they are not operated at considerable time period those systems comes under
soft real- time embedded systems.
10
• Among these Microcontroller is of low cost processor and one of the main advantage of
microcontrollers is, the components such as memory, serial communication interfaces,
analog to digital converters etc.., all these are built on a single chip. The numbers of
external components that are connected to it are very less according to the application.
• Microprocessors are more powerful than microcontrollers. They are used in major
applications with a number of tasking requirements. But the microprocessor requires
many external components like memory, serial communication, hard disk, input output
ports etc.., so the power consumption is also very high when compared to
microcontrollers.
• Digital signal processing is used mainly for the applications that particularly involved
with processing of signals
11
CHAPTER-2
PREVIOUS WORK OF RUSH COLLISION PREVENTION IN
RAILWAYS
Public rail transit is one of the safest forms of transportation, but incidents causing injury and even
death can still occur. The risk is highest at the platform, where passengers are close to the
guideway and have to step from platform to vehicle. These risks are highest with heavy rail
operating on significantly elevated tracks. The Transit Cooperative Research Program has created
a manual identifying risk factors and recommending treatments to increase rail platform safety.
12
13
2.1 Factors Affecting Safety
Platform, Track, and Vehicle Factors
Platform safety starts with good platform design. Large, open platforms with few obstructions are
ideal. Higher platforms typical of heavy rail are the most dangerous, but low light-rail platforms
come with the increased risk of people walking onto the guideway. Platform surface is also
important; cracked, uneven, and slippery surfaces can lead to tripping and slipping. The ADA
mandates that platforms have a 24-inch tactile buffer at their edges.
There are a couple of track characteristics to keep in mind when assessing safety. Commuter rail
often shares a track with freight trains. Because passenger trains are typically narrower than freight
trains, there can be a wide horizontal gap that passengers have to maneuver. Curved tracks also
create a large gap at parts of the platform. Superelevated (or banked) tracks create vertical gaps
that create tripping risks.
The trains themselves also present potential issues. Plug doors and folding doors both require a
sizable gap and prevent level boarding. Newer sliding doors help manage these issues. Because the
ADA mandates level boarding, some systems with older cars with include some newer ADA-
compliant trains in each consist (or group of cars).
The manual identifies several passenger characteristics that seem to put people at a higher risk of
injury. Studies have shown riders younger than 16 and older than 50 to have disproportionately
high incident rates. Women also appear to have more incidents; while no causal link has been
established, some theories center on the fact that women are more likely to be traveling with young
children, who can be distracting. Injuries appear to be highest at rush hour when platforms are
most crowded.
There are also behaviors that put passengers at increased risk. Intoxicated passengers have
significantly higher incident rates, especially in the evenings. Traveling with large luggage can put
passengers at danger - both those with the luggage and others around them. While no data exist on
14
cellphone-related incidents on platforms, general studies on phones and distraction suggest that
they are probably risky.
A rush hour or peak hour is a part of the day during which traffic congestion on roads and
crowding on public transport is at its highest. Normally, this happens twice every weekday: once
in the morning and once in the afternoon or evening, the times during which the most people
commute. The term is often used for a period of peak congestion that may last for more than one
hour.
The term is very broad, but often refers specifically to private automobile transportation traffic,
even when there is a large volume of cars on a road but not many people, or if the volume is
normal but there is some disruption of speed. By analogy to vehicular traffic, the term Internet rush
hour has been used to describe periods of peak data network usage, resulting in delays and slower
delivery of data packets.
15
In a glimpse of pre-lockdown period, 1.9 million travel by CR and 1.5 million by WR during non-
peak hours
Nearly 3.4 million passengers travelled by local trains on the first day after suburban train services
resumed for the general public after 10 months. Nearly 1.9 million passengers had travelled by
Central Railway (CR) and 1.5 million had travelled by Western Railway (WR) by late Monday
night. Before the lockdown, 8 million people travelled by Mumbai’s local train network daily.
Local train services were suspended on March 23, 2020, and had resumed for certain groups, like
essential workers and cancer patients, since July 15, 2020. As of Monday, suburban train services
are open to the public from the first local train of the day till 7am; between 12pm to 4pm; and post
9pm till the last local train of the day. Face masks are mandatory for those travelling by train.
On Monday, there were long queues at booking offices outside Nalasopara, Kurla, Ghatkopar,
Diva, Thane and Dadar railway stations. “At Nallasopara station there was a bit of crowd for
renewal of season passes. On explaining that time slots beyond 7am till 12am are for nominated
categories, they dispersed,” said Sumit Thakur, chief public relations officer (PRO), WR.
Commuters said there wasn’t much overcrowding inside the trains. “There is no queue inside the
local train compartment, but just to reach it took 15 minutes,” said Aditi Thakur, a Dadar resident.
16
CHAPTER-3
PROJECT EXPLANATION
The project implemented to avoid the rush of passengers in the railway station .Many incidents like
stampede occurs in the railway platforms due to overcrowds. The project consists of two kits one
works as transmitter and other as receiver .The Transmitter kit is placed at the entrance of every
platform with IR sensor . The sensor detects the motion of people or passengers on platforms which
provides the information of number of passengers. As cutoff of passengers reaches the limit in RTC(
real time clock) timer. This timer accordingly work and send signals with the help of GSM (global
system mobile communication) to the reciever kit which is placed at controller room of railway in
the form of voice or Messege .We are using GPS (global positioning system) to track the location of
train and LCD ( liquid crystal display) to display the messege text at reciever end.
BLOCK DIAGRAM TX
17
BLOCK DIAGRAM RX
Hardware Requirements:
• Microcontroller
• LCD
• GSM
• GPS
• RTC (TIMER)
• IR SENSORS
Software Requirements:
Keil / Arduino /thonny
proteus
18
CHAPTER-4
SOFTWARE IMPLEMENTATION
• Arduino software
• Proteus software
Proteus is computer code for microchip simulation, schematic capture, and computer
circuit board style. it's developed by Lab center physical science.
The X GameStation small Edition was designed victimisation PCB layout tools and
Proteus
schematic entry.
System Components
ARES PCB Layout – PCB style system with automatic part alluvial sediment, rip-up
and rehear auto-router and interactive style rule checking.
VSM – Virtual System Modelling lets co-simulate embedded computer code for well-
liked
micro-controllers aboard hardware style.
Product Features:
19
• ISIS Schematic Capture a straightforward to use however and intensely
powerful tool for getting into your style
• PROSPICE Mixed mode SPICE Simulation business normal SPICE3F5
machine
• ARES – layout designing in this tool
• All modules are standardised Graphical interface.
• Runs on Windows 98/ME/2000/XP or Later
• Technical Support direct kind the author
• Rated best overall product
ISIS lies right at the guts of the PROTUES system and is way over simply another
schematic package. it's powerful setting to regulate most aspects of the drawing look.
whether or not your demand is that the speedy entry of complicated style for
simulation & PCB layout, Or the creation of engaging Schematic for publication ISIS
is that the right tool for the work Product
Features:
Proteus VSM is associate degree extension of the PROSPICE machine that facilities co-
simulation of microchip primarily based style as well as all the associated physical
science
20
Features:
Keilu Vision.
21
Embedded System Tools:
Speed:
Space:
Processing.
- Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming.
As soon as it reached a wider community, the Arduino board started changing to adapt
to new needs and challenges, differentiating its offer from simple 8-bit boards to
products for IoT applications, wearable, 3D printing, and embedded environments. All
22
Arduino boards are completely open- source, empowering users to build them
independently and eventually adapt them to their particular needs. The software, too, is
open-source, and it is growing through the contributions of users worldwide.
Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-use
for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and
Linux. Teachers and students use it to build low cost scientific instruments, to prove
chemistry and physics principles, or to get started with programming and robotics.
Arduino is a key tool to learn new things and also simplifies the process of working
with microcontrollers, but it offers some advantage for teachers, students, and
interested amateurs over other systems:
• Open source and extensible software - The Arduino software is published as open
source tools, available for extension by experienced programmers. The language
can be expanded through C++ libraries, and people wanting to understand the
technical details can make the leap from Arduino to the AVR C programming
language on which it's based. Similarly, you can add
AVR-C code directly into your Arduino programs if you want to.
23
• Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers c
an make their own
version.
• Of the module, extending it and improving it. Even relatively inexperienced users
can build the breadboard version of the module in order to understand how it works
and save money. • Getting Started with Arduino and Genuino products:-
…This document explains how to install the Arduino Software (IDE) on Windows
machines.
Get the latest version from the download page. You can choose between the Installer
(.exe) and the Zip packages. We suggest you use the first one that installs directly
everything you need to use the Arduino Software (IDE), including the drivers. With
the Zip package you need to install the drivers manually.
When the download finishes, proceed with the installation and please allow the driver
installation process when you get a warning from the operating system
When the Arduino Software (IDE) is properly installed you can go back to the Getting
Started
Home and choose your board from the list on the right of the page.
24
Fig: 4.1: software program selection
The source code for the IDE is released under the GNU General Public License,
version 2.
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 toolchain, 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.
25
The IDE environment is mainly distributed into three sections
• Menu Bar
• Text Editor
• Output Pane
The bar appearing on the top is called Menu Bar that comes with five different options
as follows.
You can open a new window for writing the code or open an existing one. Following
table shows the number of further subdivisions the file option is categorized into.
Creating file
descriptors
26
Fig.4.3: File Description
As you go to the preference section and check the compilation section, the Output Pane
will
show the code compilation as you click the upload button.
27
And at the end of compilation, it will show you the hex file it has generated for the
recent sketch
that will send to the Arduino Board for the specific task you aim to achieve.
Used for copying and pasting the code with further modification for font
Mainly used for testing projects. The Programmer section in this panel is used for
burning a bootloader to the new microcontroller.
In case you are feeling skeptical about software, complete help is available from
getting started to troubleshooting.
28
The Six Buttons appearing under the Menu tab are connected with the running
program as follows
• The check mark appearing in the circular button is used to verify the code. Click
this once you have written your code.
• The arrow key will upload and transfer the required code to the Arduino board.
• The dotted paper is used for creating a new file.
• The upward arrow is reserved for opening an existing Arduino project.
• The downward arrow is used to save the current running code.
29
Fig.4.7: Connecting to Board
The main screen below the Menu board is known as a simple text editor used for
writing the registration code.
The bottom of the main screen is described as an Output Pane that mainly highlights
the compilation status of the running code: the memory used by the code, and errors
30
occurred in the program. You need to fix those errors before you intend to upload the
hex file into your
Arduino Module.
4.3 Libraries:
Libraries are very useful for adding the extra functionality into the Arduino
Module..The Arduino environment can be extended through the use of libraries, just
like most programming
A number of libraries come installed with the IDE, but you can also download or
create your own. See these instructions for details on installing libraries.
31
Fig.4.10: ArduinoIDE Library
As you click the Include Library and Add the respective library it will on the top of the
sketch with a #include sign. Suppose, I Include the EEPROM library, it will appear on
the text editor as #include <EEPROM.h>
The digitalRead and digitalWrite commands are used for addressing and making the
Arduino pins as an input and output respectively.
On the online IDE we are able to automatically detect the kind of board and the port it
is connected to without you having to individually select them.In order to upload
sketch.You'll need to select the entry in the Tools > Board menu that corresponds to
your Arduino board.Select the serial device of the board from the Tools | Serial Port
menu. This is likely to be COM3 or higher
32
Just go to the “Board” section and select the board you aim to work on. Similarly,
COM1, COM2, COM4, COM5, COM7 or higher are reserved for the serial and
USBboard. You can look for the USB serial device in the port section of the Windows
Device Manager.
● After correct selection of both Board and Serial Port, click the verify and then
upload button appearing in the upper left corner of the six button section or you
can go to the Sketch section and press verify/compile and then upload.
● The sketch is written in the text editor and is then saved with the file extension
4.6 Bootloader:
As you go to the Tools section, you will find a bootloader at the end. It is very helpful
to burn the code directly into the controller, setting you free from buying the external
burner to burn the required code
Fig.4.11: Bootloader
33
messages to the display .The new terminal successfully combines great functionalities
that allow effective transferring with many accounts and with exceptional usability
1. Entry Level
Get started with Arduino using Entry Level products: easy to use and ready to power
your first creative projects. These boards and modules are the best to start learning and
tinkering with electronics and coding. The Starter Kit includes a book with 15 tutorials
that will walk you through the basics up to complex projects. .
34
4.9 PROTEUS SOFTWARE:
Proteus is computer code for microchip simulation, schematic capture, and
computer circuit board (PCB) style. it's developed by Lab center physical science.
The XGameStation small Edition was designed victimization PCB layout tools and
Proteus schematic entry.
System Components
ISIS Schematic Capture - a tool for getting into styles.
PROSPICE Mixed Mode SPICE Simulation – business normal SPICE3F5 machine
combined with a digital machine.
ARES PCB Layout – PCB style system with automatic part alluvial sediment, rip-
up and rehear auto-router and interactive style rule checking.
VSM – Virtual System Modelling lets co-simulate embedded computer code for
well-liked micro-controllers aboard hardware style.
System edges integrated package with common interface and absolutely context
sensitive facilitate.
The PROTUES product vary conjointly includes our revolutionary VSM technology to
perform the system desired task.
Product Features:
• ISIS Schematic Capture a straightforward to use however and intensely
powerful tool for getting into your style
• PROSPICE Mixed mode SPICE Simulation business normal SPICE3F5
machine
• ARES – layout designing in this tool
• All modules are standardised Graphical interface.
• Runs on Windows 98/ME/2000/XP or Later
• Rated best overall product
35
Fig.4.12: Proteus
Features:
• Produces publication quality schematic
• Style templates enable customization of equipped library
• Mouse driven context sensitive interface
• Automatic wire routing and junction dot placement
• Full support for buses as well as sub- circuit ports and bus pins • Large and
growing part library of over 8000 elements
36
CHAPTER -5
HARDWARE DESCRIPTION
Fig
5.1.1
The Port B pins are tri-stated when a reset condition becomes active, even if the clock is
running.
37
Depending on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the inverting
Oscillator amplifier.
If the Internal Calibrated RC Oscillator is used as chip clock source, PB7...6 is used as
TOSC2...1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the inverting
Oscillator amplifier.
In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D converter.
These pins are powered from the analog supply and serve as 10-bit ADC channels.
5.2.3 Overview:
/168PA/328/328P achieves through- puts approaching 1 MIPS per MHz allowing the
system designer to optimize power consumption versus processing speed. registers to be
accessed in one single instruction executed in one clock cycle. The resulting architecture
38
is more code efficient while achieving throughputs up to ten times faster than
conventional CISC microcontrollers.
The ATmega48A/48PA/88A/88PA/168A/168PA/328/328P provides the following features:
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-wire
Serial Interface, SPI port, and interrupt system to continue functioning.
The Power-down mode saves the register contents but freezes the Oscillator, disabling all
other chip functions until the next interrupt or hardware reset. In Power-save mode, the
asynchronous timer continues to run, allowing the user to maintain a timer base while the
rest of the device is sleeping.
The ADC Noise Reduction mode stops the CPU and all I/O modules except asynchronous
timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the
crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows
very fast start-up combined with low power consumption.
The device is manufactured using Atmel’s high density non-volatile memory technology. The
On-chip ISP Flash allows the program memory to be reprogrammed In-System through an
SPI serial interface, by a conventional nonvolatile memory programmer, or by an On-chip
Boot pro- gram running on the AVR core. The Boot program can use any interface to
download the application program in the Application Flash memory.
39
Software in the Boot Flash section will continue to run while the Application Flash section is
updated, providing true Read-While-Write operation.
Fig5.1:Arduino Board
An Arduino board is a one type of microcontroller based kit. The first Arduino technology
was developed in the year 2005 by David Cuartielles and Massimo Banzi. The designers
thought to provide easy and low cost board for students, hobbyists and professionals to build
devices. Arduino board can be purchased from the seller or directly we can make at home
using various basic components. The best examples of Arduino for beginners and hobbyists
includes motor detectors and thermostats, and simple robots. In the year 2011, Adafruit
industries expected that over 3lakhs Arduino boards had been produced. But,
7lakhs boards were in user’s hands in the year 2013. Arduino technology is used in many
operating devices like communication or controlling.
40
5.2.5 Arduino Technology:
Arduino is opensource hardware. The hardware reference designs are distributed under a
Creative Commons Attribution Share-Alike 2.5 license and are available on the Arduino
website. Layout and production files for some versions of the hardware are also available.
A typical example of the Arduino board is Arduino Uno.It includes an ATmega328
microcontroller and it has 28-pins
The pin configuration of the Arduino Uno board is shown in the above. It consists of 14-
digital i/o pins. Wherein 6 pins are used as pulse width modulation o/ps and 6 analog i/ps, a
USB connection, a power jack, a 16MHz crystal oscillator, a reset button, and an ICSP
header. Arduino board can be powered either from the personal computer through a USB or
external source like a battery or an adaptor. This board can operate with an external supply of
7-12V by giving voltage reference through the IORef pin or through the pin Vin.
41
5.2.8 Arduino Program:
Programming into the Arduino board is called as sketches. Each sketch contains three parts
such as Variables Declaration, Initialization and Control code. Where, Initialization is written
in the setup function and Control code is written in the loop function.
The sketch is saved with .ino and any operation like opening a sketch, verifying and saving
can be done using the tool menu.
● Select the suitable board from the serial port numbers and tools menu.
● Select the tools menu and click on the upload button, then the boot loader uploads the
code on the
5.2.9 Comparison Between Processors:
The ATmega48A/48PA/88A/88PA/168A/168PA/328/328P differ only in memory sizes, boot
loader support, and interrupts vector sizes. Table 2-1 summarizes the different memory and
inters- rupt vector sizes for the devices.
42
ATmega88PA 8K Bytes 2 Bytes 1K Bytes 1 instruction word/vector
Section. The SPM instruction can execute from the entire Flash.
43
Note:
1. This device can also be supplied in wafer form. Please contact your local
Atmel sales office for detailed ordering information and minimum quantities.
LCD stands for liquid crystal displays. Digital display is finding wide unfold use substitution
LEDs (seven phase LEDs or different multi-phase LEDs) thanks to the subsequent reasons:
2. The power to show numbers, characters and graphics. This is often in distinction to
LEDs, that area unit restricted to numbers and a couple of characters.
3. Incorporation of a refreshing controller into the digital display, thereby relieving the
processor of the task of refreshing the digital display. In distinction, the crystal rectifier
should be reinvigorated by the processor to stay displaying the info.
These parts area unit “specialized” for being employed with the microcontrollers, which
implies that they can't be activated by customary IC circuits. They’re used for writing
completely different messages on a miniature digital display.
44
Figure 5.3.1: Liquid crystal display
45
. It displays all the alphabets, Greek letters, and punctuation marks, mathematical symbols etc.
additionally; it's attainable to show symbols that user makes informed its own. Automatic
shifting message on show (shift left and right), look of the pointer, backlight etc. area unit
thought of as helpful characteristics
Function Number
Ground 1 Vss - 0V
D0 – D7 are interpreted as
0
4 RS commands
1
D0 – D7 are interpreted as data
8 D1 0/1 Bit 1
Data / commands 9 D2 0/1 Bit 2
10 D3 0/1 Bit 3
46
11 D4 0/1 Bit 4
12 D5 0/1 Bit 5
13 D6 0/1 Bit 6
LCD screen:
LCD screen consists of 2 lines with sixteen characters every. Every character consists of 5x7
matrix. Distinction on show depends on the facility provide voltage and whether or not
messages area unit displayed in one or 2 lines. For that reason, variable voltage 0-Vdd is
applied on pin marked as Vee. Trimmer potentiometer is typically used for that purpose. Some
versions of displays have in-built backlight (blue or inexperienced diodes). Once used
throughout operative, a resistance for current limitation ought to be used (like with any
autoimmune disease diode).
47
LCD Basic Commands
All information transferred to LCD through outputs D0-D7 is going to be taken as commands
as information, that depends on logic state on pin RS: RS = one - Bits D0 - D7 area unit
addresses of characters that ought to be displayed. In-built processor addresses in-built “map
of characters” and displays corresponding symbols. Displaying position is set by DDRAM
address. This address is either antecedently outlined or the address of antecedently transferred
character is mechanically incremented.
RS = zero - Bits D0 - D7 area unit commands that confirm show mode. List of commands that
LCD acknowledges area unit given within the table below:
Command RS RW D7 D6 D5 D4 D3 D2 D1 D0 Execution
Time
Connection of LCD:
48
Depending on what percentage lines are used for affiliation/connection to the microcontroller,
there are 8-bit and 4-bit alphanumeric display modes. The suitable mode is decided at the start
of the method in an exceedingly part known as “initialization”. Within the initial case, the info
are transferred through outputs D0-D7 because it has been already explained. just in case of 4-
bit crystal rectifier mode, for the sake of saving valuable I/O pins of the microcontroller, there
are solely four higher bits (D4-D7) used for communication, whereas different could also be
left unconnected.
49
4. Character entry
Automatic reset is especially performed with none issues. Primarily however not always! If
for any reason power offer voltage doesn't reach full price within the course of 10mS, show
can begin perform utterly unpredictably? If voltage offer unit cannot meet this condition or if
it's required to supply utterly safe operative, the method of format by that a brand new reset
sanctionative show to control usually should be applied.
Algorithm in line with the format is being performed depends on whether or not affiliation to
the microcontroller is thru 4- or 8-bit interface. All left over to be done then is to provide basic
commands and of course- to show messages.
50
CONTRAST CONTROL:
To have a transparent read of the characters on the alphanumeric display, distinction ought to
be adjusted. To regulate the distinction, the voltage ought to be varied. For this, a planned is
employed which may behave sort of a variable
voltage device. Because the voltage of this planned is varied, the distinction of the
alphanumeric display will be adjusted.
POTENTIOMETER:
Variable resistors used as potentiometers have all 3 terminals connected.
This arrangement is generally wont to vary voltage, as an example to line the switch purpose of a circuit
with a device, or management the degree (loudness) in Associate in Nursing electronic equipment circuit.
If the terminals at the ends of the track area unit connected across the facility offer, then the wiper
terminal can give a voltage which may be varied from zero up to the most of the provision.
PRESETS
These area unit miniature versions of the quality resistor. They’re designed to be mounted
directly onto the printed circuit and adjusted only the circuit is constructed. {For example |for
instance as Associate in Nursing example} to line the frequency of an alarm tone or the
sensitivity of a sensitive circuit. little screwdriver or similar tool is needed to regulate presets.
51
Presets area unit less expensive than customary electrical device | rheostat |resistor |resistance}
s so that they area unit typically employed in comes wherever a customary variable resistor
would usually be used.
Multiturn presets area unit used wherever terribly precise changes should be created. The screw should
be turned repeatedly (10+) to maneuver the slider from one finish of the track to the opposite, giving
terribly fine management.
GSM (Global System for Mobile communications) is a cellular network, which means that
mobile phones connect to it by searching for cells in the immediate vicinity. GSM networks
operate in four different frequency ranges. Most GSM networks operate in the 900 MHz or 1800
MHz bands. Some countries in the Americas use the 850 MHz and 1900 MHz bands because
the 900 and 1800 MHz frequency bands were already allocated.
The rarer 400 and 450 MHz frequency bands are assigned in some countries, where these
frequencies were previously used for first-generation systems.
GSM-900 uses 890–915 MHz to send information from the mobile station to the base station
(uplink) and 935–960 MHz for the other direction (downlink), providing 124 RF channels
(channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. In some
countries the GSM-900 band has been extended to cover a larger frequency range. This
'extended GSM', E-GSM, uses 880–915 MHz (uplink) and 925–960 MHz (downlink), adding
50 channels (channel numbers 975 to 1023 and 0) to the original GSM-900 band. Time division
multiplexing is used to allow eight full-rate or sixteen half-rate speech channels per radio
frequency channel. There are eight radio timeslots (giving eight burst periods) grouped into
what is called a TDMA frame. Half rate channels use alternate frames in the same timeslot. The
channel data rate is 270.833 kbit/s, and the frame duration is 4.615 ms.
52
5.4.2 GSM Advantages:
GSM also pioneered a low-cost, to the network carrier, alternative to voice calls, the Short t
message service (SMS, also called "text messaging"), which is now supported on other mobile
standards as well. Another advantage is that the standard includes one worldwide Emergency
telephone number, 112. This makes it easier for international travelers to connect to emergency
services without knowing the local emergency number.
GSM provides recommendations, not requirements. The GSM specifications define the functions
and interface requirements in detail but do not address the hardware. The GSM network is
divided into three major systems: the switching system (SS), the base station system (BSS), and
the operation and support system (OSS).
The switching system (SS) is responsible for performing call processing and subscriber-related
functions. The switching system includes the following functional units.
• Home location register (HLR): The HLR is a database used for storage and management
of subscriptions. The HLR is considered the most important database, as it stores
permanent data about subscribers, including a subscriber's service profile, location
information, and activity status. When an individual buys a subscription from one of the
PCS operators, he or she is registered in the HLR of that operator.
• Mobile services switching center (MSC): The MSC performs the telephony switching
functions of the system. It controls calls to and from other telephone and data systems. It
also performs such functions as toll ticketing, network interfacing, common channel
signaling, and others.
• Visitor location register (VLR): The VLR is a database that contains temporary
information about subscribers that is needed by the MSC in order to service visiting
subscribers. The VLR is always integrated with the MSC. When a mobile station roams
53
into a new MSC area, the VLR connected to that MSC will request data about the mobile
station from the HLR. Later, if the mobile station makes a call, the VLR will have the
information needed for call setup without having to interrogate the HLR each time.
• Authentication center (AUC): A unit called the AUC provides authentication and
encryption parameters that verify the user's identity and ensure the confidentiality of each
call. The AUC protects network operators from different types of fraud found in today's
cellular world.
• Equipment identity register (EIR): The EIR is a database that contains information
about the identity of mobile equipment that prevents calls from stolen, unauthorized, or
defective mobile stations. The AUC and EIR are implemented as stand-alone nodes or as
a combined AUC/EIR node.
All radio-related functions are performed in the BSS, which consists of base station controllers
(BSCs) and the base transceiver stations (BTSs).
• BSC: The BSC provides all the control functions and physical links between the MSC
and BTS. It is a high-capacity switch that provides functions such as handover, cell
configuration data, and control of radio frequency (RF) power levels in base transceiver
stations. A number of BSCs are served by an MSC.
• BTS: The BTS handles the radio interface to the mobile station. The BTS is the radio
equipment (transceivers and antennas) needed to service each cell in the network. A group
of BTSs are controlled by a BSC.
The operations and maintenance center (OMC) is connected to all equipment in the switching
system and to the BSC. The implementation of OMC is called the operation and support system
(OSS). The OSS is the functional entity from which the network operator monitors and controls
the system. The purpose of OSS is to offer the customer cost-effective support for centralized,
regional and local operational and maintenance activities that are required for a GSM network.
54
An important function of OSS is to provide a network overview and support the maintenance
activities of different operation and maintenance organizations.
• Message center (MXE): The MXE is a node that provides integrated voice, fax, and
data messaging. Specifically, the MXE handles short message service, cell broadcast,
voice mail, fax mail, e-mail, and notification.
• Mobile service node (MSN): The MSN is the node that handles the mobile intelligent
network (IN) services.
• Gateway mobile services switching center (GMSC): A gateway is a node used to
interconnect two networks. The gateway is often implemented in an MSC. The MSC is
then referred to as the GMSC.
• GSM inter-working unit (GIWU): The GIWU consists of both hardware and software
that provides an interface to various networks for data communications. Through the
GIWU, users can alternate between speech and data during the same call. The GIWU
hardware equipment is physically located at the MSC/VLR.
The GSM network is made up of geographic areas. As shown in bellow figure, these areas
include cells, location areas (LAs), MSC/VLR service areas, and public land mobile network
(PLMN) areas.
55
Location Areas:
The cell is the area given radio coverage by one base transceiver station. The GSM network
identifies each cell via the cell global identity (CGI) number assigned to each cell. The location
area is a group of cells. It is the area in which the subscriber is paged. Each LA is served by one
or more base station controllers, yet only by a single MSC Each LA is assigned a location area
identity (LAI) number.
An MSC/VLR service area represents the part of the GSM network that is covered by one MSC
and which is reachable, as it is registered in the VLR of the MSC.
56
PLMN service areas:
GSM Specifications:
Specifications for different personal communication services (PCS) systems vary among the
different PCS networks.Listed below is a description of the specifications and characteristics
for GSM.
• Frequency band: The frequency range specified for GSM is 1,850 to 1,990 MHz
(mobile station to base station).
• Duplex distance: The duplex distance is 80 MHz. Duplex distance is the distance
between the uplink and downlink frequencies. A channel has two frequencies, 80 MHz
apart.
• Channel separation: The separation between adjacent carrier frequencies. In GSM, this
is 200 kHz.
• Transmission rate: GSM is a digital system with an over-the-air bit rate of 270 kbps.
• Access method: GSM utilizes the time division multiple access (TDMA) concept.
TDMA is a technique in which several different calls may share the same carrier. Each
call is assigned a particular time slot.
• Speech coder: GSM uses linear predictive coding (LPC). The purpose of LPC is to
reduce the bit rate. The LPC provides parameters for a filter that mimics the vocal tract.
The signal passes through this filter, leaving behind a residual signal. Speech is encoded
at 13 kbps.
57
GSM Subscriber Services:
Dual-tone multifrequency (DTMF): DTMF is a tone signaling scheme often used for various
control purposes via the telephone network, such as remote control of an answering machine.
Facsimile group III—GSM supports CCITT Group 3 facsimile. As standard fax machines are
designed to be connected to a telephone using analog signals, a special fax converter connected
to the exchange is used in the GSM system. This enables a GSM–connected fax to communicate
with any analog fax in the network.
Short message services: A convenient facility of the GSM network is the short message
service. A message consisting of a maximum of 160 alphanumeric characters can be sent to or
from a mobile station. This service can be viewed as an advanced form of alphanumeric paging
with a number of advantages. If the subscriber's mobile unit is powered off or has left the
coverage area, the message is stored and offered back to the subscriber when the mobile is
powered on or has reentered the coverage area of the network. This function ensures that the
message will be received.
Cell broadcast: A variation of the short message service is the cell broadcast facility. A
message of a maximum of 93 characters can be broadcast to all mobile subscribers in a certain
geographic area. Typical applications include traffic congestion warnings and reports on
accidents.
Voice mail: This service is actually an answering machine within the network, which is
controlled by the subscriber. Calls can be forwarded to the subscriber's voice-mail box and the
subscriber checks for messages via a personal security code.
Fax mail: With this service, the subscriber can receive fax messages at any fax machine. The
messages are stored in a service center from which they can be retrieved by the subscriber via a
personal security code to the desired fax number
58
Supplementary Services: GSM supports a comprehensive set of supplementary services that
can complement and support both telephony and data services.
Call forwarding: This service gives the subscriber the ability to forward incoming calls to
another number if the called mobile unit is not reachable, if it is busy, if there is no reply, or if
call forwarding is allowed unconditionally.
Barring of outgoing calls: This service makes it possible for a mobile subscriber to prevent all
outgoing calls.
Barring of incoming calls: This function allows the subscriber to prevent incoming calls. The
following two conditions for incoming call barring exist: baring of all incoming calls and barring
of incoming calls when roaming outside the home PLMN.
Advice of charge (AoC): The AoC service provides the mobile subscriber with an estimate of
the call charges. There are two types of AoC information: one that provides the subscriber with
an estimate of the bill and one that can be used for immediate charging purposes. AoC for data
calls is provided on the basis of time measurements.
Call hold: This service enables the subscriber to interrupt an ongoing call and then subsequently
reestablish the call. The call hold service is only applicable to normal telephony.
Call waiting: This service enables the mobile subscriber to be notified of an incoming call
during a conversation. The subscriber can answer, reject, or ignore the incoming call. Call
waiting is applicable to all GSM telecommunications services using a circuit-switched
connection.
59
Calling line identification presentation/restriction: These services supply the called party
with the integrated services digital network (ISDN) number of the calling party. The restriction
service enables the calling party to restrict the presentation. The restriction overrides the
presentation.
Closed user groups (CUGs): CUGs are generally comparable to a PBX. They are a group
of subscribers who are capable of only calling themselves and certain numbers Main AT
commands:
"AT command set for GSM Mobile Equipment” describes the Main AT commands to
communicate via a serial interface with the GSM subsystem of the phone.
(Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List S AT
commands are instructions used to control a modem. AT is the abbreviation of Attention. Every
command line starts with "AT" or "at". That's why modem commands are called AT commands.
Many of the commands that are used to control wired dial-up modems, such as ATD (Dial),
ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported
by GSM/GPRS modems and mobile phones. Besides this common AT command set,
GSM/GPRS modems and mobile phones support an AT command set that is specific to the
GSM technology, which includes SMS-related commands like AT+CMGS MS messages) and
AT+CMGR (Read SMS messages).
Note that the starting "AT" is the prefix that informs the modem about the start of a command
line. It is not part of the AT command name. For example, D is the actual AT command name
in ATD and +CMGS is the actual AT command name in AT+CMGS. However, some books
and web sites use them interchangeably as the name of an AT command.
Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or
mobile phone:
• Get basic information about the mobile phone or GSM/GPRS modem. For example,
name of manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number
60
(International Mobile Equipment Identity) (AT+CGSN) and software version
(AT+CGMR).
• Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and
IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
• Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile
phone activity status (AT+CPAS), mobile network registration status (AT+CREG),
radio signal strength (AT+CSQ), battery charge level and battery charging status
(AT+CBC).
• Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
• Control the presentation of result codes / error messages of AT commands. For example,
you can control whether to enable certain error messages (AT+CMEE) and whether error
messages should be displayed in numeric format or verbose format (AT+CMEE=1 or
AT+CMEE=2).
• Get or change the configurations of the mobile phone or GSM/GPRS modem. For
example, change the GSM network (AT+COPS), bearer service type (AT+CBST), radio
link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and storage of
SMS messages (AT+CPMS).
61
• Save and restore configurations of the mobile phone or GSM/GPRS modem. For
example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging
such as the SMS center address.
5.5 GPS
The Global Positioning System (GPS) is a Global Navigation Satellite System (GNSS) developed
by the United States Department of Defense. It is the only fully functional GNSS in the world. It
uses a constellation of between 24 and 32 Medium Earth Orbit satellites that transmit precise
microwave signals, which enable GPS receivers to determine their current location, the time, and
their velocity. Its official name is NAVSTAR GPS . GPS is often used by civilians as a navigation
system.
A GPS receiver calculates its position by precisely timing the signals sent by the GPS satellites high
above the Earth. Each satellite continually transmits messages containing the time the message was
sent, precise orbital information, and the general system health and rough orbits of all GPS satellites.
The receiver measures the transit time of each message and computes the distance to each satellite.
Geometric trilateration is used to combine these distances with the location of the satellites to
determine the receiver's location. The position is displayed, perhaps with a moving map display or
latitude and longitude; elevation information may be included. Many GPS units also show derived
information such as direction and speed, calculated from position changes.
PS consists of three segments - the satellite constellation, ground control network, and user
equipment.
Space segment:
- The satellite constellations that provide the ranging signals and navigation data messages to the
user equipment.
Control segment:
62
- ground control network which tracks and maintains the satellite constellation by monitoring
satellite health and signal integrity and maintaining satellite orbital configuration.
User segment:
- user equipment. A visual example of the GPS constellation in motion with the Earth rotating.
Notice how the number of
satellites in view from a given point on the Earth's surface, in this example at 45°N, changes with
time.
A GPS tracking unit is a device that uses the Global Positioning System to determine the precise
location of a power lines , person, or other asset to which it is attached and to record the position of
the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it
may be transmitted to a central location data base, or internet-connected computer, using a cellular
(GPRS), radio, or satellite modem embedded in the unit. This allows the asset's location to be
displayed against a map backdrop either in real-time or when analysing the track later, using
customized software.Usually, a GPS tracker will fall into one of these three categories:
Data Loggers:-
A GPS logger simply logs the position of the device at regular intervals in its internal
memory. Modern GPS loggers have either a memory card slot, or internal flash memory and a USB
port. Some act as a USB flash drive. This allows downloading of the data for further analysis in a
computer. i.e. Sports persons, gliding etc…
Data pushers:-
This is the kind of devices used by the security industry, which pushes (i.e. "sends") the position of
the device, at regular intervals, to a determined server, that can instantly analyze the data. i.e. Fleet
control, Stolen Power lines control, Race control etc.
Data pullers:-
Contrary to a data pusher, that sends the position of the device at regular intervals (push technology),
these devices are always-on and can be queried as often as required (pull technology). This
63
technology is not in widespread use, but an example of this kind of device is a computer connected
to the Internet and running gpsd. Data Pullers are coming into more common usage in the form of
devices containing a GPS receiver and a cell phone which, when sent a special SMS message reply
to the message with their location.
A power lines tracking system is an electronic device installed in a power lines to enable the owner
or a third party to track the power line location. Most modern power lines tracking systems use
Global Positioning System (GPS) modules for accurate location of the power lines. Many systems
also combine a communications component such as cellular or satellite transmitters to communicate
the power lines’s location to a remote user. Power lines information can be viewed on electronic
maps via the Internet or specialized software.It is commercially very useful and broadly use. The
GPS satellite system was built and is maintained by government and is available at no cost to
64
civilians. This makes this technology very inexpensive.Several types of Power lines Tracking
devices exist. Typically they are classified as "Passive" and "Active"
Passive devices:
store GPS location, speed, heading and sometimes a trigger event such as key on/off, door
open/closed. Once the power lines returns to a predetermined point, the device is removed and the
data downloaded to a computer for evaluation. Passive systems include auto download type that
transfer data via wireless download.
Active devices:
Active devices also collect the same information but usually transmit the data in real-time via cellular
or satellite networks to a computer or data center for evaluation. Basically the major market for the
power lines tracking system are Stolen Power lines Recovery, Fleet management, Asset Tracking,
Field Service Management etc.
NAVIGATION SYSTEM:
An automotive navigation system is a satellite navigation system designed for use in automobiles. It
typically uses a GPS navigation device to acquire position data to locate the user on a road in the
unit's map database. Using the road database, the unit can give directions to other locations along
roads also in its database. Dead reckoning using distance data from sensors attached to the drive
train, a gyroscope and an accelerometer can be used for greater reliability, as GPS signal loss and/or
multipath can occur due to urban canyons or tunnels.
Whenever we are visiting a new place or seem lost at a particular place this
system comes to our help. We just need to connect via the device and just specify our destination.
The device works according to the GPS and finds our location and then it matches our location with
the road map database or the relevant database. Once done and its comes to a solution for the path
the user must follow it sends the signal back to the user, specifying the directions the user must
65
follow to get to its destination. While doing this it also continuously keeps track of the position of
the user to check whether he/she is moving towards the target or away from it. Commercial
navigation software is widely available for most current smart phones as well as some Java-enabled
phones that allows them to use an internal or external GPS receiver (in the latter case, connecting
via serial or Bluetooth). Phones with this capability function no differently to a dedicated portable
GPS receiver and may even use the same software
• Targeted Event Generation: Many devices on the market are designed simply to transmit copious
amount of GPS data to a back-end server hoping that the server can make sense of the data that it is
receiving. The problem with this approach is that it tends to result in higher data transmission costs
for information which will never be used. A protocol used for mobile applications need to be able
to provide the flexibility to generate only the events that are pertinent to the specific application.
• Network Efficient : Mobile devices typically have limited network connectivity, and in some cases
data communication can be quite expensive (e.g. satellite). Because of this the protocol needs to be
66
efficient in it's dialog between the client and server. The communication needs to be optimized such
that the necessary information can be conveyed with a minimum number of bytes in the least amount
of time.
• Transport Media : Different mobile applications will have their own unique way of
communicating data back to the server. Some may use GPRS, or socket based communication,
others may use satellite communication, while still others may use other forms of wireless
communication, such as BlueTooth. The design of the protocol should be able to encompass all such
transport media types, regardless of the type of transport in use.
• Bi-directional : Some devices can support two-way communication (I.e. GPRS, or other socket
based connections), while others may only support one-way communication (i.e. some satellite
communication systems). With this in mind, a protocol should be designed to support both duplex
(two-way) and simplex (one-way) communication.
: Most types of transport media allow for the transmission of binary encoded data. However, there
may be some forms of media for which an ASCII encoded data packet is much better suited. A
protocol designed with this in mind should be able to support both types of data encoding.
• Configurable Messages: Due to the broad range of data types used in mobile applications, the
protocol should be flexible enough to define standard messages, yet still allow custom messages
within the framework.
• Extensible : Not every mobile application is the same. Some require special handling and may
have various types of inputs and outputs. A protocol designed for mobile applications should insure
that the framework can be easily extended to encapsulate the specific needs of the device.
• Small Footprint : Mobile devices typically have limited resources on which to run client code (ie.
memory, processor speed). An open protocol designed with this in mind should be optimized to
allow efficient implementation and should easily support devices such as PDA's, mobile phones,
GPS monitoring devices, and other OEM micro-devices.
67
• Industry Compatibility : Having an open protocol insures better compatibility between different
client devices and service providers.
• Reference Implementation: Having a reference implementation that showcases the major features
of the protocol provides an easy starting point on which developers can add their own features and
platform specific implementation without having to worry about how data gets from the client to the
server. The supported reference implementation platforms include Embedded Linux, Windows
CE/Mobile, and Java.
• Web-based authentication : Each account can support multiple users, and each user has its own
login password and controlled access to sections within the account.
• Customizable web-page decorations : The look and feel of the tracking web site can easily be
customized to fit the motif of the specific company.
Fleet Control :
For example, a delivery or taxi company may put such a tracker in every of its power lines s, thus
allowing the staff to know if a power lines is on time or late, or is doing its assigned route. The same
applies for armored trucks transporting valuable goods, as it allows to pinpoint the exact site of a
possible robbery.
Owners of expensive cars can put a tracker in it, and "activate" them in case of theft. "Activate"
means that a command is issued to the tracker, via SMS or otherwise, and it will start acting as a
fleet control device, allowing the user to know where the thieves are.
Animal Control:
When put on a wildlife animal (e.g. in a collar), it allows scientists to study its activities and
migration patterns. Vaginal implant transmitters are used to mark the location where pregnant
females give birth.[1] Animal tracking collars may also be put on domestic animals, to locate them
in case they get lost.
68
Race Control:
In some sports, such as gliding, participants are required to have a tracker with them. This allows,
among other applications, for race officials to know if the participants are cheating, taking
unexpected shortcuts or how far apart they are. This use has been featured in the movie "Rat Race",
where some millionaires see the position of the racers in a wall map.
5.6 IR SENSORS
5.6.1 Introduction
In the spectrum, infrared is that the region having wavelengths longer than visible radiation
wavelengths, however shorter than microwaves. The infrared region is or so demarcated from
zero.75 to 1000µm. The wavelength region from zero.75 to 3µm is termed as close to infrared, the
region from three to 6µm is termed mid-infrared, and therefore the region beyond 6µm is termed as
so much infrared.
69
Types of Infra-Red Sensors
• Thermal infrared sensors – These use infrared energy as heat. Their having some photo
(light) sensitivity is freelance of wavelength. Thermal detectors don't need cooling; but, they
need slow response times and low detection capability.
• Quantum infrared sensors – These offer higher detection performance and quicker response
speed. Their image sensitivity relies on wavelength. Quantum detectors need to be cooled thus
on acquire correct measurements. The sole exception is for detectors that square measure
employed in the close to infrared region.
A typical system for detection infrared emission using infrared sensors includes the infrared supply
like black body radiators, W lamps, and carbide. Just in case of active IR sensors, the sources are
infrared lasers and LEDs of specific IR wavelengths. Next is that the transmission medium used for
infrared transmission, which has vacuum, the atmosphere, and optical fibers.
70
Thirdly, optical parts like optical lenses made up of quartz, CaF2, Ge and Si, polythene physicist
lenses, and Al or Au mirrors, ar accustomed converge or focus infrared emission. Likewise, to limit
spectral response, band-pass filters ar ideal.
Finally, the infrared detector completes the system for sleuthing infrared emission. The output from
the detector is sometimes terribly tiny, and thus pre-amplifiers not to mention electronic equipment
are supplementary to additional method the received signals.
5.6.3 Applications
71
A real-time clock (RTC) is an electronic device (most often in the form of an integrated circuit)
that measures the passage of time.
Although keeping time can be done without an RTC,[1] using one has benefits:
• Low power consumption[2] (important when running from alternate power)
• Frees the main system for time-critical tasks
A GPS receiver can shorten its startup time by comparing the current time, according to its RTC,
with the time at which it last had a valid signal.[3] If it has been less than a few hours, then the
previous ephemeris is still usable.
Some motherboards are made without real time clocks. The real time clock is omitted either out of
the desire to save money (as in the Raspberry Pi system architecture) or because real time clocks
may not be needed at all (as in the Arduino system architecture.
72
Power source
RTCs often have an alternate source of power, so they can continue to keep time while the primary
source of power is off or unavailable. This alternate source of power is normally a lithium battery in
older systems, but some newer systems use a supercapacitor,[5][6] because they are rechargeable
and can be soldered. The alternate power source can also supply power to battery backed RAM.
TIMING
Most RTCs use a crystal oscillator,[8][9] but some have the option of using the power line
frequency.[10] The crystal frequency is usually 32.768 kHz,[8] the same frequency used in quartz
clocks and watches. Being exactly 215 cycles per second, it is a convenient rate to use with simple
binary counter circuits. The low frequency saves power, while remaining above human hearing
range. The quartz tuning fork of these crystals does not change size much from temperature, so
temperature does not change its frequency much.
Some RTCs use a micromechanical resonator on the silicon chip of the RTC. This reduces the size
and cost of an RTC by reducing its parts count. Micromechanical resonators are much more sensitive
to temperature than quartz resonators. So, these compensate for temperature changes using an
electronic thermometer and electronic logic.[11]
Typical crystal RTC accuracy specifications are from ±100 to ±20 parts per million (8.6 to 1.7
seconds per day), but temperature-compensated RTC ICs are available accurate to less than 5 parts
per million.[12][13] In practical terms, this is good enough to perform celestial navigation, the
73
classic task of a chronometer. In 2011, chip-scale atomic clocks became available. Although vastly
74
more expensive and power-hungry (120 mW vs. <1 μW), they keep time within 50 parts per trillion
(5×10−11).
EXAMPLES
Dallas Semiconductor (DS1387) real-time clock from an older PC. This version also contains a
battery-backed SRAM.
Many integrated circuit manufacturers make RTCs, including Epson, Intersil, IDT, Maxim, NXP
Semiconductors, Texas Instruments, STMicroelectronics and Ricoh. A common RTC used
in single-board computers is the Maxim Integrated DS1307.
The RTC was introduced to PC compatibles by the IBM PC/AT in 1984, which used
a Motorola MC146818 RTC.[15][16] Later, Dallas Semiconductor made compatible RTCs, which
were often used in older personal computers, and are easily found on motherboards because of their
distinctive black battery cap and silkscreened logo.
In newer computer systems, the RTC is integrated into the southbridge chip.[17][18]
75
Some microcontrollers have a real-time clock built in, generally only the ones with many other
features and peripherals.
Radio-based RTCs
Some modern computers receive clock information by digital radio and use it to promote time-
standards. There are two common methods: Most cell phone protocols (e.g. LTE) directly provide
the current local time. If an internet radio is available, a computer may use the network time protocol.
Computers used as local time servers occasionally use GPS[19] or ultra-low frequency radio
transmissions broadcast by a national standards organization (i.e. a radio clock[20]).
Software-based RTCs
The following system is well-known to embedded systems programmers, who sometimes must
construct RTCs in systems that lack them. Most computers have one or more hardware timers that
use timing signals from quartz crystals or ceramic resonators. These have inaccurate absolute timing
(more than 100 parts per million) that is yet very repeatable (often less than 1 ppm). Software can
do the math to make these into accurate RTCs. The hardware timer can produce a periodic interrupt,
e.g. 50 Hz, to mimic a historic RTC (see below). However, it uses math to adjust the timing chain
for accuracy:
When the "time" variable exceeds a constant, usually a power of two, the nominal, calculated clock
time (say, for 1/50 of a second) is subtracted from "time", and the clock's timing-chain software is
invoked to count fractions of seconds, seconds, etc. With 32-bit variables for time and rate, the
mathematical resolution of "rate" can exceed one part per billion. The clock remains accurate
because it will occasionally skip a fraction of a second, or increment by two fractions. The tiny skip
("jitter") is imperceptible for almost all real uses of an RTC.
The complexity with this system is determining the instantaneous corrected value for the variable
"rate". The simplest system tracks RTC time and reference time between two settings of the clock,
and divides reference time by RTC time to find "rate". Internet time is often accurate to less than 20
milliseconds, so 8000 or more seconds (2.2 or more hours) of separation between settings can usually
divide the forty milliseconds (or less) of error to less than 5 parts per million to get chronometer-
like accuracy. The main complexity with this system is converting dates and times to counts of
seconds, but methods are well known.[21]
76
If the RTC runs when a unit is off, usually the RTC will run at two rates, one when the unit is on
and another when off. This is because the temperature and power-supply voltage in each state is
consistent. To adjust for these states, the software calculates two rates. First, software records the
RTC time, reference time, on seconds and off seconds for the two intervals between the last three
times that the clock is set. Using this, it can measure the accuracy of the two intervals, with each
interval having a different distribution of on and off seconds. The rate math solves two linear
equations to calculate two rates, one for on and the other for off.
Another approach measures the temperature of the oscillator with an electronic thermometer, (e.g.
a thermistor and analog-to-digital converter) and uses a polynomial to calculate "rate" about once
per minute. These require a calibration that measures the frequency at several temperatures, and then
a linear regression to find the equation of temperature. The most common quartz crystals in a system
are SC-cut crystals, and their rates over temperature can be characterized with a 3rd-degree
polynomial. So, to calibrate these, the frequency is measured at four temperatures. The common
tuning-fork-style crystals used in watches and many RTC components have parabolic (2nd-degree)
equations of temperature, and can be calibrated with only 3 measurements. MEMS oscillators vary,
from 3rd degree to fifth degree polynomials, depending on their mechanical design, and so need
from four to six calibration measurements. Something like this approach might be used in
commercial RTC ICs, but the actual methods of efficient high-speed manufacturing are proprietary.
77