0% found this document useful (0 votes)
126 views77 pages

Rush Collision Prevention in Railways Major Document

This document discusses an embedded system project that aims to reduce crowding and the risk of stampedes at train stations. It does this by using an evolutionary algorithm to process passenger numbers at stations and adjust train arrival times and locations to maintain safe crowd levels. The project was proposed in response to a deadly stampede at a station in Mumbai. It uses GPS signals from transmitters on trains to track train positions and timing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views77 pages

Rush Collision Prevention in Railways Major Document

This document discusses an embedded system project that aims to reduce crowding and the risk of stampedes at train stations. It does this by using an evolutionary algorithm to process passenger numbers at stations and adjust train arrival times and locations to maintain safe crowd levels. The project was proposed in response to a deadly stampede at a station in Mumbai. It uses GPS signals from transmitters on trains to track train positions and timing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

RUSH COLLISION PREVENTION IN RAILWAYS

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

Introduction Of Embedded Systems

1.1 Embedded Systems:


An embedded system is a computer system designed to perform one or a few dedicated functions
often with real-time computing constraints. It is embedded as part of a complete device often
including hardware and mechanical parts. By contrast, a general-purpose computer, such as a
personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs.
Embedded systems control many devices in common use today. Embedded systems are
controlled Embedded systems are controlled by one or more main processing cores that are
typically either microcontrollers or digital signal processors (DSP). The key characteristic,
however, is being dedicated to handle a particular task, which may require very powerful
processors. For example, air traffic control systems may usefully be viewed as embedded, even
though they involve mainframe computers and dedicated regional and national networks
between airports and radar sites. (Each radar probably includes one or more embedded systems
of its own.) Since the embedded system is dedicated to specific tasks, design engineers can
optimize it to reduce the size and cost of the product and increase the reliability and performance.
Some embedded systems are mass-produced, benefiting from economies of scale. Physically
embedded systems range from portable devices such as digital watches and MP3 players, to
large stationary installations like traffic lights, factory controllers, or the systems controlling
nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very
high with multiple units, peripherals and networks mounted inside a large chassis or enclosure.
In general, "embedded system" is not a strictly definable term, as most systems have some
element of extensibility or programmability. For example, handheld computers share some
elements with embedded systems such as the operating systems and microprocessors which
power them, but they allow different applications to be loaded and peripherals to be connected.
Moreover, even systems which don't expose programmability as a primary feature generally
need to support software updates. On a continuum from "general purpose" to "embedded", large
application systems will have subcomponents at most points even if the 2 system as a whole is

2
"designed to perform one or a few dedicated functions", and is thus appropriate to call
"embedded".

Fig 1.1: A modern example of embedded system

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.1.4 Real Time Issues:


Embedded systems frequently control hardware, and must be able to respond to them in
real time. Failure to do so could cause inaccuracy in measurements, or even damage hardware
such as motors. This is made even more difficult by the lack of resources available. Almost all
embedded systems need to be able to prioritize some tasks over others, and to be able to put
off/skip low priority tasks such as UI in favor of high priority tasks like hardware control.

1.2 Need For Embedded Systems:


The uses of embedded systems are virtually limitless, because every day new products
are introduced to the market that utilizes embedded computers in novel ways. In recent years,
hardware such as microprocessors, microcontrollers, and FPGA chips have become much
cheaper. So when implementing a new form of control, it's wiser to just buy the generic chip and
write your own custom software for it. Producing a custom-made chip to handle a particular task
or set of tasks costs far more time and money. Many embedded computers even come with
extensive libraries, so that "writing your own software" becomes a very trivial task indeed. From
an implementation viewpoint, there is a major difference between a computer and an embedded
system. Embedded systems are often required to provide Real-Time response. The main elements
that make embedded systems unique are its reliability and ease in debugging.

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.

Specific reliability issues may include:


