Unit - 05
Embedded Systems &
Sensors and Interfacing
Subject: Introduction to Electronics
Subject code: ESCO3
GENERAL-PURPOSE COMPUTERS
• Able to run a variety of software.
• Contain relatively high-performance
hardware components (fast
processors, data & program
storage).
• Require an operating system (OS).
Image Courtesy of
Recording Connection of Canada
1.1 WHAT IS AN EMBEDDED SYSTEM?
CH. 1: INTRODUCTION TO EMBEDDED SYSTEMS
GENERAL-PURPOSE COMPUTERS
Designed for heavy user interaction.
Uses a variety of peripherals (displays, keyboards, mice, internet
connections, wireless communication capability).
Expensive.
Use a group of integrated circuits or chips (ICs).
Several implementations need data memory and program storage.
Image Courtesy of
Recording Connection of Canada
1.1 WHAT IS AN EMBEDDED SYSTEM?
EMBEDDED COMPUTERS
Resources can be implemented on a single IC.
Include a variety of peripherals (timers, analog-to-digital converters, digital-
to-analog converters, serial interfaces).
Small size makes them very versatile.
Contains firmware (only the needed software which is not intended to be
changed frequently).
May contain Real Time Operating Systems (RTOS) which are used as a task
scheduler. Image Courtesy of
Recording Connection of Canada
Low cost.
1.1 WHAT IS AN EMBEDDED SYSTEM?
CH. 1: INTRODUCTION TO EMBEDDED SYSTEMS
EMBEDDED COMPUTERS
Image Courtesy of
Recording Connection of Canada
1.1 WHAT IS AN EMBEDDED SYSTEM?
Classification of ES
Based on Generation
Based on Complexity & Performance Requirements
Based on deterministic behavior
Based on Triggering
Classification based on Generation
1st Generation ES: built around 8-bit microprocessors like 8085 and Z80 and 4-bit
microcontrollers.
Example: Stepper motor control units, Digital Telephone Keypads etc.
2nd Generation ES: Built around 16-bit microprocessors and 8 or 16-bit microcontrollers
Example: SCADA, Data Acquisition Systems etc.
3rd Generation ES: Built around high performance 16/32 bit Microprocessors/controllers,
Application Specific Instruction set processors like Digital Signal Processors (DSPs), and
Application Specific Integrated Circuits (ASICs).The instruction set is complex and powerful.
Example: Robotics, industrial process control, networking etc.
4th Generation ES: built around System on Chips (SoC’s), Reconfigurable
processors and multicore processors. It brings high performance, tight
integration and miniaturization into the embedded device market.
Example: Smart phone devices etc.
1st Generation 8-bit µp and 4-bit µc
2nd Generation 16-bit µp and 8-bit µc
3rd Generation 32-bit µp and 16-bit µc
4th Generation 64-bit µp and 32-bit µc
Classification based on Complexity & Performance
Small Scale ES: Built around low performance and low cost 8 or 16 bit microprocessors/
microcontrollers. It is suitable for simple applications and where performance is not time
critical. It may or may not contain OS.
Medium Scale ES: Built around medium performance, low cost 16 or 32 bit microprocessors /
microcontrollers or DSPs. These are slightly complex in hardware and firmware. It may
contain GPOS/RTOS.
Large Scale/Complex ES: Built around high performance 32 or 64 bit RISC
processors/controllers. It requires complex hardware and software.
Classification Based on deterministic behavior
It is applicable for Real Time systems. The application/task execution behavior for
an embedded system can be either deterministic or non-deterministic
These are classified in to two types
1. Soft Real time Systems: Missing a deadline may not be critical and can be tolerated to
a certain degree.
Ex: DVD players.
2. Hard Real time systems: Missing a program/task execution time deadline can have
catastrophic consequences (financial, human loss of life, etc.)
Ex: Airplane sensor and Autopilot systems.
Classification Based on Triggering:
These are classified into two types
1. Event Triggered : Activities within the system (e.g., task run-times) are dynamic and
depend upon occurrence of different events.
2. Time triggered: Activities within the system follow a statically computed schedule
(i.e., they are allocated time slots during which they can take place) and thus by nature
are predictable.
Elements of Embedded systems
Microcontrollers and Microprocessors
RISC and CISC architecture
Reduced Instruction Set Architecture (RISC)
• To make hardware simpler by using an instruction set for loading, evaluating, and storing operations
• Just like a load command will load data, a store command will store the data.
Complex Instruction Set Architecture (CISC)
• Single instruction will do all loading, evaluating, and storing operations
• Just like a multiplication command will do stuff like loading data, evaluating, and storing it, hence it’s
complex.
RISC CISC
Focus on software Focus on hardware
Uses only Hardwired control unit Uses both hardwired and microprogrammed control unit
Transistors are used for storing complex
Transistors are used for more registers Instructions
Fixed sized instructions Variable sized instructions
Can perform only Register to Register Arithmetic operations Can perform REG to REG or REG to MEM or MEM to MEM
Requires more number of registers Requires less number of registers
Code size is large Code size is small
An instruction executed in a single clock cycle Instruction takes more than one clock cycle
An instruction fit in one word. Instructions are larger than the size of one word
Simple and limited addressing modes. Complex and more addressing modes.
Sensors and Interfacing
Instrumentation System
• The physical quantity to be measured (e.g. temperature) acts upon a sensor that produces an electrical output
signal.
• Since the output produced by the sensor may be small or may suffer from the presence of noise (i.e. unwanted
signals) further signal conditioning will be required before the signal will be at an acceptable level and in an
acceptable form for signal processing, display and recording.
• Furthermore, because the signal processing may use digital rather than analog signals an additional stage of
digital conversion may be required.
Control Systems
• This uses negative feedback in order to regulate and stabilize the output. It thus becomes possible
to set the input/demand (i.e. what we desire the output to be) and leave the system to regulate
itself by comparing it with a signal derived from the output (via a sensor and appropriate signal
conditioning).
• A comparator is used to sense the difference in these two signals and if any discrepancy is
detected the input to the power amplifier is adjusted accordingly. This signal is referred to as an
error signal (it should be zero when the output exactly matches the demand).
• The input (demand) is often derived from a simple potentiometer connected across a stable d.c.
voltage source while the controlled device can take many forms (e.g. a d.c. motor, linear actuator,
heater, etc.).
Transducers
Transducers are devices that convert energy in the form of sound,
light, heat, etc., into an equivalent electrical signal, or vice versa.
Example 1: A loudspeaker is an output transducer that converts low- frequency
electric current into audible sounds.
Example 2: A microphone is an input transducer that performs the reverse
function, converting sound pressure variations into voltage or current.
Block diagram of transducers
Transducer contains two parts that are closely related to each other – the sensing element and
the transducing element.
The sensing element is called the sensor. It is a device producing measurable response to change
in physical conditions.
The transducing element convert sensor output to suitable electrical form.
Input parameters-
pressure, Transducing
temperature, force Sensing element Electrical signal
element
etc
Input and output transducers
An input transducer is used to convert various kinds of physical energy such as
pressure, temperature, force, sound and acceleration into electrical energy such
as electrical current or voltage.
An input transducer is also called a sensor.
An output transducer operates in reverse, i.e., it will convert electrical energy
into energy in a different physical domain.
An output transducer is also called an actuator.
Sensors and actuators
Need of input and output Transducers
When using transducers to sense changes in the physical environment, it’s very
helpful to convert the physical variable being measured into a corresponding
electrical signal.
There are sophisticated technologies available to amplify, filter and digitize
electrical signals.
For maximum flexibility and capability it’s typically best to sense the
environment using the desired input transducer, then employ an
amplifier/conditioner to direct the electrical signal from the transducer to an
analog to digital converter.
Similarly, when attempting to create a stimulus in the physical environment, it’s optimal to
process an electrical signal (typically in digital form, via software) in the desired fashion prior to
converting the signal into energy of a different physical form.
Once digitized the signal can be subject to software-based processing.
When attempting to influence the environment, via some type of physical stimulus, it’s optimal
to employ software to establish the nature of the stimulus signal and then use a digital to
analog converter to transform the digital -software produced- signal back into an electrical
signal form.
Finally, an output transducer can be used to transform the electrical signal into the desired
physical signal.
Potentiometer
Dynamic Microphone
Rotary
Potentiometer
Loud Speaker Heating Element
I/O Subsystem
Light Emitting Diode
7 – Segment LED Display