VS 21ELN14 Module 3 Notes
VS 21ELN14 Module 3 Notes
Module 3
Embedded System??
Electronic / Electro-mechanical system designed to perform a specific function, a combination
of both hardware and firmware (software). Special hardware and firmware specific to an
application. Firm ware is unalterable by the end user. Ex: Smart phones has built-in operating
system and cannot be altered by the end user.
3 Applications are alterable by The firm wares are pre-programmed and not
the end user, re-install OS, alterable, special hardware settings are required for
add/remove applications altering..
7 Response requirements are not For certain category of ES, like Mission Critical
time critical systems, response time requirement is highly
Page 1 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
critical
Page 2 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
D) Based on Triggering: Embedded systems which are reactive’ in nature can be classified
based on trigger. Ex. Of reactive system – process control system in industrial control
application.
Reactive Systems can either be event triggered or time triggered.
Page 3 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Applications
1) Consumer Electronics:
Camcorders, Cameras
2) Household
TV, DVD players, Washing machine, fridge, microwave oven
3) Home automation and security system:
Air conditioner, sprinkler, intruder detection alarms, fire alarms CCTV( closed ckt TV), fire
alarms etc.
4) Automotive Industry:
Anti-lock breaking systems (ABS) , engine control , ignition systems, automotive navigation
systems , etc.
5) Telecom:
Cellular telephones , telephone switches , handset multimedia applications, etc.
6) Computer peripherals:
Printers , scanners , fax machines etc.
Computer networking system:
Network routers switches, hub, firewalls , etc.
8) Healthcare:
Different kinds of scanners .EEG,ECG machines etc.
9) Measurements and Instruments:
Digital multimeters, digital CROs, logic analysers PLC systems, etc.
10) Banking and 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, smart phone screen extension for notifications etc.
13) Cloud Computing and internet of things(IOT)
Page 4 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Page 5 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
The processor performs the pre-defined operation with the help of the firmware and sends the
signals to the actuators connected to the output ports.
This acts on the controlling variable and brings it to the desired level.
The memory holds the control algorithm and other configuration details.
Normally memory is fixed type, ROM (Read Only Memory). And the end user cannot modify;
PROM (Programmable Read Only Memory), UVEPROM (Ultra-Violet Erasable
Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read
Only Memory), and FLASH memory are used.
The memory size ranges from few bytes to megabytes Based on application
Some controllers do not have inbuilt memory and hence require external memory
RISC (Reduced Instruction Set Computer) Vs CISC (Complex Instruction Set Computer)
Page 6 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
6 Less Silicon Usage and pin More silicon since additional decoder logic is
count required to implement the complex instruction
Same physical memory address is used for Separate physical memory address is
instructions and data. used for instructions and data.
There is common bus for data and instruction Separate buses are used for
transfer. transferring data and instruction.
CPU can not access instructions and read/write CPU can access instructions and
at the same time. read/write at the same time.
Page 7 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Transducers convert one form of energy into another. Sensor is an example of transducer.
Sensors provide us with a means of generating signals that can be used as inputs to electronic
circuits.
The things that we might want to sense include physical parameters such as temperature, light
level and pressure.
The electrical signal that accurately represents these quantities allows us not only to measure
and record these values but also to control them.
Page 8 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Page 9 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Fig. shows the arrangement of 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 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.
Ex: Loud speaker, microphone are complementary transducers
Transducers may be used both as inputs to electronic circuits and outputs from them.
Loudspeaker is an output transducer designed for use in conjunction with an audio system
and a microphone is an input transducer designed for use with a recording or sound
reinforcing system.
There are many different types of transducer and Tables provide some examples of transducers
that can be used to input and output three important physical quantities; sound, temperature
and angular position.
Sensors
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.
Page 10 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
The signals returned from a sensor, together with control inputs from the user or controller (as
appropriate) 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.
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). The result may still be a voltage or
current but it is not generated by the sensor on its own.
Sensors can also be classed as either digital or analog.
The output of a digital sensor can exist in only two discrete states, either ‘on’ or ‘off’, in only
two discrete states, either ‘on’ or ‘off low’ or ‘high’, ‘logic 1’ or ‘logic 0’, etc. The output of an
analogue sensor can take any one of an infinite number of voltage or current levels. It is thus
said to be continuously variable.
Page 11 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Page 12 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Page 13 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Sensor:
is a transducer that converts energy from one form to another form for any measurement and
control purpose.
Actuator:
is form of transducer device (mechanical or electrical) which converts signal to corresponding
physical action (motion). Actuator acts as an output device.
The LED segments are named A to G and the decimal point is named as DP. Based on the
character/number to be displayed the respective segment LEDs are lit. Ex: To display “1” – B
and C segments are lit, to display “B” or “8” all segments from A to G should be lit. All these
segments should be connected to one processor/controller. The Seven Segment LED Displays
are available in two configurations as shown below:
Page 14 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
1) Common cathode: where all the cathodes are connected to a common point and anodes are
connected to the port pins. The port pin should be at logic one for the LED segment to be
lit.
2) Common anode: where all the anodes are connected to a positive of the supply through a
current limiting resistor and the cathodes are connected to the port pins. The port pin
should be at logic zero for the LED segment to be lit.
The value of the current limiting resistor should be chosen based on the LED rating in the data
sheet
Page 15 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
2) Bipolar Stepper motor: Contains single winding per phase. For reversing the direction of
rotation of motor the direction of the current flow through the coil should be changed
dynamically. This requires complex circuitry.
Wave Step: Only one phase is energized at a time and each coils of the phase is energized
alternately. The coils A,B,C,D are energized in the following order:
Half Step: It uses the combination of wave and full step. It has higher torque and stability. The
coils A,B,C,D are energized in the following order:
Page 16 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
The rotation of the Stepper motor can be reversed by reversing the order in which the coil is
energized.
Two phase unipolar stepper motor is largely used in the embedded applications. The current
requirements for the stepper motor is high and hence the microcontroller cannot prove the
same and hence the motor cannot be connected to the microcontroller pins. Based on the
current requirements, special driving circuits are required to interface the microcontroller to the
stepper motor. ULN2803 is an example of driver and is connected as shown in the figure drives
the 5v stepper motor.
1) Single Pole Single Throw normally open: SPST has only one path for information flow.
The path is either open or closed in normal condition. For normally open SPST, the circuit
is normally open and it closes when the relay is energized. For normally closed SPST, the
circuit is normally closed and it opens when the relay is energized. There are two paths for
information flow. Fig. shows the transistor-based relay driving circuit.
Page 17 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Piezo-electric Buzzer
Piezo Buzzer: is a piezoelectric device for generating audio indications in embedded
application. It contains a piezoelectric diaphragm which produces audible sound in response to
the voltage applied across it.
Piezo Buzzer are of two types:
1) Self Driving – This contains all necessary components to generate sound when the voltage
is applied.
2) External Driving – supports the generation of different tones. The tones can be varied by
applying a variable pulse train to the piezo-electric buzzer.
Piezo electric-Buzzer can be directly connected to the port pins of the processor/controller.
Also based on the current requirements, transistor driver can be used.
Push Button Switch: is an input device. There are two configurations.
1) Push to make – Here the switch is normally open and is pushed to close the circuit.
2) Push to break - Here the switch is normally close and is pushed to open/break the circuit.
The Push Button Switch is used for generating momentary pulses.
Push Button Switch is directly connected to the port pins of the processor/controller. Based on
the way the switch is connected, it can produce a high or a low pulse.
Page 18 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Page 19 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
All the embedded system need not have both Board level and Product level Communication.
Based on the system requirement the type of communication listed above can be adopted.
Mobile equipment is an example of embedded system with external communication interface.
Page 20 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
The start bit informs the receiver that a data byte is about to arrive. The receiver device
starts polling (scanning) its “receive line” as per the baud rate setting. If the baud rate is x
bits per second, the time for one bit is 1/x seconds. The receiver unit polls the receiver line
at exactly half of the time slot available for 1 bit.
If the parity is enabled for communication, it is set to one if the number of bits in the
transmitted byte is odd and resets to zero the number of bits in the transmitted byte is even.
The UART of the receiving device calculates the parity and compares with received parity
bit for error checking. The UART of the receiving device discards the parity, start and stop
bit and converts the received bit data to a word. (The bit received first is LSB and the bit
received last is MSB) For proper communication, the “Transmit line” of the sending device
should be connected to the receive line of the receiving device as in fig.
Parallel Interface: The on-board parallel interface is normally used for communicating with
peripheral devices which are memory mapped to the host of the system. The host
processor/controller of the embedded system and the device which supports the parallel
interface can directly connect to this bus system. The control signal interface is used to control
the communication through the parallel bus. The control signal includes the read/write/device
select signals
Only the host processor has the control over read and write signals. The devices are connected
to the host with proper address. An address decoder circuit is used to generate the chip select
signal. Based on the address range assigned, the respective chips will be selected. Only when
the select line is active the processor can read or write from or to the device by activating the
respective control line read/write.
Parallel communication is host process initiated and strict timing characteristics are followed.
If a device wants to initiate communication, it can request for the same through interrupts. The
interrupt line of the device is connected to the processor and the corresponding interrupt is
enabled in the host processor. The width of the parallel interface is determined by the width of
the data bus of the host processor. Fig. shows the parallel interface.
Page 21 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Universal Serial Bus(USB): is a wired high speed serial bus for data communication. The first
version of USB released in 1995 and was created by the USB core group members consisting
of Intel, Microsoft, IBM, Compaq, Digital and Northern Telecom.
The USB communication system follows a star topology as in figure, with USB host at the
canter and one or more USB peripheral devices/USB hosts connected to it. USB 2.0 host can
support connectivity up to 127 connections including the slave peripheral devices and other
hosts.
Page 22 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
Transmits data in packet format. Each data packet has a standard format. USB communication
is a host initiated one. The USB host contains a host controller which is responsible for
controlling the data communication including establishing connectivity with USB slave
devices, packetizing and formatting the data packet.
There are different standards for implementing the USB host Control Interface: namely Open
host Control Interface(OHCI) and Universal host Control Interface(UHCI). The physical
connection between a USB peripheral device and master device is established with a USB
cable.
USB 2.0 supports a distance of 5mtrs. It uses two different types of connectors at the ends of
the USB cable for connecting the USB peripheral device and the host device. Type A connector
is used for upstream connection (connection with host) and Type B or mini/micro USB
connector is used for downstream connection (connection with slave device). The USB in
PC/laptop is type A connector. Both type A and B connectors 4 pins for communication as in
table.
USB uses differential signals for transmission to improve the noise immunity. USB interface
has the ability to supply power to the connecting devices. A standard downstream USB 2.0 Port
(SDP) can supply current up to 500mA at 5v, where as a Charging standard downstream USB
2.0 Port (SDP) can supply current up to 1500mA at 5v. It is sufficient to operate low power
devices
Mini and micro USBs are available for portable media players and smartphones.
Each USB contains a product ID(PID) and a vendor ID(VID) which are essential for loading
the drivers corresponding to a USB device for communication.
USB support 4 different types of data transfers:
1) Control: Used by USB system software to query, configure and issue commands to USB
device. Bulk transfer is used to send a block of data to a device. Bulk transfer supports
error checking and correction. Ex: transfer data to a printer.
2) Isochronous: is used for real time data communication, which means the data transfer
happens in real time. It does not support error checking and re-transmission in case of data
loss. Ex: Medical devices, audio devices
3) Interrupt transfer: is used for transferring small amount of data. This uses the polling
technique to check if the USB device has any data to send. The frequency of polling is
determined by the USB device and varies from 1 to 255 milliseconds. Ex. Mouse and
keyboard
Page 23 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
USB 3.x has a new transfer mode called the Superspeed (SS) transfer mode capable of transferring
the data at speed of up to 2.0. Type A and B connection has 9 pins.
Wi-Fi or Wireless Fidelity: is the popular wireless communication technique for networked
communication devices. It follows the IEEE 802.11 standard. Wi-Fi is intended for network
communication and it supports Internet Protocol (IP) based communication. It is required to have
device identities in a multi-point communication to address specific devices for data
communication.
In an IP based communication each device is identified by an IP address, which is unique to each
device on a Wi-Fi network.
Wi-Fi based communication requires an intermediate agent called Wi-Fi router/Wireless Access
point to manage the communications. Wi- Fi router is responsible for restricting the access to a
network, assigning IP address to devices on network, routing data packets to the intended devices
on network. Wi-Fi enabled devices contain a wireless adapter for transmitting and receiving data in
the form of radio signals through an antenna. The hardware part is known as Wi-Fi Radio. Wi-Fi
operates at 2.4GHz or 5GHz of the radio spectrum and co-exist with the Industrial Scientific and
Medical (ISM) band like Bluetooth.
Figure shows a typical interfacing of devices for a Wi-Fi communication. When a device for
communication is turned ON, searches the available network in the vicinity and lists the Servive
Set Identifier (SSID) of the available networks. If the network is security enabled, a password may
be required to connect a particular SSID. Wi-Fi uses different security mechanisms. Wired
Equivalency Privacy (WEP), Wired Protected Access (WPA) etc. for securing the data
communications. Wi-Fi supports the data ranging from 1Mbps to 1300 Mbps. As the data rate is
increased, based on the IEEE standards different modulation/Access methods are used.
Based on the type of antenna and usage location(indoor/outdoor), Wi-Fi offers a range of 100 to
1000 feet.
Page 24 of 25
Department of Electronics and Communication
Basic Electronics and Communication 18ELN14
VS Notes
General Packet Radio Service (GPRS), 3G, 4G, LTE: These are cellular communication technique
for transferring data over a mobile communication network like GSM and CDMA. Data is sent as
packets in GPRS communication. The transmitting device splits the data into several related
packets. At the receiver the data is reconstructed by combining the received data packets. GPRS
supports a theoretical maximum data transfer rate of 171.2kbps. In GPRS communication, the radio
channel is concurrently shared by several users instead of dedicating a radio channel to a user. The
GPRS communication divides the channel into 8 time slots and transmits data over the available
channel. GPRS supports the Internet Protocol (IP), Point to Point Protocol (PPP) and X.25
protocols for communication.
GPRS is used for mobile enabled embedded devices for data communication. The device should
support hardware like GPRS modem and GPRS radio. Also, the carrier network should have
support for GPRS communication.
GPRS is an old technology. It is being replaced by new generation cellular data communication
techniques like 3G (3rd Generation), High Speed Downlink Packet Access (HSDPA), 4G (4 th
Generation), LTE (Long Term Evolution) which offers higher bandwidth for communication. 3 G
offers data rates ranging from 144kbps to 2Mbps or higher, 4G give a practical throughput of 2 to
100bps depending on network and the underlying technology.
Page 25 of 25