• The system cannot safely be shut down for repair, or it is too inaccessible to repair.
Examples include space systems, undersea cables, navigational beacons, bore-hole
systems, and automobiles.
• The system must be kept running for safety reasons. "Limp modes" are less tolerable.
Often backups are selected by an operator. Examples include aircraft navigation, reactor

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

1.3 Explanation of Embedded Systems:

1.3.1 Software Architecture:


There are several different types of software architecture in common use.
• Simple Control Loop:
In this design, the software simply has a loop. The loop calls subroutines, each
of which manages a part of the hardware or software.

• Interrupt Controlled System:


Some embedded systems are predominantly interrupt controlled. This means that tasks
performed by the system are triggered by different kinds of events. An interrupt could
be generated for example by a timer in a predefined frequency, or by a serial port

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.

Because of these complexities, it is common for organizations to buy a real-time


operating system, allowing the application programmers to concentrate on device
functionality rather than operating system services, at least for large systems; smaller
systems often cannot afford the overhead associated with a generic real time system, due
to limitations regarding memory size, performance, and/or battery life.

• Microkernels And Exokernels:

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.

In general, microkernels succeed when the task switching and interfast


communication is fast, and fail when they are slow. Exokernels communicate efficiently
by normal subroutine calls. The hardware and all the software in the system are available
to, and extensible by application programmers. Based on performance, functionality,
requirement the embedded systems are divided into three categories.
Stand Alone Embedded System:
These systems takes the input in the form of electrical signals from transducers
or commands from human beings such as pressing of a button etc.., process them and
produces desired output. This entire process of taking input, processing it and giving
output is done in standalone mode. Such embedded systems comes under stand alone
embedded systems

Eg: microwave oven, air conditioner etc..

1.3.2 Real-time embedded systems:


Embedded systems which are used to perform a specific task or operation in a specific time
period those systems are called as real-time embedded systems. There are two types of real-time
embedded systems.

• Hard Real-time embedded systems:


These embedded systems follow an absolute dead line time period i.e.., if the tasking is not
done in a particular time

period then there is a cause of damage to the entire equipment.

Eg: consider a system in which we have to open a valve within 30 milliseconds.


If this valve is not opened in 30 ms this may cause damage to the entire equipment. So in such
cases we use embedded systems for doing automatic operations.

• Soft Real Time embedded systems:

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.

1.3.4 Network communication embedded systems:


A wide range network interfacing communication is provided by using embedded
systems.
Eg:
• Consider a web camera that is connected to the computer with internet can be used to
spread communication like sending pictures, images, videos etc.., to another computer
with internet connection throughout anywhere in the world.
• Consider a web camera that is connected at the door lock.
Whenever a person comes near the door, it captures the image of a person and sends to the
desktop of your computer which is connected to internet. This gives an alerting message with
image on to the desktop of your computer, and then you can open the door lock just by clicking
the mouse. Fig: 1.2 show the network communications in embedded systems.

Fig 1.2: Network communication embedded systems

1.3.5 Different types of processing units:


The central processing unit (C.P.U) can be any one of the following microprocessor,
microcontroller, digital signal processing.

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

1.4 Applications of Embedded systems


• Manufacturing and process control
• Construction industry
• Transport
• Buildings and premises
• Domestic service
• Communications
• Office systems and mobile equipment
• Banking, finance and commercial
• Medical diagnostics, monitoring and life support
• Testing, monitoring and diagnostic systems

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.

Fig 2.1: Rush in railway platform

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).

2.2 Passenger and Human Behavior Factors

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.

2.3 Rush Hour In Mumbai

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.

Fig 2.2: Rush prevention

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

Fig 2.3 : Rush in exiting on platform

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

4.1 Software Requirements

• Arduino software
• Proteus software

4.1.1 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

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.

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

Intelligent Schematic Input System (ISIS):

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:

• 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

VSM (Virtual System Modeling):

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:

• CPU models offered for several well-liked microcontrollers as well as PIC,


