Sem5 Training Report - ECIL-embedded System
Sem5 Training Report - ECIL-embedded System
ON
“DEVELOPMENT OF ADVANCED
EMBEDDED SYSTEM FOR ACCIDENT
AVOIDANCE SYSTEM”
HYDERABAD
TH
(28 MAY 2018 TO 27TH JUNE 2018)
Special thanks to Ms. Monica who guided me & my discussion with her was
truly enlightening. I would again like to express my sincere thanks to all project
guides for their constant friendly guidance during the entire stretch of this
report. Every new step I took was due to their persistent enthusiastic
cooperation, generosity and superb guidance and I acknowledge this with a
deep sense of gratitude.
I would also like to thank all employees for their friendly and warm attitude,
which helped me in completing the project successfully.
ABSTRACT
Now a days, due to heavy population of vehicles, the drivers are not able to
instantly control the vehicles, when other vehicles or pedestrian come across
suddenly. This may lead to accident, which can also turn to be fatal. The
proposed work aims at designing a system which automatically detects the
presence of any obstacle near the vehicle by using ultrasonic sensors and take
necessary actions. This can prevent human life and also control the traffic
collision efficiently.
PREFACE
The company played a very significant role in the training and growth of high
calibre technical and managerial manpower especially in the fields
of Computers and Information Technology. Though the initial thrust was on
meeting the Control & Instrumentation requirements of the Nuclear Power
Program, the expanded scope of self-reliance pursued by ECIL enabled the
company to develop various products to cater to the needs of Defence, Civil
Aviation, Information & Broadcasting, Telecommunications, Insurance,
Banking, Police, and Para-Military Forces, Oil & Gas, Power, Space Education,
Health, Agriculture, Steel and Coal sectors and various user departments in the
Government domain. ECIL thus evolved as a multi-product company serving
multiple sectors of Indian economy with emphasis on import of country
substitution and development of products & services that are of economic and
strategic significance to the country.
Vision:
To contribute to the country in achieving self-reliance in strategic electronics.
Mission:
ECIL's mission is to consolidate its status as a valued national asset in the area
of strategic electronics with specific focus on Atomic Energy, Defence,
Security and such critical sectors of strategic national importance.
Objectives:
To continue services to the country's needs for the peaceful uses Atomic
Energy. Special and Strategic requirements of Defence and Space,
Electronics Security Systems and Support for Civil Aviation sector.
To establish newer technology products such as Container Scanning
Systems and Explosive Detectors.
To explore new avenues of business and work for growth in strategic
sectors in addition to working for realizing technological solutions for the
benefit of society in areas like Agriculture, Education, Health, Power,
Transportation, Food, Disaster Management etc.
To progressively improve shareholder value of the company.
To strengthen the technology base, enhance skill base and ensure
succession planning in the company.
To re-engineer the company to become nationally and internationally
competitive by paying particular attention to delivery, cost and quality in
all its activities.
To consciously work for finding export markets for the company's
products.
1. Nuclear sector:
Control and instrumentation products for nuclear power plants.
Integrated security systems for nuclear installations.
Radiation monitoring instruments.
Secured network of all Department of Atomic Energy units
via satellite.
2. Defence Sector:
Various types of fuses.
V/UHF Radio communication equipment.
Electronics Warfare Systems and derivatives.
Thermal batteries and special components for missile projects.
Precision servo components like gyros.
Missile support control and command systems.
Training Simulators.
Stabilised antenna and tracking for Light Combat Aircrafts.
Detection and pre-detonation of explosive devices.
Jammers with direction finding abilities.
3. Commercial Sector:
Electronic Voting Machines.
Voter-verified paper audit trails.
Totalizer.
Wireless Local Loop (WLL) systems.
Antenna products.
Electronic energy meters or electricity meter.
X-ray baggage inspection system for airports.
Computer hardware, software and services.
Computer education services.
INTRODUCTION
EMBEDDED SYSTEMS:
An embedded system is a combination of computer hardware and software,
either fixed in capability or programmable, designed for a specific function or
functions within a larger system. Industrial machines, agricultural and process
industry devices, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines and toys, as well as mobile devices, are
possible locations for an embedded system.
Embedded systems are computing systems, but they can range from having no
user interface (UI) for example, on devices in which the system is designed to
perform a single task -- to complex graphical user interfaces (GUIs), such as in
mobile devices. User interfaces can include buttons, LEDs, touchscreen sensing
and more. Some systems use remote user interfaces as well.
Embedded systems date back to the 1960s. Charles Stark Draper developed an
integrated circuit (IC) in 1961 to reduce the size and weight of the Apollo
Guidance Computer, the digital system installed on the Apollo Command
Module and Lunar Module. The first computer to use ICs, it helped astronauts
collect real-time flight data. By the late 1960s and early 1970s, the price of
integrated circuits dropped and usage surged. The first microcontroller was
developed by Texas Instruments in 1971. The TMS 1000 series, which became
commercially available in 1974, contained a 4-bit processor, read-only memory
(ROM) and random-access memory (RAM), and cost around $2 apiece in bulk
orders. In 1987, the first embedded operating system, the real-time VxWorks,
was released by Wind River, followed by Microsoft's Windows Embedded CE
in 1996. By the late 1990s, the first embedded Linux products began to appear.
Today, Linux is used in almost all embedded devices.
Embedded system hardware (microprocessor/microcontroller-based)
Embedded firmware
The firmware on embedded systems, referred to as embedded firmware, is
specific software written into the memory of a device that serves the purpose of
ROM, but can be updated more easily. Firmware can be stored in non-volatile
memory devices including ROM, programmable ROM, erasable PROM or flash
memory. Embedded firmware is used to control various device and system
functions, for example, telling the device how to communicate with other
devices, perform specific functions and provide input and output functionality.
Collision avoidance features are rapidly making their way into the new vehicle
fleet.
PROTOTYPE DEVELOPED AT ECIL
For mimicking the real-life application, we developed an autonomous mobile
controlled robot which was our prototype of a car. To avoid early accidents, we
used small radar sensors around an autonomous robot to detect objects and their
relative speeds and distances. Generally, these sensors are IR sensors and
Ultrasonic sensors. In our prototype model we used IR sensors to detect the in
front vehicles and ultrasonic sensors to detect adjacent vehicles. These sensors
regularly transmitted bursts of radar waves with high frequency. The
transmitted high frequency bursts bounce off the nearest vehicles and return
back to the sensor. At sensor, another unit connected to the sensor to estimate
the time between signal leave and bounce back. This information is used to
estimate the relative velocity, distance and position of the vehicle immediately.
Thus, if any abrupt changes are happening in these factors which intentionally
cause an accident, then they will assist the driver to avoid the collision. In this
project we effectively avoid the collision by properly applying the brake at right
time in right direction i.e. if driver turns right without accurately observing the
oncoming vehicles, this system will issue a throttle command to the vehicle and
at same time a brake command is applied. Same process will be applied in every
turn of the vehicle. These commands are issued in a manner that does not cause
the violation of predefined speed limits (either traffic laws or comfort levels),
more precisely, the braking command will not cause the vehicle velocity to
become less than a minimum speed, while the accelerating command will not
cause the vehicle velocity to become greater than a maximum speed. This
implies that automatic control commands applied to prevent collisions at the
intersection do not create hazardous driving conditions for other vehicles not
directly involved.
HARDWARE USED
AT89S52 Microcontroller
It can be called the brain of the prototype. It is
the main control unit, processing and
executing all the commands.
The AT89S52 comes from the popular 8051
family of Atmel Microcontrollers. It is an 8-
bit CMOS microcontroller with 8K as Flash
memory and 256 bytes of RAM. Since it is
similar to the trust worthy 8051 architecture
these microcontrollers are as per industry
standard. It has 32 I/O pins comprising of
three 16-bit timers, external interrupts, full-
duplex serial port, on-chip oscillator and clock
circuitry.
The Microcontroller also has Operating mode,
Idle Mode and Power down mode which
makes it suitable for battery operated
applications. Few considerable drawbacks of
the microcontroller are that it does not have
in-built ADC and does not support SPI or I2C
protocols. However, the external modules can be utilised for the same.
AT89S52 –Simplified Features:
CPU: 8-bit PIC
Number of Pins: 40
Operating Voltage (V): 4 to 5.5 V
Number of Programmable I/O pins: 32
Timer Module: 16-bit (1)
Communication Peripherals: UART (1)
External Oscillator: Up to 23Mhz
Internal Oscillator: Nil
Program Memory Type: Flash
Program Memory (KB): 8kB
RAM Bytes: 256 x 8-bit
HC-SR04 Ultrasonic Sensor
It is the major distance measuring sensor that
senses the distance between the prototype and
the object in its vicinity. HC-SR04 Ultrasonic
(US) sensor is a 4-pin module, whose pin
names are Vcc, Trigger, Echo and Ground
respectively. This sensor is a very popular
sensor used in many applications where
measuring distance or sensing objects are
required. The module has two eyes like
projects in the front which forms the Ultrasonic transmitter and Receiver. The
sensor works with the simple high school formula that
Distance = Speed × Time
The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air
and when it gets objected by any material it gets reflected back toward the
sensor this reflected wave is observed by the Ultrasonic receiver module as
shown in the picture below
DC Motors
Two 12V, 200RPM DC motors were used to drive the prototype. The DC motors
were controlled by the L293D Motor Drive.
HC-05 Bluetooth Module
This module acts as a transceiver for the microcontroller
and allows it to be controlled by mobile wirelessly
using Bluetooth technology.
Features:
Operating Voltage: 4V to 6V (Typically +5V)
Operating Current: 30mA
Range: 10m
Works with Serial communication (USART) and TTL compatible
Follows IEEE 802.15.1 standardized protocol
Uses Frequency-Hopping Spread spectrum (FHSS)
Can operate in Master, Slave or Master/Slave mode
Can be easily interfaced with Laptop or Mobile phones with Bluetooth
Power Supply
A 12V DC battery was used to supply power to the prototype.
BASIC FLOW DIAGRAM:
while (Echo==0);
TMR1ON = 1;
while (Echo==1);
TMR1ON = 0;
void main()
{
TRISD = 0x00; //PORTD declared as output for interfacing LCD
TRISB1 = 0; //Trigger pin of US sensor is sent as output pin
TRISB2 = 1; //Echo pin of US sensor is set as input pin
TRISB3 = 0; //RB3 is output pin for LED
T1CON=0x20;
while(1)
{
calculate_distance();
if (distance>5)
{
RC4=0; RC5=1; //Motor 1 forward
RC6=1; RC7=0; //Motor 2 forward
}
calculate_distance();
if (RD2==0 && RD3==1 && distance<=5) //Left sensor is blocked
{
back_off();
RC4=1; RC5=1; //Motor 1 stop
RC6=1; RC7=0; //Motor 2 forward
__delay_ms(500);
}
calculate_distance();
if (RD2==1 && RD3==0 && distance<=5) //Right sensor is blocked
{
back_off();
RC4=0; RC5=1; //Motor 1 forward
RC6=1; RC7=1; //Motor 2 stop
__delay_ms(500);
}
calculate_distance();
if (RD2==0 && RD3==0 && distance<=5) //Both sensors are open
{
back_off();
RC4=0; RC5=1; //Motor 1 forward
RC6=1; RC7=1; //Motor 2 stop
__delay_ms(500);
}
calculate_distance();
if (RD2==1 && RD3==1 && distance<=5) //Both sensors are blocked
{
back_off();
RC4=1; RC5=0; //Motor 1 reverse
RC6=1; RC7=1; //Motor 2 stop
__delay_ms(1000);
}
}
}
Final Result