3. Basic Electrical knowledge
Resistor symbol
LED symbol, positive pin on the left,
negative pin on the right
Each electronic component has a schematic symbol, which is a simplified drawing
of the part. For resistors the symbol looks like this:
And the symbol for LED's look like this:
You can see that the resistor symbol is symmetric, just like resistors themselves.
The LED symbol, however, has an arrow thing going on. This is the direction in
which current flows. The little arrows that are coming out of the symbol indicate
that this is a diode that emits light.
Power and Ground symbols
4. Basic Electrical knowledge
The only thing we need to do now is indicate
how the LED and resistor are hooked up and
show the 5V and ground connections.
Next to symbols, we often write important
information like what the resistor value is,
what color and size the LED should be,
and the voltage associated with the power
supply.
5. Quiz!
LED #1 has a 100 ohm resistor (Brown Black Brown)
LED #2 has a 1.0K (Brown Black Red)
LED #3 has a 10K (Brown Black Orange).
Which LED is brightest?
Which LED is dimmest ?
If we had an LED with a resistor that was 5K ohms, which LED would it
be brighter than? Which LED would it be dimmer than?
10. What is a sensor?
A device that receivesa stimulus and respondswith an
electricalsignal.
A special type of transducer(device that convertsone
type of energyinto another
12. Sensors (Transducers)
Two basiccategories:
1. Analog
2. Discrete
Binary
Digital (e.g., pulse counter)
Examples
Temperature
RFID
Barcode
Proximity
Vision
Gyroscope
Compass
Tilt/Acceleration
Ultrasonic
(distance)
Light
(light intensity)
Touch
Sound
(db pressure)
13. Common Sensors
Mechanical
Accelerometers
Gyroscopes
Optical
Photodetectors
Infrared
Semiconductor
Gas
Temperature
Magnetic
14. Example: Simple temperature sensor
A RTD is a thermoresistive temperature sensor. It is a metal element
(in a ceramic tube) whose resistance typically increases with
temperature, according to a known function.
A linear approximation is given by
Where a is the temperature coefficient, T is the temperature in Kelvin
and R0 the resistance in a known temperature
15. Example
Calculate the temperature for a copper RTD if R0 = 500Ω and room
temperature and a = 0.0043. The measured resistance is 500.43Ω
17. Sensors
Photo Resistor:
- The value of the resistance depends
on the incident light density.
- 1 K-Ohm at light, 10 K-Ohm at
darkness.
Photo Diode:
- The current is controlled by the incident light density.
Photo Transistor:
- Base-emitterjunction is controlled
by the incident lightdensity,has an
amplificationeffect.
18. Sensor Characteristics (1/4)
Range
Full Scale Range
Operating Voltage Range
Accuracy
Transfer Function
S=F(x), where x is the measurand and S the electrical signal
(commonly Voltage)
Sensitivity
The change in input required to generate a unit change in output
20. Sensor Characteristics (3/4)
Error: the difference between the measured value and true value
Systematic errors are reproducible inaccuracies that can be
corrected with compensation methods
Interference errors
Operator errors etc.
Random error
Noise
21. Example: Smoke sensor (1/2)
An MQ-2 smoke sensor reports smoke by the voltage level it puts out.
The more smoke there is, the higher the voltage.
built-in potentiometer for adjusting sensitivity
Three pins:
Vdd input
Ground input
Analog output
24. Actuators (Transducer)
Hardware devices that convert
a controller command signal into a change in a physical
parameter
The change is usually mechanical (e.g., position or
velocity)
Signal Processing
& Amplification
Mechanism
Electric Hydraulic
Pneumatic
Final Actuation
Element
Actuator
Sensor
Logical
Signal
25. Types of Actuators
1. Electrical actuators
Electric motors
DC servomotors
AC motors
Stepper motors
Solenoids
2. Hydraulic actuators
Use hydraulic fluid to amplify the controller command signal
3. Pneumatic actuators
Use compressed air as the driving force
26. Actuators
Device that turns energy (typically electrical) to
motion
Features
Force
Speed
Torque
Power
Efficiency
27. DC motor
Force is produced (F=ILB)
due to the electric current in
a wire inside a magnetic field.
Proportional to the current,
therefore can be controlled by
potentiometer
Hard to control precisely
28. Servo motors
A DC motor with a control circuit
Servo motors are controlled by PWM through the
control pin
29. Servo motor control
#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup() {
int val = 180; // variable to control servo
myservo.attach(9); // pin 9 is a PWM pin
}
void loop() {
myservo.write(val); // constant servo speed
delay(15); // waits for the servo to get there
}
30. Stepper Motors
motor controlled by a series of electromagnetic coils.
The center shaft has a series of magnets mounted on it
the coils are alternately given current or not, creating
magnetic fields which repulse or attract the magnets on the
shaft, causing the motor to rotate.
allows for very precise control of the motor. it can be
turned in very accurate steps of set degree increments
two basic types
unipolar
bipolar
31. Example: Unipolar stepper motor
Four digital pins required to
control the motor
Darlington transistor array
used for supplyingthe power
required
32. Stepper motor control
#include <Stepper.h> //the control sequence is in this library
const int stepsPerRevolution = 200; // motor-dependent
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); //pins used
void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(60); //actually sets the delay between steps
}
void loop() {
// step one revolution in one direction:
myStepper.step(stepsPerRevolution);
delay(500);
}
33. Actuators (Transducer)
Hardware devices that convert
a controller command signal into a change in a physical
parameter
The change is usually mechanical (e.g., position or
velocity)
Signal Processing
& Amplification
Mechanism
Electric Hydraulic
Pneumatic
Final Actuation
Element
Actuator
Sensor
Logical
Signal
36. Digital? Analog?
• Digital has two values: on and off
• Analog has many (infinite) values
• Computers don’t really do analog, they quantize
• Remember the 6 analog input pins---here’s how
they work
todbot.com/blog/bionicarduino
38. Digital Input/Output
Digital IO is binaryvalued—
it’s either on or off, 1 or 0
Internally, all
microprocessors are digital,
why?
1
0
39. Analog-to-Digital Conversion
Sampling – converts the continuoussignal intoaseries of discrete analog signalsat
periodic intervals
Quantization – each discreteanalog isconverted intooneof a finitenumber of
(previouslydefined)discrete amplitudelevels
Encoding – discrete
amplitude levels are
converted intodigital code.
Variable
Time
Analogue Signal
Discrete
Variables
40. Hardware Devices in
Analog-to-Digital Conversion
Analog
Digital
Converter
Transformation Process
Sensors
& Transducer
Other Signals
Continuous
Variable
Signal
Conditioner
Multiplexer
Digital
Computer
Amplifer
41. Features of an ADC
Sampling rate – rate at which continuous analog signal is polled e.g.
1000 samples/sec
Quantization – divide analog signal into discrete levels
Resolution – depends on number of quantization levels
Conversion time – how long it takes to convert the sampled signal to
digital code
Conversion method – means by which analog signal is encoded into
digital equivalent
Example – Successive approximation method
42. Input/Output Devices
Binary data:
Contact input interface – input data to computer
Contact output interface – output data from computer
Discrete data other than binary:
Contact input interface – input data to computer
Contact output interface – output data from computer
Pulse data:
Pulse counters - input data to computer
Pulse generators - outputdata from computer
43. Embedded Systems
System
Embedded System
Components
Classifications
Processors
Other Hardware
Software
Applications
44. Systems
A system is a way of working, organizing or doing one or many tasks
according to a fixed plan, program or set of rules.
WATCH
It is a time display SYSTEM
Parts: Hardware, Needles,Battery, Dial, Chassis and Strap
WASHING MACHINE
It is an automatic clotheswashing SYSTEM
Parts: Status display panel, Switches& Dials,
Motor, Power supply & control unit, Inner
water level sensor and solenoidvalve.
45. Embedded Systems
A system, that has computer hardware with software
embedded in it as one of its importantcomponents.
SOFTWAREPROGRAM
#include <16f876a.h>
#use delay (clock=20000000)
#byte PORTB=6
main()
{
set_tris_b(0);
portb=255; //decimal
delay_ms(1000);
portb=0x55; //hexadecimal
delay_ms(1000);
portb=0b10101010; //binary
delay_ms(500);
}
Its software embeds in
ROM (Read Only
Memory). It does not need
secondary memories as in
a computer
HARDWARE
46. Embedded Systems
We are surrounded by Embedded
Systems.
Cell Phones
Automatic Washing Machines.
Traffic Signals with Timers.
Automobile Electronics.
Find a system that contains no
electronic system.
How can a electronic system improve
the functionality/efficiency of that
system.
Custom design an embedded system
for the same.
Embedded Systems & Robotics Anish Goel 46
47. EMBEDDED SYSTEMS
Embedded system means the processor is
embedded into that application.
An embedded product uses a microprocessor
or microcontroller to do one task only.
In an embedded system, there is only one
application software that is typically burned
into ROM.
Example:printer, keyboard, video game
player
Embedded Systems & Robotics Anish Goel 47
48. Components of Embedded Systems
Hardware
Processor, Timers, Interrupt controller, I/O Devices, Memories,
Ports, etc.
Main Application Software
Which may perform concurrentlythe series of tasksor multiple
tasks.
Real Time Operating System (RTOS)
RTOS defines the way the system work.
52. SMALL SCALE EMBEDDED SYSTEM
Single 8 bit or 16bit Microcontroller.
Little hardware and software complexity.
They May even be battery operated.
Usually “C” is used for developing these system.
The need to limit power dissipationwhen system is running
continuously.
Programming tools:
Editor, Assembler and Cross Assembler
53. MEDIUM SCALE EMBEDDED SYSTEM
Single or few 16 or 32 bit microcontrollers or Digital Signal
Processors (DSP) or Reduced Instructions Set Computers
(RISC).
Both hardwareand software complexity.
Programming tools:
RTOS, Source code Engineering Tool, Simulator,
Debuggerand Integrated DevelopmentEnvironment (IDE).
54. SOPHISTICATED EMBEDDED SYSTEM
Enormous hardware and software complexity
Which may need scalable processor or configurable processor and
programming logic arrays.
Constrained by the processing speed available in their hardware units.
Programming Tools:
For these systems may not be readily available at a reasonable
cost or may not be available at all. A compiler or retargetable compiler
might have to be developed for this.
55. PROCESSOR
A Processor is the heart of the Embedded System.
For an embedded system designer knowledge of microprocessor
and microcontrolleris a must.
Two Essential Units: Operations
Control Unit (CU), Fetch
Execution Unit (EU) Execute
56. VARIOUS PROCESSOR
1. General Purpose processor (GPP)
Microprocessor
Microcontroller
Embedded Processor
Digital signal Processor
2. ApplicationSpecific System Processor (ASSP)
3. Multi Processor System using GPPs
57. MICROPROCESSOR
A microprocessor is a single chip semi conductor device also which
is a computer on chip, but not a completecomputer.
Its CPU contains an ALU, a program counter, a stack pointer, some
working register, a clock timing circuit and interrupt circuit on a
singlechip.
To make complete micro computer, one must add memory usually
ROM and RAM, memory decoder, an oscillator and a number of
serial and parallel ports.
58. MICROPROCESSORS
MICRO + PROCESSOR
Length of transistor is in micron region.
This length becomes half every eighteen months
Moore’s Law stated by Gordan Moore.
More transistors per chip.
Embedded Systems & Robotics Anish Goel 58
59. Different aspects of a microprocessor/controller
Hardware :Interface to
the real world
Software :order how to
deal with inputs
Embedded Systems & Robotics Anish Goel 59
60. Microprocessors:
General-purposemicroprocessor
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example:Intel’s x86, Motorola’s 680x0
Embedded Systems & Robotics Anish Goel 60
CPU
General-
Purpose
Micro-
processor
RAM ROM I/O
Port
Timer
Serial
COM
Port
Data Bus
Address Bus
General-Purpose Microprocessor System
Manychips on mother’s board
61. MICROCONTROLLER
A microcontroller is a functional computer system-on-a-chip. It contains a
processor, memory, and programmable input/output peripherals.
Microcontrollers include an integrated CPU, memory (a small amount of RAM,
program memory, or both) and peripherals capable of input and output.
INTEL PIC
8031,8032,8051,8052,8751,8752 8-bit PIC16, PIC18,
16-bit DSPIC33 / PIC24, PIC16C7x
Motorola
MC68HC11
62. Microcontroller :
A smaller computer
On-chip RAM, ROM, I/O ports...
Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC
16X
Embedded Systems & Robotics Anish Goel 62
RAM ROM
I/O
Port
Timer
Serial
COM
Port
Microcontroller
CPU
A single chip
65. MICROPROCESSOR Vs MICROCONTROLLER
MICROPROCESSOR MICROCONTROLLER
The functional blocks are ALU,
registers, timing & control units
It includes functional blocks of
microprocessors & in addition has
timer, parallel i/o, RAM, EPROM, ADC &
DAC
Bit handling instruction is less, One or
two type only
Many type of bit handling instruction
Rapid movements of code and data
between external memory & MP
Rapid movements of code and data
within MC
It is used for designing general
purpose digital computers system
They are used for designing
application specific dedicated systems
67. Microprocessors and Computer Architecture.
What is needed to make systems smart????
Human Brain !!!
We are surrounded by microprocessors.
Where are they???
In cell phones.
In cars.
Smallest electronic system you can think of.
Largest system you can think of.
They are there is Shoes as well.
What???? In shoes???
What would a piece of semi-conductor do in a shoes?
Embedded Systems & Robotics Anish Goel 67
68. Why Microprocessors?
They will act as brain of the system.
They add intelligence to the system.
They can be programmed to perform a task.
Once programmed, they make the system work automatically.
Computer Architecture!
Specialized branch that deals with the Microprocessor
Architecture.
For instance:
What is the memory requirement of the system.
How many input and output devices are to be connected to the system.
Embedded Systems & Robotics Anish Goel 68
69. Block Diagram of a Computer
Embedded Systems & Robotics Anish Goel 69
70. Layers of a Computer System
High Level Sum := Sum + 1
Assembly MOV BX,SUM INC (BX)
Machine 1101010100001100001000110111010111110
Register Transfer Fetch Instruction, Increment PC, Load ALU with SUM
...
Gate
Circuit
Embedded Systems & Robotics Anish Goel 70
71. CPU PLATFORM
ARM
Power PC
x86
Intel 8051
Atmel AVR
MSP-430
MC68HC12
Embedded Systems & Robotics Anish Goel 71
72. PERIPHERALS
Serial Communication Interfaces (SCI): RS-232, RS-422, RS-485 etc
Synchronous Serial Communication Interface: I2C, JTAG, SPI, SSC
and ESSI
Universal Serial Bus (USB)
Networks: Ethernet, Controller Area Network, LonWorks, etc
Timers: PLL(s), Capture/Compare and Time Processing Units
Discrete IO: General Purpose Input/Output (GPIO)
Analog to Digital/Digital to Analog Converter (ADC/DAC)
Embedded Systems & Robotics Anish Goel 72
74. FEATURES OF A MICROCONTROLLER
Central Processing Unit - ranging from small and simple 8-bit
processors to sophisticated 32- or 64-bit processors
Input/Output Interface such as serial ports
Peripherals such as timers and watchdog circuits
RAM for data storage
ROM, EEPROM or Flash Memory program storage
Clock Generator - often an oscillator for a quartz timing crystal,
resonator or RC circuit
Embedded Systems & Robotics Anish Goel 74
76. EMBEDDED PROCESSOR
Special microprocessors & microcontrollers often called,
Embedded processors.
An embedded processor is used when fast processing fast
context-switching & atomic ALU operations are needed.
Examples : ARM 7, INTEL i960, AMD 29050.
77. DIGITAL SIGNAL PROCESSOR
DSP as a GPP is a single chip VLSI unit.
It includes the computational capabilities of microprocessor
and multiply & accumulate units (MAC).
DSP has large number of applications such as image
processing, audio, video & telecommunication processing
systems.
It is used when signal processing functions are to be processed
fast.
Examples : TMS320Cxx, SHARC, Motorola 5600xx
78. APPLICATION SPECIFIC SYSTEM PROCESSOR
ASSP is dedicated to specific tasks and provides a faster
solution.
An ASSP is used as an additional processing unit for running
the application in place of using embedded software.
Examples : IIM7100, W3100A
79. OTHER HARDWARE
Power Source
Clock Oscillator
Real Time Clock (RTC)
Reset Circuit, Power-up Reset and watchdog timer Reset
Memory
I/O Ports, I/O Buses
Interrupt Handler
DAC and ADC
LCD and LED Display
Keypad/Keyboard