AVR, HC11 and arduino
• Interactive device models embody semiconductor diode and alphanumeric
display displays, RS232 terminal, universal input device and a spread of
switches, buttons, pots,
• Extensive debugging facilities as well as register and memory contents,
breakpoints and single step modes.
• Source level debugging for elect development tools as well as IAR C-
SPY and

Keilu Vision.

• Embedded “C” Compiler.


• ANSI C - full featured and moveable
• Reliable - mature, field-proven technology
• Multiple C optimisation levels
• An optimizing computer programme
• Full linker, with overlaying of native variables to attenuate RAM usage
• Comprehensive C library with all ASCII text file provided
• Includes support for 24-bit and 32-bit IEEE floating purpose and 32-bit long
information sorts
• Mixed C and computer programme programming
• Unlimited range of supply files
• Listings showing generated computer programme
• Compatible - integrates into the MPLAB IDE, MPLAB ICD and most 3rd-
party development tools
• Runs on multiple platforms: Windows, Linux, UNIX, Mac OS X, Solaris

21
Embedded System Tools:

An computer program is a translating programing language basically, illustration of


machine language into computer code. A cross computer program produces code for
one variety of processor, however runs on another. The process step wherever an
computer program is run is thought as assembly time. Translating assembly instruction
method into opcodes , assemblers give the flexibility to use symbolic names for
memory locations and macro facilities for performing.

Speed:

Assembly language programs are usually the quickest programs around.

Space:

Assembly language programs are typically the littlest.

4.1.2 “Arduino” what does it mean?

Arduino is an open-source prototyping platform based on easy-to-use hardware and


software. Arduino boards are able to read inputs - light on a sensor, a finger on a
button and turn it into an output - activating a motor, turning on an LED, publishing
something online. You can tell your board what to do by sending a set of instructions
to the microcontroller on the board. To do so you use the Arduino programming
language, and the Arduino Software (IDE), based on

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.

4.1.2.1 Why Arduino?

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:

• Inexpensive - Arduino boards are relatively inexpensive compared to other


microcontroller platforms.

• Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX,


and
Linux operating systems. Most microcontroller systems are limited to Windows.

• Simple, clear programming environment - The Arduino Software (IDE) is easy-


to-use for beginners, yet flexible enough for advanced users to take advantage of
as well. For teachers, it's conveniently based on the Processing programming
environment.

• 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:-

Install the Arduino Software (IDE) on Windows PCs-

…This document explains how to install the Arduino Software (IDE) on Windows
machines.

Download the Arduino Software(IDE)


Proceed with board specific instructions.

How to Download the Arduino Software (IDE):

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

Proceed with board specific instructions:

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 Arduino Integrated Development Environment (IDE) is a cross-platform


application (for Windows, macOS, Linux) that is written in the programming language
Java. It is used to write and upload programs to Arduino compatible boards, but also,
with the help of 3rd party cores, other vendor development boards.

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

4.2 Arduino IDE Introduction:

The bar appearing on the top is called Menu Bar that comes with five different options
as follows.

Fig.4.2: Menu Bar of Arduino IDE


4.2.1 File Description :

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.

Fig.4.4: Compilation Screen

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.

Fig.4.5: Hex File Generation

4.2.2 Edit Description :

Used for copying and pasting the code with further modification for font

4.2.3 Sketch Description:

For compiling and programming

4.2.4 Tools Description:

Mainly used for testing projects. The Programmer section in this panel is used for
burning a bootloader to the new microcontroller.

4.2.5 Help Description:

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

Fig.4.6: Menu Tab

• 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.

Fig.4.8: Text Editor

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.

Fig.4.9: Output Window

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

. To use a library in a sketch, select it from Sketch > Import Library.

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>

4.4 Making Pins Input or Output:

The digitalRead and digitalWrite commands are used for addressing and making the
Arduino pins as an input and output respectively.

These commands are text sensitive

