Report
Report
1
CHAPTER - 1
INTRODUCTION:
Then the vehicle location is sent to the IoT using GPS module and alert the near
by people using buzzer and police or the owner of the car can trace the car with the
help of GPS system and alert the near by people using buzzer. Then mode switch is
ON state means, we used speech recognition for the safety purpose of the car by
using a password using audio module,which also helps to unlock the car. Second
concept of this project vehicle accident alert. If the vibration sensor is detected means,
vehicle will be stoped and update to IoT through the cloud. In case driver press the
button within 10 secs, vehicle doesn’t stop. By taking the help of triangulation or
trilateration methods the tracking system enables to measures easy and accurate
location of the vehicle. Vehicle information like details of location etc. can be
displayed on a digital mapping with the help of software via the Internet. It stores
data and downloaded to a computer from the GPS unit at a base station and that can
later be used for analysis. This system is important for tracking vehicle at a given
period and now it is becoming increasingly popular for people having expensive cars
and hence as a theft prevention and retrieval device.
Internet Of Things:
Internet of Things (IOT) is the smart technology which helps devices to stay
connected in the current generation. All devices can be coupled jointly and used to
exchange data with remote login users to make life simpler Security plays an salient
role in today’s emerging technology. The Internet of things(IoT) is a propelled
computerization and examination framework (networks) which abuses organizing,
detecting, enormous information, and manmade brain power innovation to convey
2
finish frameworks for an item or administration. These frameworks (networks)
permit more noteworthy straight forwardness, control and execution when connected
to any industry or framework(network). Internet of Things(IoT) networks have
applications crosswise over ventures through their one of a kind adaptability and
capable to be reasonable in any situation. They upgrade information devices and
capable empowering innovation. The Internet of Things speaks to a dream in which
the internet claims out into the genuine world grasping ordinary articles. Physical
things are no longer separated from the virtual world, yet can be controlled remotely
and can go about as physical get to focuses to internet administrations. An IoT makes
registering really omnipresent. An idea first set for IoT forward by MarkWeiser in
the mid years of1990s. The IoT vision is grounded in the conviction that the
relentless advances in Microelectronics, interchanges and data innovation we have
seen in late years will proceed in to the distant.
3
CHAPTER - 2
LITERATURE SURVEY
1) Vivek Kinage; Piyush Patilet all proposed “IoT Based Intelligent System For
4
victims and it is important to provide the appropriate number of ambulances to save
all the victims. The primary aim of our project is to overcome these problems and
provide an optimal solution. Our system uses four vibration sensors and a
microcontroller to detect the impact and identify if it is an accident or a minor
collision. When an accident occurs, this system determines whether the accident is a
rear-end collision, head-on collision, rollover, t-bone impact or sandwich accident.
Depending on the type of accident, the number of ambulances required is decided.
Then the accident location is acquired using GPS module and SMS warning is sent to
the hospital using GSM modem. The SMS is composed of the location, type of
accident and required number of ambulances. Our system facilitates urgent
emergency assistance to all accident victims in time.
5
emergency notification is provided. The experimental results show that the accuracy
of traffic collision detection can reach 96% and that the average response time for
emergency-related announcements is approximately 7 s.
4) Daxin Tian; Chuang Zhang; Xuting Duan; Xixian Wang at all proposed “An
Car accidents cause a large number of deaths and disabilities every day, a
certain proportion of which result from untimely treatment and secondary accidents.
To some extent, automatic car accident detection can shorten response time of rescue
agencies and vehicles around accidents to improve rescue efficiency and traffic
safety level. In this paper, we proposed an automatic car accident detection method
based on Cooperative Vehicle Infrastructure Systems (CVIS) and machine vision.
First of all, a novel image dataset CAD-CVIS is established to improve accuracy of
accident detection based on intelligent roadside devices in CVIS. Especially, CAD-
CVIS is consisted of various kinds of accident types, weather conditions and accident
location, which can improve self-adaptability of accident detection methods among
different traffic situations. Secondly, we develop a deep neural network model
YOLO-CA based on CAD-CVIS and deep learning algorithms to detect accident. In
the model, we utilize Multi-Scale Feature Fusion (MSFF) and loss function with
dynamic weights to enhance performance of detecting small objects. Finally, our
experiment study evaluates performance of YOLO-CA for detecting car accidents,
and the results show that our proposed method can detect car accident in 0.0461
seconds (21.6FPS) with 90.02% average precision (AP). In additionally, we compare
YOLO-CA with other object detection models, and the results demonstrate the
comprehensive performance improvement on the accuracy and real-time over other
models.
6
5) Md Habib Ullah Khan; Md Mamun Howlader at all proposed “Design of An
7
CHAPTER – 3
SYSTEM DESIGN:
EXSITING SYSTEM:
This existing system includes a GPS modem which retrieves the location of a
vehicle in terms of its longitude and latitude. This data is fed to the microcontroller
details from the GPS and sends it to the concerned authority in the form of an SMS
over GSM modem on periodical intervals so set by the user. An LCD display is
interfaced to the microcontroller for crossing the data received before being sent over
GSM
PROPOSED SYSTEM:
Face recognition is critical in security systems. We use this feature to secure user
information in a variety of fields. For vehicle security, we propose using a face
recognition system. This system first stores the vehicle owner's face image and then
trains the system to detect the face, which is done by a face recognition system. Then
we are using mode of switch. If the switch is OFF condition means, detect the face
of the driver using camera and compare it with the previously saved face. Then it
compares the face with the previously saved face if it matched then the person can
8
access the steering wheel of the car. If the face of the person doesn’t match with the
previously saved images then the steering wheel of the car will be locked
automatically. Then the vehicle location is sent to the IoT using GPS module and
alert the near by people using buzzer and police or the owner of the car can trace the
car with the help of GPS system and alert the near by people using buzzer. Then
mode switch is ON state means, we used speech recognition for the safety purpose
of the car by using a password using audio module,which also helps to unlock the car.
Next concept of this project vehicle accident alert. If the vibration sensor is detected
means, vehicle will be stoped and update to IoT through the cloud. In case driver
press the button within 10 secs, vehicle doesn’t stop.
9
CHAPTER 4
HARDWARE DESCRIPTION
POWER SUPPLY
that supplies electrical or other types of energy to an output load or group of loads is
called a power supply unit or PSU. The term is most commonly applied to electrical
Power supplies for electronic devices can be broadly divided into linear and
switching power supplies. The linear supply is a relatively simple design that
becomes increasingly bulky and heavy for high current devices; voltage regulation in
a linear supply can result in low efficiency. A switched-mode supply of the same
rating as a linear supply will be smaller, is usually more efficient, but will be more
complex.
10
An AC powered linear power supply usually uses a transformer to convert the
voltage from the wall outlet (mains) to a different, usually a lower voltage. If it is
used to produce DC, a rectifier is used. A capacitor is used to smooth the pulsating
current from the rectifier. Some small periodic deviations from smooth direct current
will remain, which is known as ripple. These pulsations occur at a frequency related
the load and on variations in the AC supply voltage. For critical electronics
applications a linear regulator will be used to stabilize and adjust the voltage. This
regulator will also greatly reduce the ripple and noise in the output direct current.
Linear regulators often provide current limiting, protecting the power supply and
Adjustable linear power supplies are common laboratory and service shop test
equipment, allowing the output voltage to be set over a wide range. For example, a
bench power supply used by circuit designers may be adjustable up to 30 volts and
up to 5 amperes output. Some can be driven by an external signal, for example, for
11
Transformer:
loss of power. Transformers work only with AC and this is one of the reasons why
Most power supplies use a step-down transformer to reduce the dangerously high
The input coil is called the primary and the output coil is called the secondary.
There is no electrical connection between the two coils; instead they are linked by an
alternating magnetic field created in the soft-iron core of the transformer. The two
Transformers waste very little power so the power out is (almost) equal to the
power in. Note that as voltage is stepped down current is stepped up.
The ratio of the number of turns on each coil, called the turn’s ratio,
determines the ratio of the voltages. A step-down transformer has a large number of
12
turns on its primary (input) coil which is connected to the high voltage mains supply,
and a small number of turns on its secondary (output) coil to give a low output
voltage.
Vs*Is=Vp * Ip
The low voltage AC output is suitable for lamps, heaters and special AC motors. It is
not suitable for electronic circuits unless they include a rectifier and a smoothing
capacitor.
Rectifier:
13
There are several ways of connecting diodes to make a rectifier to convert AC
to DC. The bridge rectifier is the most important and it produces full-wave varying
DC. A full-wave rectifier can also be made from just two diodes if a centre-tap
transformer is used, but this method is rarely used now that diodes are cheaper. A
single diode can be used as a rectifier but it only uses the positive (+) parts of the AC
The varying DC output is suitable for lamps, heaters and standard motors. It is
not suitable for electronic circuits unless they include a smoothing capacitor.
Bridge rectifier:
A bridge rectifier can be made using four individual diodes, but it is also
14
full-wave rectifier because it uses the entire AC wave (both positive and negative
sections). 1.4V is used up in the bridge rectifier because each diode uses 0.7V when
conducting and there are always two diodes conducting, as shown in the diagram
below. Bridge rectifiers are rated by the maximum current they can pass and the
maximum reverse voltage they can withstand (this must be at least three times the
supply RMS voltage so the rectifier can withstand the peak voltages). Please see the
15
Single diode rectifier:
A single diode can be used as a rectifier but this produces half-wave varying
DC which has gaps when the AC is negative. It is hard to smooth this sufficiently
well to supply electronic circuits unless they require a very small current so the
smoothing capacitor does not significantly discharge during the gaps. Please see the
16
Smoothing:
across the DC supply to act as a reservoir, supplying current to the output when the
varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed
varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges
quickly near the peak of the varying DC, and then discharges as it supplies current to
the output.
the peak value (1.4 × RMS value). For example 6V RMS AC is rectified to full wave
DC of about 4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing this
increases to almost the peak value giving 1.4 × 4.6 = 6.4V smooth DC.
discharges, giving a small ripple voltage. For many circuits a ripple which is 10% of
the supply voltage is satisfactory and the equation below gives the required value for
17
the smoothing capacitor. A larger capacitor will give fewer ripples. The capacitor
Vs = supply voltage in volts (V), this is the peak value of the unsmoothed DC
The smooth DC output has a small ripple. It is suitable for most electronic circuits.
Regulator:
18
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or
variable output voltages. They are also rated by the maximum current they can pass.
Negative voltage regulators are available, mainly for use in dual supplies.
Most regulators include some automatic protection from excessive current ('overload
The LM78XX series of three terminal regulators is available with several fixed
output voltages making them useful in a wide range of applications. One of these is
local on card regulation, eliminating the distribution problems associated with single
point regulation. The voltages available allow these regulators to be used in logic
systems, instrumentation, HiFi, and other solid state electronic equipment. Although
designed primarily as fixed voltage regulators these devices can be used with
Many of the fixed voltage regulator ICs has 3 leads and look like power
transistors, such as the 7805 +5V 1A regulator shown on the right. They include a
1. Positive regulator
1. input pin
2. ground pin
3. output pin
19
2. Negative regulator
1. ground pin
2. input pin
3. output pin
The regulated DC output is very smooth with no ripple. It is suitable for all electronic
circuits.
Vibrations: Vibration sensors attached to the ATM machine will trigger when
the robber tries to cut the ATM machine using any of cutting tools such as hacksaw
20
or any drilling machine. This generates a lot of vibration, more than the average
Vibration Sensor
from the mechanical neutral axis, bending creates strain within the piezoelectric
Specifications
The Vibration Sensor Detector is designed for the security practice When
21
• Reliability and Interference: Accurate triggering strong anti-interference
APPLICATIONS
processes. They are used for quality assurance, process control, and for research and
1880, but only in the 1950s did manufacturers begin to use the piezoelectric effect in
industrial sensing applications. Since then, this measuring principle has been
22
increasingly used, and has become a mature technology with excellent inherent
reliability.
the automotive industry, piezoelectric elements are used to monitor combustion when
developing internal combustion engines. The sensors are either directly mounted into
additional holes into the cylinder head or the spark/glow plug is equipped with a
comparable to that of many metals and goes up to 106 N/m². Even though
sensing elements show almost zero deflection. This gives piezoelectric sensors
23
effect; this is the ability to generate an electrical signal when the temperature of the
IoT MODULE:
supply.It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif
Systems, and hardware which is based on the ESP-12 module.The term "Node
MCU" by default refers to the firmware rather than the dev kits. The firmware uses
the Lua scripting language.In our Project IOT is used to monitor ATM robbery using
vibration and accelerometer sensor and updated tocayenne app using ESP module
microcontroller is trigger indicating the ATM machine is being tried to shift out of its
place.
We can muscle activity , rotator cuff hand acceleration and tilt angle by using
IOT module from remote places likewise programmed for the NODE MCU which
consists of inbuild wifi Shield, and transmitted to the Cayenne Server which works
on the MQTT protocol.Wi-Fi controller board Node MCU has a 32-bit Tensilica
24
solution that acts as a bridge between existing microcontrollers to Wi-Fi and is
messages between devices. The protocol usually runs over TCP/IP, however, any
ensures high delivery guarantees.HTTP is the most popular and widely used protocol.
25
But over the last years MQTT rapidly gain transactions. Developers have to choose
accident detection and rescue system, as it enables the system to collect, transmit,
and receive data over the internet. Here's how an IoT module can be used in the
system:
Data Collection: The IoT module collects data from various sensors in the
Data Transmission: The IoT module transmits the data collected by the sensors
to a cloud server over the internet. The data is encrypted to ensure security and
privacy
Data Processing: The cloud server processes the data transmitted by the IoT
location of the accident and the condition of the vehicle and its occupants.
26
Remote Monitoring: The IoT module also enables remote monitoring of the
vehicle, allowing the authorities to monitor the location and condition of the
By using an IoT module, the system can efficiently and securely transmit data over
the internet, enabling prompt and effective rescue operations in the event of an
accident. The IoT module plays a crucial role in ensuring the success of the IoT-
upload program
Input/output pin
27
4 CH_EN - Chip Enable – Active -
high
ESP8266-01 Features
28
• I/O source current: 12mA (max)
ESP8266 Equivalents
ESP-12 (Has more GPIO pins that support ADC, PWM, SPI etc).
29
Department of Defense (DOD) and was originally run with 24 satellites. It was
established in 1973 to overcome the limitations of previous navigation systems.
Structure
GPS consists of three parts: the space segment, the control segment, and the user
segment. The U.S. Air Force develops, maintains, and operates the space and control
segments. GPS satellites broadcast signals from space, which each GPS receiver uses
to calculate its three-dimensional location (latitude, longitude, and altitude) plus the
current time.
The space segment is composed of 24 to 32 satellites in medium Earth orbit and also
includes the payload adapters to the boosters required to launch them into orbit. The
control segment is composed of a master control station, an alternate master control
station, and a host of dedicated and shared ground antennas and monitor stations. The
user segment is composed of hundreds of thousands of U.S. and allied military users
of the secure GPS Precise Positioning Service, and tens of millions of civil,
commercial, and scientific users of the Standard Positioning Service (see GPS
navigation devices).
A GPS receiver calculates its position by precisely timing the signals sent by GPS
satellites high above the Earth. Each satellite continually transmits messages that
include
30
The receiver utilizes the messages it receives to determine the transit time of each
message and computes the distance to each satellite. These distances along with
the satellites' locations are used with the possible aid of trilateration, depending on
which algorithm is used, to compute the position of the receiver. This position is
then displayed, perhaps with a moving map display or latitude and longitude;
elevation information may be included. Many GPS units show derived information
such as direction and speed, calculated from position changes.
Three satellites might seem enough to solve for position, since space has three
dimensions and a position near the Earth's surface can be assumed. However, even
a very small clock error multiplied by the very large speed of light — the speed at
which satellite signals propagate — results in a large positional error. Therefore
receivers use four or more satellites to solve for the receiver's location and time.
The very accurately computed time is effectively hidden by most GPS applications,
which use only the location. A few specialized GPS applications do however use the
time; these include time transfer, traffic signal timing, and synchronization of cell
phone base stations.
Although four satellites are required for normal operation, fewer apply in special
cases. If one variable is already known, a receiver can determine its position using
only three satellites. For example, a ship or aircraft may have known elevation.
Some GPS receivers may use additional clues or assumptions (such as reusing the
last known altitude, dead reckoning, inertial navigation, or including information
from the vehicle computer) to give a less accurate (degraded) position when fewer
than four satellites are visible.
System segmentation
31
The current GPS consists of three major segments. These are the space segment
(SS), a control segment (CS), and a user segment (US).
Space segment
The space segment (SS) is composed of the orbiting GPS satellites, or Space Vehicles
(SV) in GPS parlance. The GPS design originally called for 24 SVs, eight each in three
circular orbital planes, but this was modified to six planes with four satellites each.
The orbital planes are centered on the Earth, not rotating with respect to the
distant stars. The six planes have approximately 55° inclination (tilt relative to
Earth's equator) and are separated by 60° right ascension of the ascending node
(angle along the equator from a reference point to the orbit's intersection).The
orbits are arranged so that at least six satellites are always within line of sight from
almost everywhere on Earth's surface.
32
As of March 2008, there are 31 actively broadcasting satellites in the GPS
constellation, and two older, retired from active service satellites kept in the
constellation as orbital spares. The additional satellites improve the precision of GPS
receiver calculations by providing redundant measurements. With the increased
number of satellites, the constellation was changed to a nonuniform arrangement.
Such an arrangement was shown to improve reliability and availability of the system,
relative to a uniform system, when multiple satellites fail. About eight satellites are
visible from any point on the ground at any one time (see animation at right).
Control segment
The MCS can also access U.S. Air Force Satellite Control Network (AFSCN) ground
antennas (for additional command and control capability) and NGA (National
Geospatial-Intelligence Agency) monitor stations. The flight paths of the satellites
are tracked by dedicated U.S. Air Force monitoring stations in Hawaii, Kwajalein,
Ascension Island, Diego Garcia, Colorado Springs, Colorado and Cape Canaveral,
along with shared NGA monitor stations operated in England, Argentina, Ecuador,
Bahrain, Australia and Washington DC. The tracking information is sent to the Air
Force Space Command's MCS at Schriever Air Force Base 25 km (16 miles) ESE of
Colorado Springs, which is operated by the 2nd Space Operations Squadron (2 SOPS)
of the United States Air Force (USAF). Then 2 SOPS contacts each GPS satellite
regularly with a navigational update using dedicated or shared (AFSCN) ground
33
antennas (GPS dedicated ground antennas are located at Kwajalein, Ascension
Island, Diego Garcia, and Cape Canaveral). These updates synchronize the atomic
clocks on board the satellites to within a few nanoseconds of each other, and adjust
the ephemeris of each satellite's internal orbital model. The updates are created by
a Kalman filter, which uses inputs from the ground monitoring stations, space
weather information, and various other inputs.
Satellite maneuvers are not precise by GPS standards. So to change the orbit of a
satellite, the satellite must be marked unhealthy, so receivers will not use it in their
calculation. Then the maneuver can be carried out, and the resulting orbit tracked
from the ground. Then the new ephemeris is uploaded and the satellite marked
healthy again.
User segment
The user segment is composed of hundreds of thousands of U.S. and allied military
users of the secure GPS Precise Positioning Service, and tens of millions of civil,
commercial and scientific users of the Standard Positioning Service. In general, GPS
receivers are composed of an antenna, tuned to the frequencies transmitted by the
satellites, receiver-processors, and a highly stable clock (often a crystal oscillator).
They may also include a display for providing location and speed information to the
user. A receiver is often described by its number of channels: this signifies how
many satellites it can monitor simultaneously. Originally limited to four or five, this
has progressively increased over the years so that, as of 2007, receivers typically
have between 12 and 20 channels.
GPS receivers may include an input for differential corrections, using the RTCM SC-
104 format. This is typically in the form of an RS-232 port at 4,800 bit/s speed. Data
34
is actually sent at a much lower rate, which limits the accuracy of the signal sent
using RTCM. Receivers with internal DGPS receivers can outperform those using
external RTCM data. As of 2006, even low-cost units commonly include Wide Area
Augmentation System (WAAS) receivers.
Many GPS receivers can relay position data to a PC or other device using the NMEA
0183 protocol, or the newer and less widely used NMEA 2000. Although these
protocols are officially defined by the National Marine Electronics Association
(NMEA),[55] references to these protocols have been compiled from public records,
allowing open source tools like gpsd to read the protocol without violating
intellectual property laws. Other proprietary protocols exist as well, such as the SiRF
and MTK protocols. Receivers can interface with other devices using methods
including a serial connection, USB, or Bluetooth.
Communication
Message format
Subframes Description
35
Satellite clock,
1
GPS time relationship
Ephemeris
2–3
(precise satellite orbit)
Almanac component
4–5 (satellite network synopsys,
error correction)
The first part of the message encodes the week number and the time within the
week, as well as the data about the health of the satellite. The second part of the
message, the ephemeris, provides the precise orbit for the satellite. The last part of
the message, the almanac, contains coarse orbit and status information for all
satellites in the network as well as data related to error correction.
All satellites broadcast at the same frequencies. Signals are encoded using code
division multiple access (CDMA) allowing messages from individual satellites to be
distinguished from each other based on unique encodings for each satellite (which
the receiver must be aware of). Two distinct types of CDMA encodings are used: the
36
coarse/acquisition (C/A) code, which is accessible by the general public, and the
precise (P) code, that is encrypted so that only the U.S. military can access it.
The ephemeris is updated every 2 hours and is generally valid for 4 hours, with
provisions for updates every 6 hours or longer in non-nominal conditions. The
almanac is updated typically every 24 hours. Additionally data for a few weeks
following is uploaded in case of transmission updates that delay data upload.
Satellite frequencies
All satellites broadcast at the same two frequencies, 1.57542 GHz (L1 signal) and
1.2276 GHz (L2 signal). The satellite network uses a CDMA spread-spectrum
technique where the low-bitrate message data is encoded with a high-rate pseudo-
random (PRN) sequence that is different for each satellite. The receiver must be
aware of the PRN codes for each satellite to reconstruct the actual message data.
The C/A code, for civilian use, transmits data at 1.023 million chips per second,
whereas the P code, for U.S. military use, transmits at 10.23 million chips per
second. The L1 carrier is modulated by both the C/A and P codes, while the
L2 carrier is only modulated by the P code.[59] The P code can be encrypted as a so-
called P(Y) code which is only available to military equipment with a proper
decryption key. Both the C/A and P(Y) codes impart the precise time-of-day to the
user. GPS Modernization added a third frequency, 1.17645 GHZ (L5 signal). The L5
consists of two carrier components that are in phase quadrature with each other.
Each carrier component is bi-phase shift key (BPSK) modulated by a separate bit
train.
37
Demodulation and decoding
Since all of the satellite signals are modulated onto the same L1 carrier frequency,
there is a need to separate the signals after demodulation. This is done by assigning
each satellite a unique binary sequence known as a Gold code. The signals are
decoded, after demodulation, using addition of the Gold codes corresponding to the
satellites monitored by the receiver.[60][61]
If the almanac information has previously been acquired, the receiver picks which
satellites to listen for by their PRNs, unique numbers in the range 1 through 32. If
the almanac information is not in memory, the receiver enters a search mode until a
lock is obtained on one of the satellites. To obtain a lock, it is necessary that there
be an unobstructed line of sight from the receiver to the satellite. The receiver can
then acquire the almanac and determine the satellites it should listen for. As it
detects each satellite's signal, it identifies it by its distinct C/A code pattern. There
can be a delay of up to 30 seconds before the first estimate of position because of
the need to read the ephemeris data.
Features
• Model: VK16U6
• Based on u-Blox chip: UBX-G6010-ST
• C / A code 1.023MHz code stream
• Receive bands: L1 [1575.42 MHz]
• Tracking channels: 50
38
• Support DGPS [WAAS, EGNOS and MSAS]
• Positioning performance
• 2D plane: 5m [average]
• 2D plane: 3.5m [average], DGPS auxiliary.
• Drift: <0.02m / s
• Timing accuracy: 1us
• Reference coordinate system: WGS-84
• Maximum Altitude: 18,000 m
• Maximum speed: 500 m / s
• Acceleration: <4g
• Electrical properties:
• Tracking Sensitivity:-162dBm
• Acquisition sensitivity:-146dBm
• Cold start time: 32s [average]
• Warm start: 32s [average]
• Hot start time: 1s [average]
• Recapture Time: 0.1s [average]
• Operating temperature:
• -30 Degree to 80 Degree
• Package size:
• 28 * 28 * 8.4mm;
• Line length 2m
Technical Specifications
39
• KDS 0.5ppm high-precision TCXO
• Built-in RTC crystal and picofarads capacitance faster hot start
• Built-in EEPROM, free rich configuration parameters
• 1Hz-5 Hz positioning update rate
• Support AssistNow Online and AssistNow Offline A-GPS services
• GPS, GALILEO, SBAS (WAAS, EGNOS, MSAS, GAGAN) hybrid engine
• Power Supply: 3.3V
BUZZER
control unit that determines if and which button was pushed or a preset time has
lapsed, and usually illuminates a light on the appropriate button or control panel, and
sound. Initially this device was based on an electromechanical system which was
identical to an electric bell without the metal gong (which makes the ringing noise).
Often these units were anchored to a wall or ceiling and used the ceiling or wall as a
implement a circuit to make the AC current into a noise loud enough to drive a
40
loudspeaker and hook this circuit up to a cheap 8-ohm speaker. Nowadays, it is more
high-pitched tone. Usually these were hooked up to "driver" circuits which varied the
In game shows it is also known as a "lockout system," because when one person
signals ("buzzes in"), all others are locked out from signalling. Several game shows
FIG:Buzzer
The word "buzzer" comes from the rasping noise that buzzers made when they
or 60 cycles. Other sounds commonly used to indicate that a button has been pressed
There are many ways to communicate between the user and a product. One of
the best ways is audio communication using a buzzer IC. So during the design
41
this article discusses an overview of an audio signaling device like a beeper or a
or piezoelectric or mechanical type. The main function of this is to convert the signal
from audio to sound. Generally, it is powered through DC voltage and used in timers,
alarm devices, printers, alarms, computers, etc. Based on the various designs, it can
The pin configuration of the buzzer is shown below. It includes two pins namely
positive and negative. The positive terminal of this is represented with the ‘+’ symbol
or a longer terminal. This terminal is powered through 6Volts whereas the negative
42
terminal is represented with the ‘-‘symbol or short terminal and it is connected to the
GND terminal.
History
Electromechanical
This buzzer was launched in the year 1831 by an American Scientist namely Joseph
Henry but, this was used in doorbells until they were eliminated in 1930 in support of
Piezoelectric
These buzzers were invented by manufacturers of Japanese & fixed into a broad
range of devices during the period of 1970s – 1980s. So, this development primarily
the year 1951, they recognized the Application Research Committee of Barium
Titanate that allows the corporations to be cooperative competitively & bring about
Specifications
43
The specifications of the buzzer include the following.
• Color is black
Types of Buzzer
• Piezoelectric
• Electromagnetic
• Mechanical
• Electromechanical
• Magnetic
Piezoelectric
As the name suggests, the piezoelectric type uses the piezoelectric ceramic’s
piezoelectric effect & pulse current to make the metal plate vibrate & generate sound.
44
This kind of buzzer is made with a resonance box, multi resonator, piezoelectric plate,
housing, impedance matcher, etc. Some of the buzzers are also designed with LEDs.
The multi resonator of this mainly includes ICs and transistors. Once the supply is
given to this resonator, it will oscillate and generates an audio signal with 1.5 to
2.kHz. The impedance matcher will force the piezoelectric plate to produce sound.
Electromagnetic
This type of buzzer is made with a magnet, solenoid coil, oscillator, housing,
vibration diaphragm, and magnet. Once the power supply is given, the oscillator
which produces the audio signal current will supply throughout the solenoid coil to
Sometimes, the vibration diaphragm will vibrate & generates sound under the magnet
& solenoid coil interaction. The frequency range of this ranges from 2 kHz to 4kHz.
Mechanical
this type are also similar. But the main difference is that the vibrating buzzer is
Electromechanical
45
The designing of these types of buzzers can be done with a bare metal disc & an
Magnetic
Like a piezo type, magnetic is also used to generate a sound but they are different
due to core functionality. The magnetic type is more fixed as compared to the piezo
to generate a magnetic field, after that it permits another element of the buzzer to
The applications of magnetic buzzers are similar to the piezo type in household
Working Principle
The working principle of a buzzer depends on the theory that, once the voltage is
46
Once a potential disparity is given across these crystals, then they thrust
one conductor & drag the additional conductor through their internal property. So
Mounting Configurations
• Panel Mount
• Wire Leads
• Screw Terminals
• Through Hole
• Spring Contact
• Surface Mount
project. It is an extremely small & solid two-pin device thus it can be simply utilized
There are two kinds of buzzers commonly available like simple and readymade.
Once a simple type is power-driven then it will generate a beep sound continuously.
47
A readymade type looks heavier & generates a Beep. Beep. Beep. This sound is
This buzzer uses a DC power supply that ranges from 4V – 9V. To operate this, a
Advantages
• Simply Compatible
• Size is small
Disadvantages
48
• Training is necessary to know how to repair the condition without just turning
off.
Applications
• Communication Devices
• Alarm Circuits
• Portable Devices
• Security Systems
• Timers
• Household Appliances
• Electronic Metronomes
• Sporting Events
• Annunciator Panels
• Game Shows
Thus, this is all about an overview of a buzzer data sheet that includes its working
electro-acoustic audio signaling device. This buzzer works through an audio signal
49
source or oscillating circuit. A ring or beep or click indicates that a switch has been
pushed.
PUSH BUTTON:
breaking a connection. They can also be classified based on the type of action they
We encounter various push button switches almost every day, such as medical
simple component, but because it controls the entire control circuit, it is called the
"Control switch".
Introduction
The push button switch is usually used to turn on and off the control circuit, and it is
50
automatic control circuits to manually send control signals to control contactors,
machine and instrument in the process of work, most of the time is in the initial free
state position, and only when needed, it is converted to the second state (position)
under the action of external force. Once the external force is removed, due to With
the action of the spring, the switch returns to the initial position.
The push button switch can complete basic controls such as start, stop, forward and
reverse rotation, speed change and interlock. Usually each push button switch has
contact. When the button is pressed, the two pairs of contacts act simultaneously, the
In order to indicate the function of each button and avoid misoperation, the button
caps are usually made into different colors to show the difference, as shown in the
figure below. Its colors are red, green, black, yellow, blue, white, etc. For example,
red means stop button, green means start button, etc. The main parameters, type,
mounting hole size, number of contacts and current capacity of the button switch are
51
Siemens-APT Switches
Structure:
The push button switch generally consists of a button cap, a return spring, a
bridge-type moving contact, a static contact, a pillar connecting rod and a shell.
According to the opening and closing state of the contacts when the push button
switch is not subjected to external force (ie static), it is divided into start push button
switch (normally open button), stop push button switch (normally closed button) and
composite push button switch (NO and NCd contact combination buttons).
The contact of the start push button switch is closed when the button cap is
pressed, and the contact is automatically disconnected and reset when released.
When the stop push button switch is pressed down on the button cap, the contacts are
separated, and the contacts are automatically closed and reset when released. When
the composite push button switch presses the button cap, the bridge-type moving
contact moves downwards, the NC contact is opened first, and then the NO contact is
closed.
52
When the button cap is released, the NO contact is first broken and reset, and
then the NC contact is closed and reset. Extended learning: What is the internal
Working principle:
The working principle of the push button switch is shown in the figure below:
53
When the button is pressed down, the electromagnet is energized to generate
MICROCONTROLLER
PICs are popular with both industrial developers and hobbyists alike due to
their low cost, wide availability, large user base, extensive collection of application
notes, availability of low cost or free development tools, and serial programming
54
(and re-programming with flash memory) capability. Microchip announced on
February 2008 the shipment of its six billionth PIC processor.
The PIC microcontroller PIC16f877a is one of the most renowned microcontrollers in
the industry. This controller is very convenient to use, the coding or programming of
this controller is also easier. One of the main advantages is that it can be write-
erase as many times as possible because it use FLASH memory technology. It has a
total number of 40 pins and there are 33 pins for input and output. PIC16F877A is
used in many pic microcontroller projects. PIC16F877A also have many application
in digital electronics circuits.
55
memory and peripherals to make it as a mini computer. A microcontroller combines
on to the same microchip:
• CPU core
• A serial I/O port to allow data to flow between the controller and other devices
such as a PIC or another microcontroller.
Microcontrollers are:
• Smaller in size
• Inexpensive
56
The microcontroller that has been used for this project is from PIC series. PIC
microcontroller is the first RISC based microcontroller fabricated in CMOS
(complementary metal oxide semiconductor) that uses separate bus for instruction
and data allowing simultaneous access of program and data memory. The main
advantage of CMOS and RISC combination is low power consumption resulting in a
very small chip size with a small pin count. The main advantage of CMOS is that has
immunity to noise than other fabrication techniques.
PIC 16877A:
Various microcontrollers offer different kinds of memories. EEPROM,
EPROM, FLASH etc. are some of the memories of which FLASH is the most
recently developed. Technology that is used in PIC 16877 is flash technology, so that
data is retained even when the power is switched off. Easy programming and erasing
are other features of PIC 16F877. PIC16F877A microcontroller is used in the project.
The following are some of the important features of the controller.
Core features:
• High performance RISC CPU
• All single cycle instructions except for program branches which are two cycle
57
• Interrupt capability (up to 14 external/internal)
• Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable
operation
• Low-power consumption:
58
<2mA typical at 5V, 4MHz
20mA typical at 3V, 32 kHz
<1mA typical standby current
Peripheral features:
• Timer0: 8bit timer/counter with 8-bit prescaler
• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
• Synchronous Serial Port (SSP) with SPI (Master mode) and 12C (Master/
Slave)
Pin Description:
PIC16F877A consists of 40 pins enclosed in 5 ports. Each port holds 8 pins
which are bidirectional input/output pins. Pin diagram of PIC 16F877 is represented
in Fig.
59
FIG 4.3.2 PIN DESCRIPTION
PIN 1: MCLR
The first pin is the master clear pin of this IC. It resets the microcontroller and is
active low, meaning that it should constantly be given a voltage of 5V and if 0 V are
given then the controller is reset. Resetting the controller will bring it back to the
first line of the program that has been burned into the IC.
60
A push button and a resistor is connected to the pin. The pin is already being
supplied by constant 5V. When we want to reset the IC we just have to push the
button which will bring the MCLR pin to 0 potential thereby resetting the controller.
PIN 2: RA0/AN0
PORTA consists of 6 pins, from pin 2 to pin 7, all of these are bidirectional
input/output pins. Pin 2 is the first pin of this port. This pin can also be used as an
analog pin AN0. It is built in analog to digital converter.
PIN 3: RA1/AN1
This can be the analog input 1.
PIN 4: RA2/AN2/Vref-
It can also act as the analog input2. Or negative analog reference voltage can be
given to it.
PIN 5: RA3/AN3/Vref+
It can act as the analog input 3. Or can act as the analog positive reference voltage.
PIN 6: RA0/T0CKI
To timer0 this pin can act as the clock input pin, the type of output is open drain.
PIN 7: RA5/SS/AN4
This can be the analog input 4. There is synchronous serial port in the controller also
and this pin can be used as the slave select for that port.
PIN 8: RE0/RD/AN5
PORTE starts from pin 8 to pin 10 and this is also a bidirectional input output port. It
can be the analog input 5 or for parallel slave port it can act as a ‘read control’ pin
which will be active low.
61
PIN 9: RE1/WR/AN6
It can be the analog input 6. And for the parallel slave port it can act as the ‘write
control’ which will be active low.
62
PIN 15: RC0/T1OCO/T1CKI
PORTC consists of 8 pins. It is also a bidirectional input output port. Of them, pin 15
is the first. It can be the clock input of timer 1 or the oscillator output of timer 2.
63
PIN 26: RC7/RX/DT
It can be the synchronous data pin or the USART receive pin.
PIN 19,20,21,22,27,28,29,30:
All of these pins belong to PORTD which is again a bidirectional input and output
port. When the microprocessor bus is to be interfaced, it can act as the parallel
slave port.
▪ Data Memory
▪ Data EEPROM
Program memory
The PIC 16F877A devices have a 13-bit program counter capable of
addressing an 8K word x 14 bit program memory space. The PIC16F877A devices
have 8K words x 14 bits of flash program memory.
Data memory
The data memory is partitioned into multiple banks which contain the General
Purpose Registers and the Special Function Registers. Bits RP1 and RP0 are the bank
select bits. The lower locations of each bank are reserved for the Special Function
Registers. Above the Special Function Registers are General Purpose Registers,
64
implemented as static RAM. All implemented banks contain Special Function
Registers.
Data EEPROM
The data EEPROM and flash program memory is readable and writing during
normal operation. This memory is not directly mapped in the register file space.
Instead, it is indirectly addressed through the special function registers. The
EEPROM data memory allows single-byte reads and writes. The flash memory
allows single-word reads and four-word block writes.
Registers:
The module has four registers for operation. These are:
• Control Register
• Status Register
• Serial Receive/Transmit Buffer Register
• Shift Register
CR and SR are the control and status registers used in operation. The CS
register is readable and writable. The lower six bits of the SR are read only. The
upper two bits of SR are read/write. SSPSR is the shift register used for shifting data
in or out. SSPBUF is the buffer register to which data bytes are written to or read
form. In receive operations: SSPSR and SSPBUF together create a double-buffered
receiver. During transmission, the SSPBUF is not double-buffered.
Timer Modules:
The PIC16F877A incorporates timer modules for the purpose of producing software
interrupts. These interrupts are part and parcel of microcontroller programming.
There are three timers available. They are:
• Timer0 module
• Timer1 module
• Timer2 module
65
Architecture of PIC 16F877
Master Synchronous Serial Port (MSSP) Module:
66
The Master Synchronous Serial Port (MSSP) module is a serial interface, useful for
communicating with other peripheral or microcontroller devices. These peripheral
devices may be serial EEPROMs, shift registers, display drivers, A/D converters, etc.
The MSSP module can operate in one of two modes:
• Serial Peripheral Interface (SPI)
• Inter- Integrated Circuit (I2C)
• Full Master mode
• Slave mode (with general address call)
The I2C interface supports the following modes in hardware:
• Master mode
• Multi-Master mode
• Slave mode
Control Registers:
The MSSP module has three associated registers. These include a status register
(SSPSTAT) and two control registers (SSPCON and SSPCON2). The use of these
registers and their individual configuration bits differ significantly, depending on
whether the MSSP module is operated in SPI or I2C mode.
Analog to Converter Module:
The Analog-to-Digital Converter module has five inputs for the 28-pi devices and
eight for the 40/44 pin devices. The conversion of an analog input signal results in a
corresponding 10-bit digital number. The A/D module has high and low voltage
reference input that is software selectable to some combination of VDD, VSS, RA2
or RA3. The A/D converter has a unique feature of being able to operate while the
device is in sleep mode. To operate in sleep mode, the A/D clock must be derived
from the A/D internal RC oscillator.
Core architecture
67
• Separate code and data spaces (Harvard architecture) for devices other than
PIC32, which has a Von Neumann architecture.
• A small number of fixed length instructions
• Most instructions are single cycle execution (2 clock cycles), with one delay
cycle on branches and skips
• One accumulator (W0), the use of which (as source operand) is implied (i.e. is
not encoded in the opcode)
• All RAM locations function as registers as both source and/or destination of
math and other functions.
• A hardware stack for storing return addresses
• A fairly small amount of addressable data space (typically 256 bytes),
extended through banking
• Data space mapped CPU, port, and peripheral registers
• The program counter is also mapped into the data space and writable (this is
used to implement indirect jumps).
There is no distinction between memory space and register space because the RAM
serves the job of both memory and registers, and the RAM is usually just referred to
as the register file or simply as the registers.
PICs have a set of registers that function as general purpose RAM. Special purpose
control registers for on-chip hardware resources are also mapped into the data space.
The addressability of memory varies depending on device series, and all PIC devices
have some banking mechanism to extend addressing to additional memory. Later
series of devices feature move instructions which can cover the whole addressable
space, independent of the selected bank. In earlier devices, any register move had to
be achieved via the accumulator.
68
To implement indirect addressing, a "file select register" (FSR) and "indirect
register" (INDF) are used. A register number is written to the FSR, after which reads
from or writes to INDF will actually be to or from the register pointed to by FSR.
Later devices extended this concept with post- and pre- increment/decrement for
greater efficiency in accessing sequentially stored data. This also allows FSR to be
treated almost like a stack pointer (SP).
External data memory is not directly addressable except in some high pin count
PIC18 devices.
Code space
Word size
The word size of PICs can be a source of confusion. All PICs handle (and address)
data in 8-bit chunks, so they should be called 8-bit microcontrollers. However, the
unit of addressability of the code space is not generally the same as the data space.
For example, PICs in the baseline and mid-range families have program memory
addressable in the same wordsize as the instruction width, i.e. 12 or 14 bits
respectively. In contrast, in the PIC18 series, the program memory is addressed in 8-
bit increments (bytes), which differs from the instruction width of 16 bits.
Stacks
69
PICs have a hardware call stack, which is used to save return addresses. The
hardware stack is not software accessible on earlier devices, but this changed with
the 18 series devices.
Hardware support for a general purpose parameter stack was lacking in early series,
but this greatly improved in the 18 series, making the 18 series architecture more
friendly to high level language compilers.
Instruction set
A PIC's instructions vary from about 35 instructions for the low-end PICs to over 80
instructions for the high-end PICs. The instruction set includes instructions to
perform a variety of operations on registers directly, the accumulator and a literal
constant or the accumulator and a register, as well as for conditional execution, and
program branching.
Some operations, such as bit setting and testing, can be performed on any numbered
register, but bi-operand arithmetic operations always involve W (the accumulator) ;
writing the result back to either W or the other operand register. To load a constant, it
is necessary to load it into W before it can be moved into another register. On the
older cores, all register moves needed to pass through W, but this changed on the
"high end" cores.
As we have studied 5 input and output ports namely PORTA, PORTB, PORTC, PORTD
and PORTE which can be digital as well as analog. We will configure them according
to our requirements. But in case of analog mode, the pins or the ports can only act
as inputs. There is a built in A to D converter which is used in such cases.
Multiplexer circuits are also used.
70
But in digital mode, there is no restriction. We can configure the ports as output or
as input. This is done through programming. For PIC the preferable compiler is
mikro C pro which can be downloaded from their website.
There is a register named as ‘TRIS’ which controls the direction of ports. For
different ports there are different registers such as TRISA, TRISB etc.
▪ If we set a bit of the TRIS register to 0, the corresponding port bit will act as
the digital output.
▪ If we set a bit of the TRIS register to 1, the corresponding port bit will act as
the digital input.
For example to set the whole portb to output we can write the program statement
as:
TRISB=0;
Now the port will act as the output port and we can send any value on the output
such as
PORTB=0XFF;
FF represents all 1’s in binary i.e. FF=11111111, now all the pins of port b are high. If
we connect LEDs at all the pins then they will all start glowing in this condition.
If we want to negate the values of the port b we can use the statement:
PORTB=~PORTB;
71
void main()
while(1);
LCD DISPLAY
INTRODUCTION:
72
Liquid crystal cell displays (LCDs) are used in similar applications where LEDs
are used. These applications are display of display of numeric and alphanumeric
characters in dot matrix and segmental displays.
73
A liquid crystal display (LCD) is an electronically-modulated optical device
shaped into a thin, flat panel made up of any number of color or monochrome pixels
filled with liquid crystals and arrayed in front of a light source (backlight) or reflector.
It is often utilized in battery-powered electronic devices because it uses very small
amounts of electric power. LCD has material, which continues the properties of both
liquids and crystals. Rather than having a melting point, they have a temperature
range within which the molecules are almost as mobile as they would be in a liquid,
but are grouped together in an ordered from similar to a crystal.
LCD consists of two glass panels, with the liquid crystal materials sandwiched
in between them. The inner surface of the glass plates is coated with transparent
electrodes which define in between the electrodes and the crystal, which makes the
liquid crystal molecules to maintain a defined orientation angle. When a potential is
applied across the cell, charge carriers flowing through the liquid will disrupt the
molecular alignment and produce turbulence.
When the liquid is not activated, it is transparent. When the liquid is activated
the molecular turbulence causes light to be scattered in all directions and the cell
appears to be bright. Thus the required message is displayed. When the LCD is in the
off state, the two polarizer’s and the liquid crystal rotate the light rays, such that they
come out of the LCD without any orientation, and hence the LCD appears
transparent.
Working:
74
(VL) at pin 3 should be adjusted properly. A module should not be removed from a
live circuit.
The ground terminal of the power supply must be isolated properly so that
voltage is induced in it. The module should be isolated properly so that stray voltages
are not induced, which could cause a flicking display. LCD is lightweight with only a
few, millimeters thickness since the LCD consumes less power, they are compatible
with low power electronic circuits, and can be powered for long durations. LCD does
not generate light and so light is needed to read the display. By using backlighting,
reading is possible in the dark. LCDs have long life and a wide operating temperature
range. Before LCD is used for displaying proper initialization should be done.
LCDs with a small number of segments, such as those used in digital watches
and pocket calculators, have individual electrical contacts for each segment. An
external dedicated circuit supplies an electric charge to control each segment. This
display structure is unwieldy for more than a few display elements. Small
monochrome displays such as those found in personal organizers, or older laptop
screens have a passive-matrix structure employing super-twisted nematic (STN) or
double-layer STN (DSTN) technology—the latter of which addresses a color-shifting
problem with the former—and color-STN (CSTN)— wherein color is added by using
an internal filter. Each row or column of the display has a single electrical circuit.
The pixels are addressed one at a time by row and column addresses. This type
of display is called passive-matrix addressed because the pixel must retain its state
between refreshes without the benefit of a steady electrical charge. As the number of
pixels (and, correspondingly, columns and rows) increases, this type of display
becomes less feasible.
Very slow response times and poor contrast are typical of passive matrix
addressed LCDs. High-resolution color displays such as modern LCD computer
monitors and televisions use an active matrix structure. A matrix of thin-film
transistors (TFTs) is added to the polarizing and color filters. Each pixel has its own
75
dedicated transistor, allowing each column line to access one pixel. When a row line
is activated, all of the column lines are connected to a row of pixels and the correct
voltage is driven onto all of the column lines.
The row line is then deactivated and the next row line is activated. All of the
row lines are activated in sequence during a refresh operation. Active-matrix
addressed displays look "brighter" and "sharper" than passive-matrix addressed
displays of the same size, and generally have quicker response times, producing
much better images. A general purpose alphanumeric LCD, with two lines of 16
characters. So the type of LCD used in this project is16 characters * 2 lines with 5*7
dots with cursor, built in controller, +5v power supply, 1/16 duty cycle.
76
5v
3 Vo Power supply for liquid crystal drive
4 RS Register select
RS=0…Instruction register
RS=1…Data register
5 R/W Read/Write
R/W=1…Read
R/W=0…Write
6 EN Enable
16 LAMP+(L+) Enable
(E2)
77
The function of each pins of LCD is described below VCC, VSS and VEE while v
and v provide +5v and ground, respectively, v is used for controlling LCD contrast.
R/W, read/write
R/W input allows the user to write information to the LCD or read information
from it. R/W=1 when reading; R/W=0 when writing.
E, enable
The enable pin is used by the LCD to latch information presented on its data
pins. When data is supplied to data pins, a high to low pulse must be applied to this
pin in order for the LCD to latch in the data present at the data pins.
D0 - D7
The 8-bit data pins, D0 – D7, are used to send information to the LCD or read
contents of the LCD’S internal registers. There are also instruction codes that can be
sent to the LCD to clear the display or force the cursor to the home position or blink
the cursor. RS=0 is used to check the busy flag bit to see if the LCD is ready to
receive information. The busy flag is D7 and can be read when R/W=1 and RS=0, as
follows: if R/W=1, RS=0.when D7=1, the LCD is busy taking care of internal
operation and will not accept any new information, when D7=0, the LCD is ready to
receive new information.
78
LCD INTERFACING WITH MICROCONTROLLER:
ADVANTAGES:
1. Consume much lesser energy (i.e. low power) when compared to LEDs.
2. Utilizes the light available outside and no generation of light.
3. Since very thin layer of liquid crystal is used, more suitable to act as display
elements (in digital watches, pocket calculators, ect.)
4. Since reflectivity is highly sensitive to temperature, used as temperature
measuring sensor.
5. Very cheap.
DISADVANTAGES:
79
4. Cannot be used under wide range of temperature.
APPLICATIONS:
1. Watches
2. Fax & Copy machines & Calculators.
SOFTWARE DESCRIPTION
MPLAB IDE
INTRODUCTION
MPLAB X is the latest edition of MPLAB, and is developed on the NetBeans platform.
MPLAB and MPLAB X support project management, code editing, debugging and
programming of Microchip 8-bit, 16-bit and 32-bit PIC microcontrollers.
MPLAB is designed to work with MPLAB-certified devices such as the MPLAB ICD
3 and MPLAB REAL ICE, for programming and debugging PIC microcontrollers using
a personal computer. PICKit programmers are also supported by MPLAB.
MPLAB 8.X is the last version of the legacy MPLAB IDE technology, custom built
by Microchip Technology in Microsoft Visual C++. MPLAB supports project
management, editing, debugging and programming of Microchip 8-bit, 16-bit and
32-bit PICmicrocontrollers. MPLAB only works on Microsoft Windows. MPLAB is
still available from Microchip's archives, but is not recommended for new projects.
80
• MPLAB MPASM Assembler
• MPLAB ASM30 Assembler
• MPLAB C Compiler for PIC18
• MPLAB C Compiler for PIC24 and dsPIC DSCs
• MPLAB C Compiler for PIC32
• HI-TECH C
MPLAB X is the latest version of the MPLAB IDE built by Microchip Technology,
and is based on the open-source NetBeans platform. MPLAB X supports editing,
debugging and programming of Microchip 8-bit, 16-bit and 32-
bit PIC microcontrollers.
MPLAB X is the first version of the IDE to include cross-platform support for Mac
OS X and Linux operating systems, in addition to Microsoft Windows.
81
of Omniscient Code Generation™ - a whole-program compilation technology - to
provide denser code and better performance on PIC MCUs. This ANSI C compiler
integrates into Microchips MPLAB(R) IDE and is compatible with Microchip
debuggers and emulators.
A sketch is the name that Arduino uses for a program. It's the unit of code that
is uploaded to and run on an Arduino board.
82
toolchains, the Arduino project provides an integrated development
environment (IDE) based on the Processing language project.
Arduino
Over the years Arduino has been the brain of thousands of projects, from everyday
objects to complex scientific instruments. A worldwide community of makers -
students, hobbyists, artists, programmers, and professionals - has gathered around
this open-source platform, their contributions have added up to an incredible
amount of accessible knowledge that can be of great help to novices and experts
alike.
83
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 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.
There are many other microcontrollers and microcontroller platforms available for
physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's
Handyboard, and many others offer similar functionality. All of these tools take the
messy details of microcontroller programming and wrap it up in an easy-to-use
package. Arduino also simplifies the process of working with microcontrollers, but it
offers some advantage for teachers, students, and interested amateurs over other
systems:
84
environment, so students learning to program in that environment will be familiar
with how the Arduino IDE works.
• 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.
• Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers can
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.
Variables
A variable is a place for storing a piece of data. It has a name, a type, and a value.
For example, the line from the Blink sketch above declares a variable with the
name ledPin, the type int, and an initial value of 13. It's being used to indicate
which Arduino pin the LED is connected to. Every time the name ledPin appears
in the code, its value will be retrieved. In this case, the person writing the program
could have chosen not to bother creating the ledPin variable and instead have
simply written 13 everywhere they needed to specify a pin number. The advantage
of using a variable is that it's easier to move the LED to a different pin: you only
need to edit the one line that assigns the initial value to the variable.
Functions
85
A function (otherwise known as a procedure or sub-routine) is a named piece of code
that can be used from elsewhere in a sketch. For example, here's the definition of
the setup() function from the Blink example:
void setup()
{
pinMode(ledPin, OUTPUT);
}
The first line provides information about the function, like its name, "setup". The text
before and after the name specify its return type and parameters: these will be
explained later. The code between the { and } is called the body of the function: what
the function does.
The pinMode() function configures a pin as either an input or an output. To use it,
you pass it the number of the pin to configure and the constant INPUT or OUTPUT.
When configured as an input, a pin can detect the state of a sensor like a
pushbutton; As an output, it can drive an actuator like an LED.
digitalWrite(ledPin, HIGH);
The delay() causes the Arduino to wait for the specified number of milliseconds
before continuing on to the next line. There are 1000 milliseconds in a second, so the
line:
86
delay(1000);
There are two special functions that are a part of every Arduino
sketch: setup() and loop(). The setup() is called once, when the sketch
starts. It's a good place to do setup tasks like setting pin modes or initializing
libraries. The loop() function is called over and over and is heart of most sketches.
You need to include both functions in your sketch, even if you don't need them for
anything.
Everything between the /* and */ is ignored by the Arduino when it runs the sketch
(the * at the start of each line is only there to make the comment look pretty, and isn't
required). It's there for people reading the code: to explain what the program does,
how it works, or why it's written the way it is. It's a good practice to comment your
sketches, and to keep the comments up-to-date when you modify the code. This helps
other people to learn from or modify your code.
CHAPTER -5
ADVANTAGES
87
• We can monitor the speed of the vehicle.
• We can find the location of the vehicle.
• Alert message to mobile phone for remote information.
• It is used to vehicle accident evidence and is useful to found victim easily
without human intervention
• It is mainly used as a tracking device and we can monitor driver rash driving
behavior
APPLICATIONS:
IoT-based automatic vehicle accident detection and rescue system has various
1. Road Safety: The system can be integrated into vehicles to detect accidents and
provide real-time alerts to emergency services, improving the response time and
2. Fleet Management: The system can be used to monitor and manage large fleets of
vehicles, providing real-time data on their location, speed, and other important
metrics. This can help fleet managers improve safety and reduce the risk of
accidents.
88
3. Smart City Planning: The system can provide valuable data on the location and
4. Insurance Claims: The system can provide accurate information about accidents,
which can be used by insurance companies to process claims more efficiently and
fairly.
6. Predictive Maintenance: The system can be used to monitor the health of vehicles
and provide real-time alerts about potential issues, allowing for proactive
• Vehicle location can be tracked and prevention of it from theft with face
89
• The project provides an extra layer of security by including AI in the form of
• To prevent all possible ways of vehicle theft, a sensor which detects the
REFERENCES:
90
1. Stephen Eduku, Mohammed Okoe Alhassan and Joseph Sekyi, "Design of
Journal of Scientific and Research Publications, vol. 7, no. 10, pp. 397.
3. "Road traffic injuries", World Health Organization, Feb 2021, [online] Available:
https://www.who.int/news-room/fact-sheets/detail/road-traffic-injuries.
and Optimization (Trends and Future Directions) (ICRITO), pp. 737-741, 2018.
2020.
91
7. S. M. Gowri, P. Anitha, D. Srivaishnavi and M. Nithya, "Internet of Things based
(IoT in Social Mobile Analytics and Cloud) (I-SMAC), pp. 159-163, 2019.
8. V. Kinage and P. Patil, "IoT Based Intelligent System For Vehicle Accident
I-SMAC (IoT in Social Mobile Analytics and Cloud) (I-SMAC), pp. 409-413,
2019.
10. Y.-K. Lai, Y.-H. Huang and T. Schumann, "Intelligent vehicle collision warning
system based on a deep learning approach", Proc. IEEE Int. Conf. Consum.
92