Submitted By:-Aryan Raj
Department of Electronics & Communication
College:- IET , Alwar
Guided By: -Vineet Sharma
HP Summer Training,
Introduction to Embedded System
Types of Embedded System
Properties & Application of Embedded System
IDE & Programmer
Analog to Digital Converter
Introduction to Robotics
History of Robotics
Law of Robotics
Motor & Motor Drivers
Embedded system Sensors , actuators
INTRODUCTION TO EMBEDDED SYSTEM
Embedded system is a scaled down computer which is design to perform a
An Embedded system is a software program on a hardware chip designed for
specific purpose and can also contain some moving parts.
Basic flow diagram for Embedded system :-
TYPES OF EMBEDDED SYSTEM
NON-REAL TIME EMBEDDED SYSTEM :- It is one in which there is no deadline ,
even if fast response or high performance is desired or preferred.
Some application are :-
• Security System
• Mobile & PDA
• Alarm System
• Automobile System
• Digital Camera
REAL TIME EMBEDDED SYSTEM :-where deadline is to be met.
Some application are :-
• Sensor System in Nuclear Plants
• Missile Defense System
• Flight Control System
• Anti-collision System in Automobile
PROPERTIES OF EMBEDDED SYSTEM
Small in size
Easy to design
Low power required
APPLICATION OF EMBEDDED SYSTEM
Memory storage device
Environment monitoring system
Flight control system
Engine control system………….. etc. ………
A Microcontroller is a programmable digital processor with necessary peripherals. It is
complex sequential digital circuit meant to carry out job according to the program.
Sometimes analog I/O interface makes a part of microcontroller circuit of mixed mode.
Embedded(self-contained) 8-bit Microcontroller
16 to 32 bit Microcontroller
Digital Signal Processor
Built-in monitor Program
Built-in Program Memory
Facility to Interface External Memory
Internal Structure of Microcontroller Pin Configuration
IDE & Programmer
IDE (Integrated Development Environment) is used for developing code for
microcontroller. It is also known as Compiler.
Some Compiler are :-
• WINAVR (AVRGCC for window)
• Code Vision AVR
• AVR Studio
Programmer basically consist of two parts :-
Software(to open .hex file on your computer)
• AVR dude
• AVR Studio
• Pony Prog (Serial , Parallel)
Hardware(to connect microcontroller)
Input Output function are set by three registers for each PORT.
DDRX(Data Direction Register) :- Set whether a pin is Input or Output of PORTX.
* To make input set bit 0
* To make output set bit 1
For DDRB=0xD1(In hexadecimal)
*DDRX :- To set PORTX as I/O with a byte
*DDRX.y :- To set yth pin of PORTX as I/O with a bit.
PORTX(PORTX Data Register) :- This register set the value to corresponding port.
PINX(Data Read Register) :-This register is used to read the value of a PORT.
0 for Low input & 1 for High Input.
PORT-B PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0
Function Output Output Input Output Input Input Input Output
DDRB 1 1 0 1 0 0 0 1
PORT-A PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0
Value High High Low Low Low High High Low
PORTA 1 1 0 0 0 1 1 0
We need to interface an LCD to our microcontroller so that we can display output.
LCD are widely used in mobile , robotics , DVD player etc…
Types of LCD :-
• Text Display
• Graphics Display
Block diagram :-
Printing Function :-
itoa(int val , char arr)
ftoa(float val , char decimal_place , char arr)
Microcontroller Data RAM Code RAM ROM
Data Register Command Register Busy
ANALOG TO DIGITAL CONVERTER
ADC is used to convert physical quantity like temperature , pressure , etc into
electrical domain i.e. voltage.
A 8-bit ADC has a range of 0-255.
Input Voltage Output Voltage
Function for getting ADC :-
• Unsigned char read_adc(Unsign char adc_input)
• read_adc(3) (for PA3)
Timer is a register which is used to measure time interval. Timers have resolution
of 8 or 16 bits. Its value increase/decrease automatically at a predefined rate
(supplied by user) and this operation doesn’t need CPU’s intervention.
Timers in Atmega 16 :-
Timer 0, 8-bit
Timer 1, 16-bit consisting of two 8-bit parts , A & B
Timer 2, 8-bit
Timer Mode :-
Normal :- A timer running in normal mode will count up to its maximum value.
When it reaches this maximum value, it issue an overflow interrupt and reset the
value of timer to its original value.
PWM :- Pulse width modulation mode is used to generate pulse with Fixed
frequency(F) and variable Duty cycle(D).
D=OCR0/255 (non inverted)
CTC :- Clear timer on compare match mode is to generate pulse with fixed Duty
cycle(D) and variable frequency(F)
Communication is a technique to transfer data from one system to another.
Different Communication technique :-
Modes of data transfer :-
Serial transmission:- 1.) Serial Peripheral Interface
2.) Universal Synchronous Asynchronous Receiver Transmitter
spi(1byte data); char c=spi(0); putchar(); getchar(); putsf();
at a time
A special event requires the CPU to stop normal program execution and perform
some service related to the event.
An interrupt is a signal that stop the current program forcing it to be execute
another program immediately.
Maskable Interrupt :- Can be ignored by CPU
Non-maskable Interrupt :-Can’t be ignored by CPU
Hardware Interrupt :- External Interrupt. There are three external interrupt in
Atmega 16 :- INT0 (Pin 16), INT1 (Pin 17), INT2 (Pin 3)
Overflow Interrupt :- When the timer register overflow
Compare Match Interrupt :- When value of timer become equal to a certain
Steps of Interrupt Programming :-
1. Initializing the interrupt vector table
2. Writing the interrupt service routine
3. Enabling the interrupt
INTRODUCTION TO ROBOTICS
Robotics is the science of designing and building robots suitable for real-life
application in automated manufacturing and other non-manufacturing environment.
What is Robot :-
A re-programmable, multifunctional manipulator designed to move material, parts,
tools, or specialized devices through various programmed motions for the
performance of a variety of tasks.
The word “ROBOT” is derived from the word ROBOTA which means ‘compulsory
Essential characteristics :-
Essential parts :-
Robot chassis and actuators
HISTORY OF ROBOTICS
One of the first robots was the Clepsydra or Water clock, which was made in 250
B.C. It was created by Ctesibius of Alexandria, a Greek physicist and inventor.
The earliest remote control vehicles were built by Nikola Tesla in 1890’s. Tesla is
best known as inventor of A.C electrical power, radio, induction motor, tesla coils,
and other electrical devices.
Other early robots (1940’s-50’s) were Grey Walter’s “Elsie the tortoise” and the
Jhons Hopkins “beast”. “Shakey” was a small unstable box on wheels that used
memory and logical reasoning to solve problem and navigate its environment. It
was developed by the Stanford Research Institute in Palo Alto, California in the
The General Electric Walking Truck was a large(3,000 pounds) four legged robot
that could walk up to 4 miles an hour. The walking truck was the first legged
vehicle with a computer-brain, developed by Ralph Moser at General Electric Corp.
in the 1960’s.
The first industrial robot were probably the “Unimates” , created by George Devol
and Joe Engleberger in the 1950’s and 60’s. Engleberger started the first robotics
company, called “Unimation” , and has been called the “father of Robotics”.
LAW OF ROBOTICS
Isaac Asimov’s three law of robotics :-
A robot may not injure a human being or through inaction, allow a
human being to harm them.
A robot must obey the orders given it by human beings except where
such order would conflict with the first law.
A robot must protect its own existence as long as such protection does
not conflict with the first or second law.
MOTOR AND MOTOR DRIVERS
Motor is a device which convert electrical energy into mechanical energy. It is
used to give movement and design control system.
Some motor used in Embedded system and Robotics:-
Geared DC Motor
It is an electronics circuit which enables a voltage to be applied across a load in
With an H-Bridge, a microcontroller, logic chip, or remote control can electronically
command to motor to go forward, reverse, brakes, and coast.
Motor Driver :-
S1 S2 S3 S4 Result
1 0 0 1 Rotate in one
0 1 1 0 Rotate in opposite
0 0 0 0 Coasts(free run)
1 0 1 0 Brakes
1 0 1 0 Brakes
A sensor is a device that measures a physical quantity and convert it into a signal
which can be read by an observer and instrument.
Some Sensors are :-
Temperature Sensor :-
Used to measure temperature intensity
Some temperature sensors are LM35, DS1621, & Thermistor.
Light Sensor :-
Used to measure light intensity
Some light Sensor are LDR, photo diode, photo transistor, TSOP1738.
IR (Analog) Sensor :-
It consist of An Infra Red emitting diode as transmitter & a Photodiode as receiver.
Output varies from 0-5v depending upon the amount of IR received.
Output can be taken to a microcontroller either to its ADC or LM 339 can be used
as a comparator.
IR (Digital) Sensor :-
It is logic 1 when IR below a threshold is falling on it and logic 0 when it receive IR
above threshold. TSOP 1738 is a digital IR sensor.
It only respond to IR falling on it at a pulse rate of 38 kHz so it have high immunity
against ambient light.
No comparator is required and range of sensor can be varied by varying the
intensity of IR emitting diode.