4.5 How to Select the Board:

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

4.7 Android Application:

Android application: The multi terminal is intended for simultaneous management of


multiple accounts ,such as WIFI and Bluetooth for which is mostly helpful transmitting

33
messages to the display .The new terminal successfully combines great functionalities
that allow effective transferring with many accounts and with exceptional usability

4.8 Arduino History:

Colombian student Hernando Barraging created the development platform wiring as


his
Master's thesis project in 2004 at the Interaction Design Institute Ivrea (IDII) in Ivrea,
Italy. Massimo Banzi and Casey Reas (known for his work on Processing) were
supervisors for his thesis. The goal was to create low cost, simple tools for non-
engineers to create digital projects. The Wiring platform consisted of a hardware PCB
with an ATmega128 microcontroller, an IDE based on Processing and library
functions to easily program the microcontroller. In 2005, Massimo Banzi, with David
Mellis (then an IDII student) and David Cuartielles, added support for the cheaper
ATmega8 microcontroller to Wiring. But instead of continuing the work on Wiring,
they forke(or copied) the Wiring source code and started running it as a separate
project, called Arduino. The Arduino's initial core team consisted of Massimo Banzi,
David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis. The first prototype
board, made in 2005, was a simple design, and it wasn’t called Arduino.

4.8.1 Types of Arduino:

There are mainly 3 types of Arduino

Major types are discussed below:

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.

PROTUES combines advanced schematic capture, mixed mode SPICE simulation,


PCB layout and motorcar routing to create a whole electronic style system

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

5.1. Arduino Uno:


5.1.1 ATMEGA 328 Pinout:

Fig
5.1.1

ATMEGA 328 Pin description

5.2.2 Pin Descriptions


VCC
Digital supply voltage.
GND - Ground
Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2
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
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 (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2

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.

ADC7:6 (TQFP and QFN/MLF Package Only)

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:

The ATmega48A/48PA/88A/88PA/168A/168PA/328/328P is a low-power CMOS 8-bit


microcontroller based on the AVR enhanced RISC architecture. By executing powerful
instructions in a single clock cycle , the ATmega48A /48PA /88A /88PA /168A

/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:

4K/8K bytes of In-System Programmable Flash with ReadWhile-Write capabilities,

256/512/512/1K bytes EEPROM, 512/1K/1K/2K bytes SRAM, 23 general purpose I/O


lines, 32 general purpose working registers, three flexible Timer/Counters with compare
modes, internal and external interrupts, a serial programmable USART, a byte-oriented 2-
wire Serial Interface, an SPI serial port, a 6-channel 10-bit ADC (8 channels in TQFP and
QFN/MLF packages), a programmable Watchdog Timer with internal Oscillator, and five
software selectable power saving modes.

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.

By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on


monolithichip, the Atmel

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P is a powerful microcontroller that


provides a highly flexible and cost effective solution to many embedded con- trol
applications.

5.2.4 Arduino Board:

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.

5.2.6 Digital Inputs:


It comprises of 14-digital I/O pins, each pin take up and provides 40mA current. Some of the
pins have special functions like pins 0 & 1, which acts as a transmitter and receiver
respectively. For serial communication, pins-2 & 3 are external interrupts, 3,5,6,9,11 pins
delivers PWM o/p and pin-13 is used to connect LED.

5.2.7 How to program an Arduino ?


The main advantage of the Arduino technology is you can directly load the programs into the
device without the need of a hardware programmer to burn the program. This is done because
of the presence of the 0.5KB of boot loader, that allows the program to be dumped into the
circuit. The Arduino tool window contains a toolbar with various buttons like new, open,
verify, upload and serial monitor. And additionally it comprises of a text editor (employed to
write the code), a message space (displays the feedback) like showing the errors, the text
console, that displays the o/p & a series of menus just like the file, tool menu & edit.

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.

The sketch must be stored in the sketchbook directory.

● 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.

Memory Size Summary:

Table: 5.1 Diff. types of microprocessors

Device Flash EPROM RAM Interrupt Vector Size

ATmega48A 4 K Bytes 6 Bytes 512 Bytes 1 instruction word/vector

ATmega48PA 4K Bytes 6 Bytes 512 Bytes 1 instruction word/vector

ATmega88A 8K Bytes 2 Bytes 1K Bytes 1 instruction word/vector

42
ATmega88PA 8K Bytes 2 Bytes 1K Bytes 1 instruction word/vector

ATmega168A 16K Bytes 2 Bytes 1K Bytes 2instruction


words/vector

Table:5.2 Memory Size Summary

Device Flash EEPROM RAM Interrupt Vector Size

ATmega168PA 16K Bytes 512 Bytes 1K Bytes 2 instruction words/vector

ATmega328 32K Bytes 1K Bytes 2K Bytes 2 instruction words/vector

ATmega328P 32K Bytes 1K Bytes 2K Bytes 2 instruction words/vector

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P support a real ReadWhile-Write


SelfProgramming mechanism. There is a separate Boot Loader Section, and the SPM
instruction can only execute from there. In AT mega 48A/48PA there is no Read-While-
Write support and no separate Boot Loader

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.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous


Substances (RoHS directive).Also Halide free and fully Green.

5.3 LCD (LIQUID CRYSTAL DISPLAY)

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:

1. The declining costs of LCDs.

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.

4. Simple programming for characters and graphics.

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

Pin Name LogicState Description

Function Number
Ground 1 Vss - 0V

Power supply 2 Vdd - +5V

Contrast 3 Vee - 0 –Vdd

D0 – D7 are interpreted as
0
4 RS commands
1
D0 – D7 are interpreted as data

Write data (from controller to


0 LCD)
5 R/W
Control of 1 Read data (from LCD to
controller)
operating
Access to LCD disabled
0 Normal operating
6 E 1 Data/commands are transferred to
From 1 to 0
LCD
7 D0 0/1 Bit 0 LSB

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

14 D7 0/1 Bit 7 MSB

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).

