SUMMER INTERNSHIP REPORT
on
EMBEDDED SYSTEMS DESIGN
Internship project report submitted in partial fulfilment of the requirements for
the award of degree
BACHELOR OF TECHNOLOGY IN
ELECTRONICS AND COMMUNICATION ENGINEERING
SUBMITTED BY
D.VISAL VIDYA DEEP
(21001A0409)
Under the guidance of
PROF. V. SUMALATHA
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY
ANANTAPUR COLLEGE OF ENGINEERING
(Autonomous)
ANANTAPURAM –
515002 ANDHRA
1
PRADESH
2
JNTUA COLLEGE OF ENGINEERING (Autonomous)
ANATAPURAMU, ANDHRA PRADESH
DEPARTMENTS OF ELECTRONICS AND COMMUNICATION
ENGINEERING
CERTIFICATE
This is to certify that the internship entitled, “EMBEDDED SYSTEM
DESIGN”, is A work of D.Visal vidya deep, bearing admission number:
21001A0409, submitted to the faculty of ELECTRONICS AND
COMMUNICATION ENGINEERING , in partial fulfillment of requirements
for the award of the degree of BACHELOR OF TECHNOLOGY in
ELECTRONICS AND COMMUNICATION ENGINEERING, JNTUA
COLLEGE OF ENGINEERING, ANANTHAPURAMU, at
YOUNGMINDS SOLUTIONS.
Signature of Guide Signature of HOD
PROF. V. SUMALATHA DR. G. MAMATHA
DEPT of ECE DEPT of ECE
3
DECLARATION
I, D.VISAL VIDYA DEEP bearing admission number 21001A0409
hereby declare that the summer internship entitled “EMBEDDED SYSTEM
DESIGN” is a bonafide work carried out by me and the results embodied in
this internship report have not been reproduced or copied from any source.
The work carried out and results embodied in this report have not been
submitted to any other University or Institution for the award of any degree or
diploma.
D.VISAL VIDYA DEEP
21001A0409
Place: Tirupati
Date: 27/ 07 /2024
4
5
6
ACKNOWLEDGEMENT
I have immense pleasure in successful completion of this work titled:
EMBEDDED SYSTEM DESIGN
The special treatment of YOUNGMINDS SOLUTIONS online that always
supports educational activities, facilitated our work on this summer training.
It is with the immense pleasure that I would like to express my indeed gratitude
to my Guide PROF. V. SUMALATHA, Electronics and Communication
Engineering Department, who guided me to do Project work. I thank HER for
the simulating guidance, constant encouragement and constructive criticism
which have made possible to bring out this project work.
I am greatly indebted to Dr .G. MAMATHA, Head of the Electronics and
Communication Engineering Department. His advice and patience are greatly
appreciated for providing outstanding facilities for completion of project.
I express my sincere thanks to the principal of JNTUA College of engineering
(Autonomous), Anantapur DR.S.V. SATYANARAYANA for his
encouragement and for providing opportunity for the students with the advent of
internship after the completion of third year.
7
ABSTRACT
Since we have a keen interest in knowing new things especially related to the area of
EMBEDDED SYSTEMS. We selected a topic related to the area of this field.
As we want to enhance our career from the EMBEDDED SYSTEM DESIGN which
is also our core subject, the research made by us to complete this project will prove to
be very helpful.
The main objective of our project on the topic "EMBEDDED SYSTEM DESIGN" is
to study the depth knowledge about the behaviour and designing of different
electronics devices. With the use of Embedded C, designing of practical electronic
devices has become much easier than before.
So, we would like to clearly mention that, our project purely involves the basic
concepts of embedded systems and their designing using embedded c and proteus
software.
8
TABLE OF CONTENTS
SL.NO DESCRIPTION PAGE.NO
1 INTRODUCTION 8
2 CLASSIFICATION OF EMBEDDED SYSTEMS 10
3 COMPONENTS 12
4 INTRODUCTION TO EMBEDDED C 15
5 ULTRASONIC RANGEFINDER USING 8051 16
6 PROJECT 23
7 CONCLUSION 26
9
1. INTRODUCTION
Introduction to Embedded System
Embedded System is an integrated system that is formed as a combination of
computer hardware and software for a specific function. It can be said as a dedicated computer
system has been developed for some particular reason. But it is not our traditional computer system
or general-purpose computers, these are the Embedded systems that may work independently or
attached to a larger system to work on a few specific functions. These embedded systems can work
without human intervention or with little human intervention.
A system designed with the embedding of hardware and software together for a
specific function with a larger area is embedded system design. In embedded system design, a
microcontroller plays a vital role. Micro-controller is based on Harvard architecture, it is an
important component of an embedded system. External processor, internal memory and i/o
components are interfaced with the microcontroller. It occupies less area, less power consumption.
The application of microcontrollers is MP3, washing machines.
.
Applications of Embedded system
1. Smart Homes: Smart homes are becoming increasingly popular, and embedded systems play
a significant role in making them possible. Embedded systems are used in smart thermostats,
lighting systems, and security systems, among others. These systems can be controlled
remotely, making it possible to manage your home from anywhere in the world.
2. Healthcare Devices: Embedded systems are used in healthcare devices such as insulin
pumps, pacemakers, and blood glucose monitors. These devices require real-time responses,
and embedded systems provide the necessary speed and accuracy.
3. Automotive: Embedded systems are used in automotive applications such as anti-lock
braking systems, airbag control systems, and engine management systems. These systems
provide real- time responses, making them essential for ensuring the safety of drivers and
passengers.
4. Consumer Electronics: Embedded systems are used in consumer electronics such as
smartphones, tablets, and smartwatches. These systems provide the necessary speed and
accuracy to ensure that these devices work seamlessly.
5. Industrial Automation: Embedded systems are used in industrial automation applications
such as process control systems, robotics, and factory automation systems. These systems
provide real-time responses, making them essential for ensuring the smooth operation of
industrial processes.
10
6. Aerospace: Embedded systems are used in aerospace applications such as aircraft control
systems, navigation systems, and communication systems. These systems provide the
necessary speed and accuracy to ensure the safety of passengers and crew.
7. Military: Embedded systems are used in military applications such as missile guidance
systems, radar systems, and communication systems. These systems provide the necessary
speed and accuracy to ensure the success of military operations.
Some Embedded System Based Real-Time Project Ideas
1. Smart Traffic Management System: A smart traffic management system can be developed
using embedded systems. The system can detect the number of vehicles on the road and
adjust the traffic signals accordingly. This system can help reduce traffic congestion and
improve traffic flow.
2. Smart Irrigation System: A smart irrigation system can be developed using embedded
systems. The system can detect the moisture level in the soil and adjust the water supply
accordingly. This system can help conserve water and improve crop yields.
3. Smart Home Automation System: A smart home automation system can be developed
using embedded systems. The system can control the lighting, temperature, and security
systems in your home. This system can help improve energy efficiency and enhance home
security.
4. Smart Health Monitoring System: A smart health monitoring system can be developed
using embedded systems. The system can monitor a person’s vital signs and alert healthcare
professionals in case of an emergency. This system can help improve patient outcomes and
reduce healthcare costs.
5. Autonomous Vehicles: Autonomous vehicles are becoming increasingly popular, and
embedded systems play a significant role in making them possible. Embedded systems are
used in autonomous vehicle control systems, navigation systems, and communication
systems, among others. These systems provide the necessary speed and accuracy to ensure
the safety of passengers and pedestrians.
6. Smart Grid: A smart grid can be developed using embedded systems. The system can
monitor energy consumption and adjust the supply accordingly. This system can help
improve energy efficiency and reduce energy costs.
7. Smart Farming: Smart farming can be developed using embedded systems. The system can
monitor soil moisture, temperature, and nutrient levels, among others. This system can help
improve crop yields and reduce water usage.
11
CLASSIFICATION OF EMBEDDED SYSTEMS
Embedded systems can be classified into different types, based on different criteria:
(a) Classification based on generation
(b) Classification based on complexity and performance
(c) Based on functional requirements
(d) Classification based on deterministic behaviour
(e) Classification based on Triggering
(a) Classification based on generation
First generation (1G):
Built around 8-bit microprocessors like Intel 8085, Zilog Z80.
Second generation (2G):
Built around 16-bit microprocessors and 8-bit/16-bit
microcontrollers Ex: Intel 8086 processor, 8051 microcontroller
Third generation (3G):
Built around 32-bit microprocessors and 16-bit/32-bit
microcontrollers Ex: Pentium, Motorola 68K, MSP430, ARM,
TMS320
Fourth generation:
Built around 64-bit microprocessors 32-bit microcontrollers.
Examples: Smart Phones, Mobile Internet Devices, High speed network routers
b) Classification based on Complexity and performance
Small-scale Embedded systems:
Embedded systems which are simple in application needs and where
the performance requirements are not time-critical.
Built around low performance and low cost 8 bit or 16 bit
μp/μc. Medium-scale Embedded systems:
These are slightly complex in hardware and firmware requirements.
Built around medium performance 16 or 32-bit microcontrollers, DSPs,
RISCs Large-scale / Complex / Sophisticated Embedded systems:
Highly complex hardware and firmware.
12
(c) Classification based on functional requirements
Stand-alone embedded systems
As the name implies, stand-alone systems work in stand-alone mode.
They take inputs, process them and produce outputs.
The inputs can be electrical signals from transducers / commands
from human being such as pressing of a button.
The outputs can be electrical signals to drive another system, an LED display
/ LCD display/DC motors.
Real time systems
Real-Time Embedded System is strictly time specific which means
these embedded systems provides output in a particular/defined time
interval.
Networked Information appliances
Embedded systems that are provided with network interfaces and
accessed by networks such as Local Area Network (LAN) or Internet are
called as Networked Information appliances.
Such embedded systems are connected to a network, typically a network
running TCP/IP (Transmission Control Protocol/ Internet Protocol)
protocol
suite. They run the complete TCP/IP protocol stack and can
communicate with other nodes on the network.
Mobile devices
Mobile embedded systems are compact, easy to use and require fewer
resources. These are portable embedded devices like mobile phones,
digital cameras, mp3 players and personal digital assistants, etc.
(d) Classification based on deterministic behaviour
The embedded system under this classification is based on the deterministic behaviour
of an embedded system. Based on the execution behaviour, the embedded systems are
classified into hard real-time systems and soft real-time systems
Hard Real-Time Embedded systems:
A real-time system should strictly adhere to the timing constraints for a task.
A hard real-time system must meet the timing deadlines without any delay.
Soft Real-Time Embedded systems:
The real time embedded system which does not guarantee meeting deadlines,
but offer the best effort to meet the deadline are called as ‘Soft Real-Time
embedded systems.
Missing deadlines for tasks are acceptable for soft real-time systems, but the
frequency of deadlines missing should be within the compliance limit of the
Quality of Service (QoS).
13
COMPONENTS
MICROCONTROLLER
A microcontroller is a self-contained desktop that can be utilized in an embedded system. A few
microcontrollers may run at clock rate rates and use four-bit expressions. Because many of the
devices they control are battery-operated, microcontrollers must often be low-power.
Microcontrollers are found in a wide range of products, including consumer electronics,
automobile engines, computer peripherals, and test and measurement equipment. These are also
well-suited to long-term battery usage. The vast majority of microcontrollers in use today are
embedded in other devices.
Microcontrollers are programmable, which means that they can be customized to perform specific
tasks. The programming languages used to write code for microcontrollers vary depending on the
manufacturer and the type of microcontroller. Some of the commonly used programming
languages include C, C++, and assembly language.
Introduction to 8051 Microcontroller
8051 is one of the first and most popular microcontrollers also known as MCS-51. Intel introduced
it in the year 1981. Initially, it came out as an N-type metal-oxide-semiconductor (NMOS) based
microcontroller, but later versions were based on complementary metal-oxide-
semiconductor(CMOS) technology. These microcontrollers were named 80C51, where C in the
name tells that it is based on CMOS technology. It is an 8-bit microcontroller which means the data
14
bus is 8-bit. Therefore, it can process 8 bits at a time. It is used in a wide variety of embedded
systems like robotics, remote controls, the automotive industry, telecom applications, power tools,
etc.
Block diagram of 8051 microcontroller
ULTRASONIC SENSORS
Ultrasonic transducers and ultrasonic sensors are devices that generate or sense ultrasound
energy. They can be divided into three broad categories: transmitters, receivers and
transceivers. Transmitters convert electrical signals into ultrasound, receivers convert
ultrasound into electrical signals, and transceivers can both transmit and receive ultrasound.
An ultrasonic sensor is an instrument that measures the distance to an object using ultrasonic
sound waves.
An ultrasonic sensor uses a transducer to send and receive ultrasonic pulses that relay back
information about an object’s proximity.
High-frequency sound waves reflect across boundaries to produce distinct echo patterns.
Ultrasonic sensors work by sending out a sound wave at a frequency above the range of
human hearing. The transducer of the sensor acts as a microphone to receive and send the
ultrasonic sound. Our ultrasonic sensors, like many others, use a single transducer to send a
pulse and to receive the echo. The sensor determines the distance to a target by measuring
time lapses between the sending and receiving of the ultrasonic pulse.
15
HOW SENSORS WORK:
The working principle of this module is simple. It sends an ultrasonic pulse out at 40 kHz,
which travels through the air, and if there is an obstacle or object, it will bounce back to the
sensor. By calculating the travel time and the speed of sound, the distance can be calculated.
Ultrasonic sensors are a great solution for the detection of clear objects. For liquid level
measurement, applications that use infrared sensors, for instance, struggle with this
particular use case because of target translucence.
For presence detection, ultrasonic sensors detect objects regardless of color, surface, or
material (unless the material is very soft, like wool, as it would absorb sound).
To detect transparent and other items where optical technologies may fail, ultrasonic sensors
are a reliable choice.
LCD DISPLAY:
LCD is a flat display technology, stands for "Liquid Crystal Display," which is generally used in
computer monitors, instrument panels, cell phones, digital cameras, TVs, laptops, tablets, and
calculators. It is a thin display device that offers support for large resolutions and better picture
quality. The older CRT display technology has replaced by LCDs, and new display technologies
like OLEDs have started to replace LCDs. An LCD display is most commonly found with Dell
laptop computers and is available as an active-matrix, passive-matrix, or dual-scan display. The
picture is an example of an LCD computer monitor.
The LCD displays are not only different in terms of heavy than CRT monitors; even the process of
working of them is also different. An LCD contains a backlight rather than the firing electrons at a
glass screen, which offers light to individual pixels arranged in a rectangular grid. All pixels have a
16
sub-pixel, red, green, and blue, which can be turned on or off. The display appears black if all of a
pixel's sub-pixels are turned off and appears white if all the sub-pixels are turned on 100%. The
millions of color combinations can be possible with the help of adjusting the individual levels of
red, green, and blue light.
As compared to CRT technology, LCD consumed much less power and allowed displays to be
much thinner that also made them very less heavy. Instead of emitting light, LCDs work on the
principle of blocking light. In an LCD, where an LED ejects light, the liquid crystals produce a
picture with the help of using a backlight. Also, while comparing with gas-display and LED
displays, LCDs consume less energy.
EMBEDDED C PROGRAM
Embedded C is most popular programming language in software field for developing electronic
gadgets. Each processor used in electronic system is associated with embedded software.
Embedded C programming plays a key role in performing specific function by the processor. In
day- to-day life we used many electronic devices such as mobile phone, washing machine, digital
camera, etc. These all device working is based on microcontroller that are programmed by
embedded C.
In embedded system programming C code is preferred over other language. Due to the following
reasons:
o Easy to understand
o High Reliability
o Portability
o Scalability
The extension in C language is known as embedded C programming language. As compared to
above the embedded programming in C is also have some additional features like data types,
keywords and header file etc is represented by
#include<microcontroller name.h>
17
o
ULTRA SONIC RANGE FINDER USING 8051
We have different ways to measure the distance. One way is to use Ultra Sonic Sensor or Module
for distance measurement. This article explains you how to measure the distance using 8051
microcontroller. This Ultrasonic Range Finder system measures the distance up to 4 meters with an
accuracy of 3 mm.
Principle of Ultrasonic Rangefinder
Generally, the distance can be measured using pulse echo and phase measurement method. Here, the
distance can be measured using pulse echo method. The ultrasonic module transmits a signal to the
object, then receives echo signal from the object and produces output signal whose time period is
proportional to the distance of the object. The mechanism of the ultra sonic sensor is similar to the
RADAR (Radio Detection and Ranging).
18
RADAR Concept
This circuit calculates the distance of the object based on the speed of the sound wave at normal
temperature and displays the distance on LCD.
Also Get an Idea about How to Interface 16×2 LCD with 8051 Microcontroller
Circuit Diagram of Ultrasonic Rangefinder using 8051
19
Components Required for Ultrasonic Rangefinder
AT89C51 Microcontroller
8051 Programming board
Programming cable
HC – SR04 Ultrasonic Module
16 x 2 LCD
10KΩ Potentiometer
10µF / 16V Electrolytic Capacitor
2 x 10KΩ Resistor (1/4 Watt)
0592 MHz Crystal
2 x 33pF Capacitors
Push Button
Connecting wires
Power Supply
Keil µVision Software
Proteus
Willar Software
20
21
Circuit Design of Ultrasonic Rangefinder
The major components in this project are AT89C51 Microcontroller, Ultrasonic Sensor and LCD
Display. The TRIGGER and ECHO pins of the Ultrasonic Sensor are connected to the P3.1 and
P3.2 pins respectively. LCD data pins are connected to the PORT1 of the microcontroller and
controller pins RS, RW and EN are connected to the P3.6, GND and P3.7 respectively. Here, the
LCD (Liquid Crystal Display) is used to display distance of the object. 10KΩ POT is used to vary
the contrast of the LCD. Power supply pins of the microcontroller, LCD and Ultrasonic Sensor
are connected to the 5V DC.
2
Ultrasonic Module (Ultrasonic Sensor)
HC – SR04 Ultrasonic Module works on the principle of SONAR and is designed to measure the
range of the object in small embedded projects. It offers excellent range detection with high
accuracy and stable readings. The operation of the module is not affected by the sunlight or black
material.
Features:
1. Resolution of this module is 3mm
2. Ranging distance is 2cm to 400cm (4 meters)
3. Angle measurement is 30 degrees
4. Trigger input pulse width is 10µs
5. Required current 15mA
6. Frequency 40 KHz
Pin Configuration:
1. Vcc: This pin is connected to the positive 5V DC.
2. Trigg: The trigger signal is applied to this pin for starting the transmission. This signal
must be HIGH for 10µs. When a valid trigger signal is applied, it generates 8 pulses of 40
KHz.
3. Echo: At this pin, module generates the signal whose time period is proportional to distance.
4. GND: This pin is connected to the ground.
How Ultrasonic Rangefinder using 8051 Circuit works?
When HIGH pulse of 10µs is applied to the TRIG pin, the ultrasonic module transmits 8
consecutive pulses of 40 KHz. after transmitting 8th pulse the ECHO pin of the sensor becomes
HIGH. When the module receives reflected signal from the object, the ECHO pin becomes LOW.
The time taken by the signal to leave and return to the sensor is used to find out the range of the
object.
Distance in centimeters = (Time/58)
Object distance in inches =
(Time/148)
Distance can also be calculated using speed of the ultrasonic wave 340m/s
21
Algorithm for Program
1. Send HIGH pulse for 10 micro seconds on TRIG pin
Initially P3.1 =
0; P3.1 = 1;
delay_ms (10);
P3.1 = 0;
2. Wait until the module transmits 40 KHz pulses. When 8thpulse is transmitted echo pin
becomes HIGH, TIMER0 starts counting, when input INT0 goes LOW and timer counts
the time
while (INT0 ==
0); while (INT0
== 1);
3. TIMER0 value is equal to the time taken by the signal to go forward and comeback so
we need to take only half time.
Time required = TIMER0 VALUE/2
4. The speed of the ultrasonic pulse is nothing but the speed of sound which is 340.29 m/s
or 34029 cm/s
5. Distance = speed * time = 34029 * (TIMER0) / 2
6. At 11.0592 MHz, TIMER0 gets incremented for 1µs.
Range = 17015 * TIMER0 X 10-6
22
7. Target range = TIMER0/58 cm.
23
How to Operate?
Build the circuit in proteus
Try interfacing ultrasonic sensor to display value.
Submit code and circuit in word format with
screenshots
CODE
#include<reg51.h>
#include<intrins.h>
#define lcd_data
P1 sfr16
DPTR=0x82;
sbit trig=P3^5;
sbit
echo=P3^2;
unsigned int
range=0; sbit
rs=P2^0;
sbit rw=P2^1;
sbit en=P2^2;
void
lcd_init();
void cmd(unsigned char a);
void dat(unsigned char b);
void show(unsigned char
*s); void lcd_delay();
void lcd_init()
{
cmd(0x38)
;
cmd(0x0e);
cmd(0x06)
;
cmd(0x0c);
cmd(0x80)
;
}
void cmd(unsigned char a)
{
lcd_data=a
; rs=0;
rw=0;
en=1;
lcd_delay();
en=0;
24
}
void dat(unsigned char b)
{
lcd_data=b
; rs=1;
rw=0;
en=1;
25
lcd_delay();
en=0;
}
void show(unsigned char *s)
{
while(*s) {
dat(*s++);
}
}
void lcd_delay()
{
unsigned int i;
for(i=0;i<=1000;i++);
}
void send_pulse(void)
{
TH0=0x00;TL0=0x00;
trig=1;
nop();nop();nop();nop();nop();
nop();nop();nop();nop();nop();
trig=0;
}
unsigned char ultrasonic()
{
unsigned char
get; send_pulse();
while(!echo);
while(echo);
DPH=TH0;
DPL=TL0;
TH0=TL0=0xff;
if(DPTR<38000)
get=DPTR/53;
else
get=0;
return get;
}
void main()
{
TMOD=0x09;
TH0=TL0=0;
TR0=1;
lcd_init();
show("DIS");
P3|=(2<<3);
while(1) {
26
cmd(0x84);
range=ultrasonic();
dat((range/100)+48);
dat(((range/10)%10)+48);
dat((range%10)+48);
}
}
27
CONCLUSION
This internship has provided me with a valuable hands-on experience in the field of embedded
systems design. I have gained a deeper understanding of the hardware and software components of
embedded systems, as well as the design process and tools used to develop them. I have also had
the opportunity to work on a real-world project, which has given me a taste of the challenges and
rewards of working in this field.
I am grateful for the opportunity to have interned at YoungMinds Solutions, and I am confident that
the skills and knowledge I have gained will be invaluable in my future career.
28