Basic Electronics Module 3
Basic Electronics Module 3
Syllabus
Embedded Systems – Definition, Embedded systems vs general computing systems,
Classification of Embedded Systems, Major application areas of Embedded Systems, Elements of
an Embedded System, Core of the Embedded System, Microprocessor vs Microcontroller, RISC
vs CISC, Harvard vs Von-Neumann.
Sensors and Interfacing – Instrumentation and control systems, Transducers, Sensors.
Actuators, LED, 7-Segment LED Display, Stepper Motor, Relay, Piezo Buzzer, Push Button
Switch, Keyboard.
Communication Interface, UART, Parallel Interface, USB, Wi-Fi, GPRS.
Embedded Systems
What is an embedded system?
An embedded system is an electronic/electro-mechanical system designed to perform a specific
function and is a combination of both hardware and firmware (software).
Every embedded system is unique, and the hardware as well as the firmware is highly specialized
to the application domain. Embedded systems are becoming an inevitable part of any product or
equipment in all fields including household appliances, telecommunications, medical equipment,
industrial control, consumer products, etc.
Embedded system vs general purpose Embedded system
computing system General purpose
computing system
A system which is a combination of a generic A system which is a combination of special
hardware and a General Purpose Operating purpose hardware and embedded OS for
System for executing a variety of applications executing a specific set of applications
Contains a General Purpose Operating System May or may not contain an operating system for
(GPOS) functioning
Applications are alterable (programmable) by the The firmware of the embedded system is pre-
user (It is possible for the end user to re-install programmed and it is non-alterable by the end-
the operating system, and also add or remove user (There may be exceptions for systems
user applications) supporting OS kernel image flashing through
special hardware settings)
Performance is the key deciding factor in the Application-specific requirements (like
selection of the system. Always, ‘Faster is Better’ performance, power requirements, memory
usage, etc.) are the key deciding factors
Less/not at all tailored towards reduced operating Highly tailored to take advantage of the power
power requirements, options for different levels saving modes supported by the hardware and the
of power management. operating system
Response requirements are not time-critical For certain category of embedded systems like
mission critical systems, the response time
requirement is highly critical
NOTES BY
www.vtuupdates.com
Need not be deterministic in execution behavior Execution behavior is deterministic for certain
types of embedded systems like ‘Hard Real
Time’ systems
Classification of Embedded systems
Some of the criteria used in the classification of embedded systems are as follows:
(1) Based on generation
(2) Complexity and performance requirements
(3) Based on deterministic behavior
(4) Based on triggering.
The classification based on deterministic system behavior is applicable for ‘Real Time’ systems.
The application/task execution behavior for an embedded system can be either deterministic or
non- deterministic.
Based on the execution behavior, Real Time embedded systems are classified into Hard and
Soft.
Hard real time systems have a set of strict deadlines, and missing a deadline is considered a
system failure. Examples of hard real-time systems: airplane sensor and autopilot systems,
space-crafts and planetary rovers.
A soft real-time system is a system whose operation is degraded if results are not produced
according to the specified timing requirement. In a soft real-time system, the meeting of deadline
is not compulsory for every task, but the process should get processed and give the result.
Embedded Systems which are ‘Reactive’ in nature, can be classified based on the triggering as
either event triggered or time triggered.
These are built around 8-bit microprocessors like 8085 and Z80, and 4bit microcontrollers.
Example: Digital telephone keypads, stepper motor control units etc. are examples of this.
2. Second Generation:
NOTES BY
www.vtuupdates.com
Some of the second generation embedded systems contained embedded operating system for
their operation.
These are built around powerful 32 bit processors and 16bit microcontrollers for their design.
A new concept of application and domain specific processors/controllers like Digital Signal
Processors (DSP) and Application Specific Integrated Circuits (ASICs) came into the picture.
The instruction set of processors became more complex and powerful and the concept of instruction
pipelining also evolved.
The processor market was flooded with different types of processors from different vendors.
Processors like Intel Pentium, Motorola 68K, etc. gained attention in high performance embedded
requirements.
Dedicated embedded real time and general purpose operating systems entered into the embedded
market. Embedded systems spread its ground to areas like robotics, media, industrial process
control, networking, etc.
4. Fourth Generation:
The advent of System on Chips (SoC), reconfigurable processors and multicore processors are
bringing high performance, tight integration and miniaturization into the embedded device market.
The SoC technique implements a total system on a chip by integrating different functionalities
with a processor core on an integrated circuit.
High performance real time embedded operating systems are used for their functioning.
Examples: Smart phone devices, mobile internet devices (MIDs), etc. are examples of fourth
generation embedded systems.
Classification Based on Complexity and system Performance requirements
According to this classification, embedded systems can be grouped into the following:
1. Small-Scale Embedded Systems:
These systems are built around low performance and low cost 8 or 16- bit
microprocessors/microcontrollers.
These systems may or may not contain an operating system for its functioning.
Embedded systems which are simple in application needs and where the performance
requirements are not time critical.
Example: An electronic toy.
2. Medium-Scale Embedded Systems:
These systems which are slightly complex in hardware and firmware (software) requirements.
These systems are usually built around medium performance, low cost 16 or 32 bit
microprocessors/microcontrollers or digital signal processors.
NOTES BY
www.vtuupdates.com
They usually contain an embedded operating system (either general purpose or real time
operating system) for functioning.
These systems are highly complex in hardware and firmware requirements. They are employed
in mission critical applications demanding high performance.
Decoding/ encoding of media, cryptographic function implementation, etc. are examples for
processing requirements which can be implemented using a co-processor/hardware accelerator.
These systems contain a high performance Real Time Operating System (RTOS) for task
scheduling, prioritization, and management
Major application areas of embedded systems
Embedded systems play a vital role in our day- to-day life, starting from home to the computer industry.
Embedded technology has acquired a new dimension from its first generation model, to the latest radio
navigation system combined with in-car entertainment technology and the wearable computing devices.
The application areas and the products in the embedded domain are countless.
A few of the important domains and products are listed below:
(1) Consumer electronics: Camcorders, cameras, etc.
(2) Household appliances: Television, DVD players, washing machine, fridge, microwave oven,
etc.
(3) Home automation and security systems: Air conditioners, sprinklers, intruder detection alarms,
closed circuit television cameras, fire alarms, etc.
(4) Automotive industry: Anti-lock braking systems (ABS), engine control, ignition systems,
automatic navigation systems, etc.
(5) Telecom: Cellular telephones, telephone switches, handset multimedia applications, etc.
(7) Computer networking systems: Network routers, switches, hubs, firewalls, etc.
(9) Measurement & Instrumentation: Digital multimeters, digital CROs, logic analyzers PLC
systems, etc.
(10) Banking & Retail: Automatic teller machines (ATM) and currency counters, point of sales
(POS)
(11) Card Readers: Barcode, smart card readers, hand held devices, etc.
(12) Wearable Devices: Health and Fitness Trackers, Smartphone Screen extension for
notifications, etc.
(13) Cloud Computing and Internet of Things (IOT)
NOTES BY
www.vtuupdates.com
A typical embedded system shown in the figure contains a single chip controller, which acts as
the master brain of the system.
The controller can be a Microprocessor (e.g. Intel 8085) or a microcontroller (e.g. Atmel
AT89C51) or a Field Programmable Gate Array (FPGA) device (e.g. Xilinx Spartan) or a Digital
Signal Processor (DSP) or an Application Specific Integrated Circuit (ASIC) / Application
Specific Standard Product (ASSP) (Analog Devices for energy metering applications).
The control is achieved by processing the information coming from the sensors and user
interfaces, and controlling some actuators that regulate the physical variable.
Key boards, push button switches, etc. are examples for common user interface input devices.
LEDs, liquid crystal displays, piezoelectric buzzers, etc. are examples for common user interface
output devices for a typical embedded system.
For example, if the embedded system is designed for any handheld application, such as a
mobile handset application, then the system should contain user interfaces like a keyboard for
performing input operations and display unit for providing users the status of various activities in
progress.
Some embedded systems do not require any manual intervention for their operation. They
automatically sense the variations in the input parameters in accordance with the changes in the
real world, to which they are interacting through the sensors which are connected to the input port
of the system.
The sensor information is passed to the processor after signal conditioning and digitization.
Upon receiving the sensor data the processor or brain of the embedded system performs some
predefined operations with the help of the firmware embedded in the system and sends some
actuating signals to the actuator connected to the output port of the embedded system, which in
turn acts on the controlling variable to bring the controlled variable to the desired level to make the
embedded system work in the desired manner.
The Memory is responsible for holding the control algorithm and other important configuration
details.
ROM: is used for storing the algorithm or configuration data and it is not available for the end
user for modifications. Other types of ROM are OTP, PROM, UVEPROM, EEPROM and FLASH.
The memory size may vary from a few bytes to megabytes.
NOTES BY
www.vtuupdates.com
RAM (Working Memory): It is a temporary memory for performing arithmetic operations or
control algorithm execution. Other types of RAM like SRAM, DRAM, and NVRAM. The size of
the RAM also varies from a few bytes to kilobytes.
It is having all the peripherals but is not capable of making any decision depending on the
situational as well as real world changes. For embedded systems it is the responsibility of the
designer to impart intelligence to the system.
In a controller-based embedded system, the controller may contain internal memory for storing
the control algorithm and it may be an EEPROM or FLASH memory varying from a few kilobytes
to megabytes. Such controllers are called controllers with on-chip ROM, e.g. Atmel AT89C51.
Some controllers may not contain on-chip memory and they require an external (off-chip) memory
for holding the control algorithm.
Core of an Embedded System
Embedded systems are domain and application specific and are built around any of the core units
mentioned below. The core of the embedded system falls into any one of the following categories:
(1) General Purpose and Domain Specific Processors
a. Microprocessors
b. Microcontrollers
c. Digital Signal Processors
(2) Application Specific Integrated Circuits (ASICs)
NOTES BY
www.vtuupdates.com
RISC CISC
Lesser number of instructions (typically in Greater number of Instructions
the range of 30 to 40)
Instruction pipelining and increased Generally no instruction pipelining feature
execution speed
Orthogonal instruction set Non-orthogonal instruction set
Operations are performed on registers only, Operations are performed on registers or
the only memory operations are load and store memory depending on the instruction
A large number of registers are available Limited number of general purpose registers
Programmer needs to write more code to A programmer can achieve the desired
execute a task since the instructions are functionality with a single instruction which in
simpler ones turn provides the effect of using more simpler
single instructions in RISC
Single, fixed length instructions Variable length instructions
Less silicon usage and pin count More silicon usage since more additional
decoder logic is required to implement the
complex instruction decoding.
With Harvard Architecture Can be Harvard or Von-Neumann
Architecture
Atmel AVR microcontroller, its and its Original version of 8051 microcontroller (e.g.
instruction set contains only 32 instructions. AT89C51) is a CISC controller and its
instruction set contains 255 instructions
Harvard vs. Von-Neumann Processor/Controller Architecture
The terms Harvard and Von-Neumann refers to the processor architecture design. Von-Neumann
architecture is also referred as Princeton architecture, since it was developed by the Princeton
University.
NOTES BY
www.vtuupdates.com
the presence of noise (i.e. unwanted signals), hence it is required to have the signal at an acceptable
level and in an acceptable form for signal processing, display and recording.
Signal processing may use digital rather than analogue signals an additional stage of analogue-
to-digital (ADC) conversion may be required.
A Control System
This uses negative feedback in order to regulate and stabilize the output. It thus becomes
possible to set the input or 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 where 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 may be 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. Transducers may be used both as inputs to electronic
circuits and outputs from them.
Example:
A loudspeaker is a transducer that converts low frequency electric current into audible sounds.
It is an output transducer designed for use in conjunction with an audio system.
A microphone is a transducer that performs the reverse function i.e. that of converting sound
pressure variations into voltage or current. A microphone is an input transducer
There are many different types of transducer and table provide some examples of transducers that
can be used to input and output three important physical quantities; sound, temperature and angular
position.
Sensors
Sensors provide us with a means of generating signals that can be used as inputs to electronic
circuits.
Sensors are a subset of a larger family of devices known as transducers.
A sensor is a special kind of transducer that is used to generate an input signal to a measurement,
instrumentation or control system.
The signal produced by a sensor is an electrical analogy of a physical quantity, such as distance,
velocity, acceleration, temperature, pressure, light level, etc. The signals returned from a sensor,
together with control inputs from the user will subsequently be used to determine the output from
the system.
The choice of sensor is governed by a number of factors including accuracy, resolution, cost
and physical size.
Sensors can be categorized as either active or passive.
NOTES BY
www.vtuupdates.com
An active sensor generates a current or voltage output.
A passive transducer requires a source of current or voltage and it modifies this in some way
(e.g. by virtue of a change in the sensor’s resistance).
Sensors can also be classed as either digital or analogue.
The output of a digital sensor can exist in only two discrete states, either ‘on’ or ‘off’, ‘low’ or
➢ When anode is directly connected to the supply, we will get the required brightness.
NOTES BY
www.vtuupdates.com
7-SEGMENT DISPLAY:
➢ It Is device used for displaying alphanumeric characters.
➢ It contains 8 LED segment arranged as shown in figure.
➢ 7 segment are arranged for displaying alphanumeric characters
and it is used for representing decimal point(DP).
➢ LED segments are named A to Z and decimal point as DP.
➢ LED segments A to G and DP are List coding to displaying numbers
and characters.
➢ The current flow through each of the LED segment should be limited to the maximum
value supported by the LED. Typical value of the Current is in the range of 20mA.
Current limiting resistor is connected to limit the current.
Application :
Low cost embedded application like public telephone call monitoring devise, point of
sale terminals, etc.
NOTES BY
www.vtuupdates.com
STEPPER MOTOR :
➢ It is an electromagnetic device which generates discrete displacement in response to
DC electrical signals.
Application :
Industrial embedded application. Customer Electronic products robotics control
systems and paper feed mechanism of a printer make use of stepper motor for its
function.
➢ Based on the coil winding arrangements. 2 phase stepper motor is classified
a) Unipolar
b) Bipolar
NOTES BY
www.vtuupdates.com
➢ The stepping of stepper motor can be implemented in different way by changing the
sequence of activation of the stator windings.
➢ The different stepping modes of stepper motor are:
a) FULL STEP:
Both the phases are energised simultaneously, coils are energised in the following
order:
NOTES BY
www.vtuupdates.com
Only one coil is energised at a time and is energised alternatively.
c) HALF STEP:
It uses the combination of wave & full step. It has the highest torque and stability.
The coil energising sequence for half step is given below.
➢ The rotation of stepper motor can be reversed by revering the order in which the coil
is energised.
➢ 2-phase unipolar stepper motors are the popular choice for embedded applications.
NOTES BY
www.vtuupdates.com
INTERFACING OF STEPPER MOTOR:
➢ The current requirement for stepper motor is little high and port pins of MP/Mc may
not be able to drive them directly.
➢ Also the supply voltage required to operate stepper motor is in the range of 5V to 24V.
➢ So special driving circuit is required to interface stepper motor. It is shown in the
figure.
PIEZO BUZZER:
➢ It is a piezoelectric device for generating audio indications in embedded application.
It contains a piezoelectric diaphragm which produce a an Diale sound in response to
the voltage applied to it
➢ Piezoelectric buzzers are available in 2 types:
Self driving circuit : it generates sound at a predefined tone on applying the voltage.
External driving circuit : it generates different tones on applying variable pulse train.
➢ Piezo buzzer can be directly interfaced to the port pin processor/controller.
NOTES BY
www.vtuupdates.com
➢ Push button is connected to the port pin of the processor/controller.
Key Board :
➢ An input device for user interfacing.
➢ If the number of keys required is very limited, push button switches can the used and
they can be directly interfaced to the port pins.
4×4 Matrix keyboard
➢ It is the optimum solution for handling large key requirement. It greatly reduces the
number of interface connections.
NOTES BY
www.vtuupdates.com
➢ After reading the status of each columns corresponding to row, the row is pulled high
and the next row is pulled low and the status of the columns are read. This process is
repeated until the scanning for all rows are completed.
➢ When a row is pulled low and if a key is connected to the row is pressed, reading the
column to which the key is connected will give logic 0.
➢ Debounce issue: keys are mechanical devices, so there may be multiple key press
effect for a single press. To prevent this, a proper key debouncing technique should
be applied.
➢ software key debouncing technique doesn’t required any addition hardware and is
easy to implement.
➢ In the software key bouncing technique, on detecting a keypress, the key is read again
after a debounce delay.
➢ If the key press is a genuine one, the state of the key will remain as pressed on the
second read also.
➢ Pull up resistor are connected to the column lines to limit the current that flows to the
row line on a key press.
Relay:
➢ An electromagnetic device.
➢ It is used as dynamic path selectors for signals and power.
➢ Relay unit contains a relay coil made up of insulated wire on a metal core and a metal
armature with one or more contacts.
➢ It works on electromagnetic principle.
NOTES BY
www.vtuupdates.com
➢ When a voltage is applied to the relay coil , current flows through the coil, which in
turns generates a magnetic field.
➢ The magnetic field attracts the armature core and moves the contact point. The
movement of the contact point changes the power/signal flow path.
➢ Relay are available in different configurations.
Relay is normally controlled using a relay drive circuit connected to the port pin of the
processor/controller.
➢ A freewheeling diode is used for free wheeling the voltage produced in the opposite
direction when the relay coil is de-energised.
➢ Industrial relay are bulky and requires high voltage to operate.
➢ Special relay called reed relays are available for embedded application requiring
switching of low voltage DC signals.
Communication Interface :
➢ For on embedde product, the communication interface can be
a. Onboard communication Interface(device/board)
b. External communication interface(product level)
➢ Embedded product is a combination of different types of components arranged on a
printed circuit board(PCB)
NOTES BY
www.vtuupdates.com
➢ Communication channel which interconnects the various components with in an
embedded product is referred as device level communication interface
➢ Interfacing can be serial (like I2C, SPI, UART, I-wire)and parallel
➢ External communication interface is responsible for data transfer between the
embedded system and other device
➢ External interfacing can be either wired or a wireless and it can be a serial or a parallel
interface
➢ Wireless communication : Infrared(IR), Bluetooth(BT), Wireless LAN
(Wi-Fi), Radio frequency waves, GPRS/3G/4G
➢ Wired communication : RS232/RS422/RS485, USB, Ethernet, TEE 1394 port, parallel,
port.
➢ Mobile communication equipment is an example for embedded system with external
communication interface.
UART- Universal Asynchronous receiver transmitter
➢ Asynchronous form of serial data transmission
➢ UART transmission does not require a clock signal for synchronizing transmission
➢ UART transmission depend on pre-defined agreement between the transmitting
device and receiving device
➢ Serial communication setting(Baudrate, number of bits per byte, paily, number of start
and stop bits, flow control) for both transmitter and receiver should be set as identical
➢ While sending a byte of data , a start bit is added first to inform the receiver that a
data byte is about to arrive
➢ A stop bit is added at the end of the bit stream to inform the receiver that a data byte
is ended
➢ The receiver device starts polling its receive line as per the baudrate settings
➢ If the baudrate is x bits per second, the time slot available for one bit is 1/x seconds .
➢ The receiver unit polls the receivers line at exactly half of the time slot available for
the bit.
➢ If parity is enabled for communication , parity bit is added (p=1 for odd number of 1s
and p=0 for even number of os)
➢ The UART of the receiving device calculates the parity bit received and compares it
with the received parity bit for error checking
➢ The UART of the receiving device discards the start, stop, and parity bit and converts
the serial bit data to a word
NOTES BY
www.vtuupdates.com
➢ UART also provides handshaking signal support for controlling the serial data flow
➢ Now a days most of the microprocessor/controllers are available with integrated
UART functionality and they provide built in instruction support for serial data
transmission and reception
NOTES BY
www.vtuupdates.com
➢ USB 2.0host can support connection up to 127 including slave peripheral device
and other USB hosts
➢ USB communication is a host initiated one
➢ USB transmits data in packet format, Each packet has a standard format
➢ USB host contains host controller
➢ Functions of host controller
a. Established connectivity with USB slave Devices
b. Packetizing the data packet
c. Formatting the data packet
➢ Two different standards for implementing the USB host control interface
a. Open host control interface(OHCI)
b. Universal host control interface(UHCI)
➢ USB cable in USB2.0 support communication distance of up to 5 meter
➢ USB 2.0 uses two different types of connector
a. Type A – used for upstream connection(connection with host)
b. Type B – used for downward connection(mini/micro)(connection with slave)
➢ Both Type A & type B connection contain 4 pins
➢ USB user differential signals for data transmission. It improves signal immunity
➢ USB interface has the ability to Supply power to the Connecting Devices
➢ Standard downstream USB2.0 port can supply power up to 500mA at 5V
➢ Charging downward USB 2.0 can supply power up to 1500mA at 5V
➢ It is sufficient to operate low power devices
➢ Mini & Micro USB connection are available for small form factor device like portable
for media player and smart phones
➢ Each USB device contains a product ID(PID) and a vendor ID(VID) supplied by USB
standard forum. These IDS are essential for loading the device corresponding to a USB
device for communication
➢ USB supports four different types of data transfer: control, bulk, isochronous and
interrupt
➢ Control transfer is used by USB system software to every, configure and issue
commands to the USB device
➢ Bulk transfer is used for sending a block of data to a device. It also supports error
checking and correction
Ex: transferring data to a printer
➢ Isochronous transfer is used for real time data transmission in stream. It does not
support error checking and re-transmission of data in case of any transmission loss
NOTES BY
www.vtuupdates.com
Ex : all audio streaming device and medical equipment use isochronous transfer
➢ Interrupt transfer is used for transferring small amount of data. This makes use of
polling technique
Ex : mouse, keyboard, makes use of interrupt transfer
➢ USB 3.0 is the latest version of USB. It adds a new transfer mode called superspeed,
capable of transferring data at speeds up to 4.8 Gbps, which is ten times faster than
USB 2.0 which transfers data at 480Mbs
➢ USB 3.0 has 9 pins for connectivity
Parallel interface:
➢ It is onboard interface used for communicating with peripheral devices
➢ Peripheral device are memory mapped to the hast of the system
➢ Parallel bus is required between peripheral device and host
➢ Parallel communication is controlled by control signals
➢ Strict timing characteristics are followed for parallel communication
➢ The size of the data transfer depends on the bus width of host processor. Bus width
of the peripheral device must be same as that of host. It can be 4bit, 8bit, 16bit, 32-
or-64bits
➢ Host processor initiates the communication by asserting device select line of the
device
➢ The device becomes active
➢ Host processor can now perform read or write transfer, using RD and WR control
signals
➢ Read – device to host data transfer
➢ Write – host to device data transfer
➢ If a device wants to initiate the communication, it can rise an interrupt communication
NOTES BY
www.vtuupdates.com
➢ For communication with device over wi-fi network
a. The device must be turned on
b. Searches for the availability of wi-fi network in the ricinity
c. List out the available wi-fi network
d. If a network is secured, password may be required to get connected
e. Once get connected, communication is possible
➢ Depending upon the type of antenna and usage location, wi-fi offers a range of 100 to
100feet
➢ Functions of wi-fi router
a. Assigning IP address
b. Routing data packets to intended devices
c. Restricting the access to the network
➢ Wireless communication also required wireless adaptor for transmitting and receiving
data in the form of radio signals through an antenna
➢ The hardware of adaptor is wi-fi radio
➢ Wi-fi operates at 2.4 GHz or 5 GHz of radio spectrum
➢ Wi-fi can coexist with other ISM band device like Bluetooth
➢ Wi-fi employs different security mechanisms such as
a. Wired equivalency privacy (WEP)
b. Wireless protected access(WPA) for securing data communication
➢ Wi-fi support data rates ranging from 1Mbps to 1300 Mbps
NOTES BY
www.vtuupdates.com