Figure 5.3.2: LCD pin connection

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

Clear display 0 0 0 0 0 0 0 0 0 1 1.64mS

Cursor home 0 0 0 0 0 0 0 0 1 x 1.64mS

Entry mode set 0 0 0 0 0 0 0 1 I/D S 40uS

Display on/off control 0 0 0 0 0 0 1 D U B 40uS

Cursor/Display Shift 0 0 0 0 0 1 D/C R/L x x 40uS

Function set 0 0 0 0 1 DL N F x x 40uS

Set CGRAM address 0 0 0 1 CGRAM address 40uS

Set DDRAM address 0 0 1 DDRAM address 40uS

Read “BUSY” flag (BF) 0 1 BF DDRAM address -

Write to CGRAM or DDRAM 1 0 D7 D6 D5 D4 D3 D2 D1 D0 40uS

Read from CGRAM


or DDRAM 1 1 D7 D6 D5 D4 D3 D2 D1 D0 40uS

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.

Consequently, every information is shipped to alphanumeric display in 2 steps: four higher


bits are sent initial (that usually would be sent through lines D4-D7), four lower bits are sent
after. With the assistance of initialization, alphanumeric display can properly connect and
interpret every information received. Besides, with regards to the very fact that information is
seldom scanning from alphanumeric display (data chiefly are transferred from microcontroller
to LCD) an additional I/O pin could also be saved by easy connecting R/W pin to the bottom.
Such saving has its worth. Even if message displaying is usually performed, it'll not be
attainable to scan from busy flag since it's impractical to scan from show.

LCD INITIALIZATION FORMAT:


Once the facility offer is turned on, alphanumeric display is mechanically cleared. This
method lasts for roughly 15mS. After that, show is prepared to control. The mode of operative
is ready by default. This implies that:

1. Display/screen is cleared 2. Mode

decilitre = one Communication through 8-bit interface


N = zero Messages area unit displayed in one line

F = zero Character font five x eight dots

3. Display/Cursor on/off D = zero


show off

U = zero pointer off

B = zero pointer blink off

49
4. Character entry

ID = one Addresses on show area unit mechanically incremented by one

S = zero show shift off

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.

Fig 5.3.3 : Procedure on 8-bit initialization.

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.

Figure: Potentiometer image

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.

5.4 GSM (Global System for Mobile communications)


5.4.1 Introduction:

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.

5.4.3 The GSM Network:

GSM provides recommendations, not requirements. The GSM specifications define the functions
and interface requirements in detail but do not address the hardware. The GSM network is
divided into three major systems: the switching system (SS), the base station system (BSS), and
the operation and support system (OSS).

5.4.4 The Switching System:

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.

The Base Station System (BSS):

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 Operation and Support System

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.

Additional Functional Elements

• 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.

5.4.5 GSM Network Areas:

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.

MSC/VLR service areas:

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:

The PLMN service area is an area served by one network operator.

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.

• Modulation: Modulation is the process of sending a signal by changing the


characteristics of a carrier frequency. This is done in GSM via Gaussian minimum shift
keying (GMSK).

• 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.

GSM supports full-originating DTMF.

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.

Multiparty service: The multiparty service enables a mobile subscriber to establish a


multiparty conversation—that is, a simultaneous conversation between three and six
subscribers.

This service is only applicable to normal telephony.

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).

• Send and receive fax (ATD, ATA, AT+F*).

• Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW)


or delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS
messages (AT+CNMI).
• Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
• Perform security-related tasks, such as opening or closing facility locks (AT+CLCK),
checking whether a facility is locked (AT+CLCK) and changing passwords
(AT+CPWD).
(Facility lock examples: SIM lock [a password must be given to the SIM card every time
the mobile phone is switched on] and PH-SIM lock [a certain SIM card is associated
with the mobile phone. To use other SIM cards with the mobile phone, a password must
be entered.])

• 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

5.1 Introduction to 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.

5.2 Introduction to tracking system:

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.

Fig 5.1.1 : The traced path of a tracking device

5.2 Types of tracking system:

5.2.1 Power lines tracking system:

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

Fig 5.2.1 : Navigation


These are examples of how the user sees the maps and gets the direction towards his/her destination.

Features of Tracking system:

• 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.

• Flexible Data Encoding

: 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.

5.3 Applications Of GPS based Tracking system:

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.

Stolen Power lines Searching:

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

An infrared detector is an electronic radiation instrument that's accustomed sense sure


characteristics of its surroundings by either emitting and/or detection infrared. it's conjointly capable
of measure heat of an object and detective work motion. Infrared waves aren't visible to the human
eye.

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.

Infrared technology is found in several of our everyday product. as an example, TV has an IR


detector for decoding the signal from the remote. Key advantages of infrared sensors embody low
power necessities, straightforward electronic equipment, and their transportable feature.

69
Types of Infra-Red Sensors

Infra-red sensors are generally classified into 2 types:

• 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.

5.6.2 Working Principle

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.

Fig 5.6.1: working

5.6.3 Applications

The following are the key application areas of infrared sensors:

• Tracking and humanistic discipline

• Climatology, meteorology, and physical science

• Thermographs, communications side, and alcohol testing

• Heating, hyper spectral imaging, and vision

• Biological systems, pic bio modulation, and plant health

• Gas detectors/gas leak detection

REAL TIME CLOCK

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.

Fig 5.6.2 : Real time clock


Dallas Semiconductor DS1287 real-time clock manufactured in 1988

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

• Sometimes more accurate than other methods

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

Fig 5.6.3 : power source

Lithium battery inside the real-time clock IC

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.

Dallas DS1307 RTC chip in DIP-8 package

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:

time = time + rate.

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy