0% found this document useful (0 votes)
9 views70 pages

Embedded System Hardware Design Overview

The document outlines the syllabus for a course on Embedded Systems Design, focusing on hardware design aspects including processors, memory types, sensors, and actuators. It discusses the differences between microprocessors and microcontrollers, as well as the roles of Application Specific Integrated Circuits (ASICs), Programmable Logic Devices (PLDs), and Commercial off-the-shelf Components (COTS) in embedded systems. Additionally, it covers memory classifications, including various types of Read-Only Memory (ROM) and their characteristics.

Uploaded by

eng24am0032
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views70 pages

Embedded System Hardware Design Overview

The document outlines the syllabus for a course on Embedded Systems Design, focusing on hardware design aspects including processors, memory types, sensors, and actuators. It discusses the differences between microprocessors and microcontrollers, as well as the roles of Application Specific Integrated Circuits (ASICs), Programmable Logic Devices (PLDs), and Commercial off-the-shelf Components (COTS) in embedded systems. Additionally, it covers memory classifications, including various types of Read-Only Memory (ROM) and their characteristics.

Uploaded by

eng24am0032
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

COURSE NAME: EMBEDDED SYSTEMS DESIGN


COURSE CODE: 24AM2306

UNIT – II

EMBEDDED SYSTEM HARDWARE DESIGN-I

Text book: K.V. Shibu,” Introduction to Embedded Systems”,


2nd Edition, McGraw Hill Education, 2017
SYLLABUS 2
v Contents 3

EMBEDDED SYSTEM HARDWARE DESIGN-I

 Embedded System Core: General Purpose and Domain Specific Processors, Application Specific
Integrated Circuits (ASICs), Programmable Logic Devices (PLDs), Commercial off-the-shelf Components
(COTS)

 Memory: Overview on Various Types of memory sub systems used in Embedded systems and their selection

 Sensors and Actuators: interfacing of LEDs, 7-segment LED Displays, Piezo Buzzer, Stepper Motor,
Relays, Optocouplers, Matrix keyboard, Push button switches, Programmable Peripheral Interface Device
(e.g. 8255 PPI), etc. with the I/O subsystem of the embedded system
v Elements of an embedded system 4
v Elements of an embedded system 5
v Core of the Embedded System 6

 The core of the embedded system falls into any one of the following categories:

1. General Purpose and Domain Specific Processors

Ø 1.1 Microprocessors

Microprocessor

Ø 1.2 Microcontrollers

ATMEGA328P
microcontroller
Ø 1.3 Digital Signal Processors

Digital Signal Processor


v Core of the Embedded System (cont.) 7

2. Application Specific Integrated Circuits (ASICs)

3. Programmable Logic Devices (PLDs)

4. Commercial off-the-shelf Components (COTS)

Example: ASIC interface with


ECG sensor to monitor health
v Microprocessor Vs Microcontroller 8

q Merits, Drawbacks and Application Areas

 Microcontrollers are designed to perform specific tasks. However, Microprocessors are


designed to perform unspecific tasks like developing software, games, website, photo editing,
creating documents, etc.

 Depending on the input, some processing for microcontroller needs to be done and output is
defined. However, the relationship between input and output for microprocessor is not defined.

 Since the applications of microcontroller are very specific, they need small resources like RAM,
ROM, I/O ports etc. and hence can be embedded on a single chip. Microprocessors need high
amount of resources like RAM, ROM, I/O ports etc.

 The clock speed of Microprocessor is quite high as compared to the microcontroller. Whereas the
microcontrollers operate from a few MHz from (30 to 50 MHz), today's microprocessor operate
above 1 GHz as they perform complex tasks.
v Microprocessor Vs Microcontroller 9

q Merits, Drawbacks and Applications Areas (cont.)

 Microprocessor cannot be used stand alone. They need


other peripherals like RAM, ROM, buffer, I/O ports etc., and
hence a system designed around a microprocessor is quite
costly.

 Application areas of microcontroller: Mobile Phones,


CD/DVD players, Washing machines, cameras, security
alarms, Microwave oven, etc.

 Application areas of microprocessor: Calculators, Accounting


Systems, Games Machine, Complex Industrial Controllers,
Data Acquisition Systems, Military applications,
Communication systems, etc.
v Difference B/W Microprocessor Vs Microcontroller 10

Microprocessor Microcontroller

Microprocessor is heart of computer system. Microcontroller is a heart of embedded system.


It is just a processor, Memory and I/O components Microcontroller has external processor along with
have to be connected externally. internal memory and I/O components.
Since memory and I/O has to be connected Since memory and I/O are present internally, the
externally, the circuit becomes large. circuit is small.
Cannot be used in compact systems and hence Can be used in compact systems and hence it is an
inefficient. efficient technique.
Cost of the entire system increase. Cost of the entire system is low.
v Difference B/W Microprocessor Vs Microcontroller 11

Microprocessor Microcontroller
Due to external components, the entire power Since external components are low, total power
consumption is high. Hence it is not suitable to consumption is less and can be used with devices
used with devices running on stored power like running on stored power like batteries.
batteries.
Most of the microprocessors do not have power Most of the microcontrollers have power saving
saving features. modes like idle mode and power saving mode. This
helps to reduce power consumption even further.
Since memory and I/O components are all external, Since components are internal, most of the
each instruction will need external operation, hence operations are internal instruction, hence speed is
it is relatively slower. fast.
Microprocessor have less number of registers, Micro controller have more number of registers,
hence more operations are memory based. hence the programs are easier to write.
Microprocessors based on Von Neumann Microcontrollers are based on Harvard
architecture where program and data are stored in architecture where program memory and Data
same memory module. memory are separate.
Mainly used in Personal Computers Used mainly in washing machines, MP3 players
v Digital Signal Processors (DSPs) 12

 DSPs are powerful special purpose 8/16/32 bit microprocessors designed


specifically to meet the computational demands and power constraints of today’s
embedded audio, video, and communications applications.

 DSPs are 2 to 3 times faster than the general purpose microprocessors in signal
processing applications.

 A typical digital signal processor incorporates the following key units:


i. Program Memory: Memory for storing the program required by DSP to process the data.
ii. Data Memory: Working memory for storing temporary variables and data/signal to be
processed.
iii. Computational Engine: Performs the signal/math processing, accessing the program
from the program memory and the data from the data memory.
iv. I/O Unit: Acts as an interface between the outside world and DSP. It is responsible for
capturing signals to be processed and delivering the processed signals.
v Digital Signal Processors (cont.) 13

 Application areas:
§ Audio video signal processing
§ Telecommunication
§ Multimedia applications

 DSP employs a large amount of real-time calculations,


Sum of products (SOP) calculation, convolution, fast
Fourier transform (FFT), Discrete Fourier Transform
(DFT), etc, are some of the operations performed by
digital signal processors.
v RISC Vs CISC processors/controllers 14

RISC CISC
RISC stands for Reduced Instruction Set CISC stands for Complex Instruction Set
Computing Computing
Lesser number of instructions Greater number of instructions
Instruction pipelining and increased execution Generally no instruction pipelining feature
speed
Orthogonal instruction set (Allows each instruction to operate Non-orthogonal instruction set (All instructions are not
on any register and use any addressing mode) allowed to operate on any register and use any addressing
mode. It is instruction-specific)

Operations are performed on registers only, the only Operations are performed on registers or memory
memory operations are load and store depending on the instruction
A large number of registers are available Limited number of general purpose registers
Programmer needs to write more code to execute a Instructions are like macros in C language. A
task since the instructions are simpler ones. programmer can achieve the desired functionality with
a single instruction which in turn provides the effect of
using more simpler single instructions in RISC
RISC Vs CISC processors/controllers (cont.) 15

RISC CISC
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

Example: Atmel AVR microcontroller Example: 8051 microcontroller


v Harvard vs. Von-Neumann Processor/Controller Architecture 16

Harvard Architecture Von-Neumann Architecture


Separate buses for instruction and data fetching Single shared bus for instruction and data
fetching
Easier to pipeline, so high performance can be Low performance compared to Harvard
achieved architecture
Comparatively high cost Cheaper

No memory alignment problems Allows self modifying codes

Since data memory and program memory are Since data memory and program memory are
stored physically in different locations, no stored physically in the same chip, chances for
chances for accidental corruption of program accidental corruption of program memory
memory
Big-Endian vs. Little-Endian Processors/Controllers 17

 Endianness specifies the order in which a sequence of bytes are stored in computer memory.
 There are two ways of ordering the data while storing it into the memory.
§ Little-endian
§ Big-endian

 Little-endian is an order in which the “ little end “,/ the lower-order byte of the data (least
significant value in the sequence) is stored in memory at the lowest address. (The little end
comes first.)

 Big-endian is an order in which the “ Big end ”,/ the higher-order byte of the data (most
significant value in the sequence) is stored in memory at the lowest address. (The big end
comes first.)
Big-Endian vs. Little-Endian Processors/Controllers 18
v Load Store Operation 19

 The memory access related operations are performed by the special instructions load and store.
 If the operand is specified as memory location, the content of it is loaded to a register using the load
instruction. The instruction store stores data from a specified register to a specified memory location.

Load
Memory

Store

 The first instruction load R1, x loads the register R1 with the content of memory location x,
 the second instruction load R2,y loads the register R2 with the content of memory location y
 The instruction add R3, R1, R2 adds the content of registers R1 and R2 and stores the result in register R3.
 The next instruction store R3,z stores the content of register R3 in memory location z.

Instruction pipelining is assignment for you ?


2. Application Specific Integrated Circuits (ASICs) 20

 ASIC is a microchip designed to perform a specific or unique application.

 It integrates several functions into a single chip and there by reduces the
system development cost.

 Most of the ASICs are proprietary (which having some trade name) products,
it is referred as Application Specific Standard Products (ASSP). Example: ASIC interface
with ECG sensor to monitor
health
 ASIC consumes a very small area in the total system. Thereby helps in
the design of smaller systems with high capabilities and functionalities.

 The developers of such chip may not be interested in revealing the internal
details of it.
3. Programmable Logic Devices (PLDs) 21

 Logic devices provide specific functions, including device-to-device interfacing, data


communication, signal processing, data display, timing and control operations, and almost
every other function a system must perform.
fixed Logic devices
 Logic devices
Programmable Logic devices

 Fixed logic device are permanent, they perform one function or set of functions once
manufactured, they cannot be changed.

 Programmable Logic Devices (PLDs) offer customers a wide range of logic capacity, features,
speed, and voltage characteristics and these devices can be re-configured to perform any
number of functions at any time.
3. Programmable Logic Devices (cont.) 22

 The two major types of programmable logic devices:

1. Field Programmable Gate Arrays ( FPGAs):


 FPGAs offer the highest amount of logic density (8 million
system gates), the most features, and the highest performance.
 FPGAs are used in a wide variety of applications ranging from data
processing and storage, to instrumentation, telecommunications,
and digital signal processing.

2. Complex Programmable Logic Devices (CPLDs):


 CPLDs, by contrast, offer much smaller amounts of logic–up to
about 10,000 gates.
 CPLDs are used battery-operated, portable applications such as
mobile phones and digital handheld assistants.
Advantages of PLDs 23

Ø PLDs offer customers much more flexibility during the design cycle.

Ø PLDs do not require long lead times for prototypes or production parts.

Ø Because PLDs are already on a distributor’s shelf and ready for shipment.

Ø PLDs can be reprogrammed even after a piece of equipment is shipped to a customer


4. Commercial Off-the-Shelf Components (COTS) 24

 COTS product is one which is used ‘as-is’.

 The COTS component itself may be developed around a general


purpose or domain specific processor or an ASICs or a PLDs.

 The major advantage of using COTS is that they are readily


available in the market, are cheap and a developer can cut down
his/her development time to a great extent.
An example of a COTS product
for TCP/IP plug-in from WIZnet
 The major drawback of using COTS components in embedded design
is that the manufacturer of the COTS component may withdraw the
product or discontinue the production of the COTS at any time if a
rapid change in technology occurs.
Advantages and Disadvantages of COTS 25

 Advantages of COTS
§ Ready to use
§ Easy to integrate
§ Reduces development time

 Disadvantages of COTS
§ No operational or manufacturing standard (all proprietary)
§ Vendor or manufacturer may discontinue production of a particular COTS product
v Elements of an embedded system 26
MEMORY 27

 On-chip memory- built-in memory


 Off-chip memory- external memory to be connected

1) Program Storage Memory (ROM)


§ Stores the program instructions
§ Non-volatile memory (retains contents even after power is turned off)

2) Read-Write Memory/ Random Access Memory (RAM)


§ Data memory or working memory
§ Volatile memory (power is turned off, contents are destroyed)
Classification of ROM 28
Masked ROM (MROM) 29

 One-time programmable device


 Factory programmed by masking and metallization during production (hardwired technology for storing
data)
 Different mechanisms used for the masking process of ROM are
1. Creating enhancement or depletion mode transistor through channel implant
2. Creating a memory cell using a standard or high threshold transistor (high threshold mode the supply voltage
required to turn on the transistor is above the normal ROM IC operating voltage. This ensures the transistor is
always off and the memory cell stores always logic 0)
 The primary advantage of this is low cost for high-volume production
 Masked ROM is a good candidate for storing the embedded firmware for low cost embedded devices.

Limitations:
 MROM is permanent in bit storage, hence not possible to alter bit information.
 Cannot modify device firmware against firmware updates.
Programmable Read Only Memory (PROM) 30

 OTP (One Time Programmable Memory)


 Not pre-programmed by the manufacturer
 End user program the device
 Nichrome or polysilicon wires (fuses) arranged in a matrix
 Fuses not burned/blown represent a logic 1 (default state) whereas
fuses that are blown/burned represent a logic “0”.
 Low-cost solution for commercial production

Limitations:
 Cannot be reprogrammed
 Not useful for development purposes as the code is subjected to
continuous change (not economical to load code each time using OTP)
Erasable Programmable Read Only Memory (EPROM) 31

 Gives the flexibility to re-program the same chip


 Stores bit information by charging the floating gate of a FET
 EPROM programmer stores the bit information, which applies high voltage to charge the floating gate
 Contains quartz crystal window for erasing the stored information
 The window is exposed to ultraviolet rays for a fixed duration, the entire memory will be erased
 The EPROM chip is flexible in terms of re-programmability, it needs to be taken out of the circuit
board and put in a UV eraser device for 20 to 30 minutes.

Limitation:
 Tedious and time-consuming process
Electrically Erasable PROM (EEPROM) 32

 Information altered by electrical signals at the register/byte level


 Erased and re-programmed in-circuit
 These chips include a chip erase mode and in this mode they can be erased in a few milliseconds.

Limitation:
 Capacity is limited (few kilobytes)
Flash Memory 33

 FLASH memory is a variation of EEPROM technology.


 It combines the re-programmability of EEPROM and the high capacity of standard ROMs.(in MB)
 Stores information in an array of floating gate MOSFET transistors
 Erasing of memory can be done at the sector or page level without affecting other sectors or pages
(they are erased before re-programming)
 The typical erasable capacity of FLASH is of the order of a few 1000 cycles.
 Latest technology computers use BIOS (Basic Input/Output System) stored on a Flash memory chip,
called Flash BIOS

 Eg: Winbond Flash memory


 Uses: modems, pen drives
Classification of Random Access Memory (RAM) 34
Static RAM (SRAM) 35

 Static RAM stores data in the form of voltage.


 They are made up of flipflops. Static RAM is the
fastest form of RAM available.
 In typical implementation, an SRAM cell (bit) is
realised using six transistors (or 6 MOSFETs).
 Four of the transistors are used for building the
latch (flipflop) part of the memory cell and two for
controlling the access.
 SRAM is fast in operation due to its resistive
networking and switching capabilities.
SRAM cell implementation
 The major limitations of SRAM are low capacity and
high cost.

Visualization of SRAM cell


(2 cross-coupled inverters with read/write control)
Dynamic RAM (DRAM) 36

 Stores data in the form of a charge


Advantage:
 High-density, low-cost
Disadvantage:
 Information gets leaked off with time, so periodic refreshing required
 Special circuits called DRAM controllers are used for the refreshing operation
 The refresh operation is done periodically in millisecond intervals.

 MOSFET acts as a gate for incoming and outgoing data


 Capacitor acts as bit storage unit

DRAM cell implementation


SRAM Vs DRAM 37

SRAM DRAM
Made of 6 MOSFETs Made of a MOSFET and a Capacitor

Does not require refreshing Requires refreshing

Low capacity ( less dense) High capacity (highly dense)

Fast in operation. Typical access time is Slow in operation. Typical access time is
10ns 60ns.
More expensive Less expensive
Non-volatile RAM (NVRAM) 38

 Non-volatile RAM is a random access memory with battery backup

 It contains static RAM based memory and a minute battery for providing supply to the memory in the
absence of external power supply.

 The memory and battery are packed together in a single package.

 NVRAM is used for the nonvolatile storage of results of operations or for setting up of flags, etc.

 The life span of NVRAM is expected to be around 10 years.


 Eg : DS1744 from Maxim/Dallas is an example for 32KB NVRAM.
Memory Selection for Embedded System (ES) 39

 Memory requirement is dependent on the type of ES and application for which it is designed
Electronic Toy Design
 Identify the system requirement (complexity is less, the data memory requirement is minimal)
 Microcontroller with few bytes of internal RAM, few bytes or kilobytes of FLASH memory, few bytes of
EEPROM (if required)

Embedded Design with RTOS


 RTOS requires a certain amount of RAM for its execution and ROM for storing the RTOS image
 binary code for RTOS kernel containing all the services is stored in non-volatile memory (Like FLASH)
as either compressed or non-compressed data
 add a buffer value to the total estimated RAM and ROM size requirements.
 Eg: A smartphone device with Windows mobile operating system is a typical example for an embedded
device with OS.
Parameters that represent a memory 40

1) Memory size:
 Memory density expressed in terms of the number of memory bytes per chip
 Memory chips come in standard sizes like 512bytes, 1024bytes (1 kilobyte), 2048bytes (2 kilobytes),
4Kb, 8Kb, 16Kb, 32Kb, 64Kb, 128Kb, 256Kb, 512Kb, 1024Kb (1 megabytes), etc.
 Consider the address range supported by your processor
 For a processor/controller with a 16-bit address bus, the maximum number of memory locations that
can be addressed is 2^(16) = 65536 bytes = 64Kb.

2) Word size:
 The word size refers to the number of memory bits that can be read/write together at a time.
 4, 8, 12, 16, 24, 32, etc. are the word sizes supported by memory chips.
 Ensure that the word size supported by the memory chip matches with the data bus width of the
processor/controller.
41
42

Sensors and Actuators

Sensors and Actuators: interfacing of LEDs, 7-segment LED Displays, Piezo Buzzer,
Stepper Motor, Relays, Optocouplers, Matrix keyboard, Push button switches,
Programmable Peripheral Interface Device (e.g. 8255 PPI), etc. with the I/O subsystem of
the embedded system
v Sensors and Actuators 43

 Sensors :
§ A sensor is a transducer device that converts energy from one form to another
for any measurement or control purpose.
§ Example : we can identify that the sensor which counts steps for pedometer
functionality is an Accelerometer sensor and the sensor used in some of the
smartwatch devices to measure the light intensity is an Ambient Light Sensor (ALS)
v Sensors and Actuators 44

 Actuators:
§ Actuator is a form of transducer device (mechanical or electrical) which converts
signals to corresponding physical action (motion).
§ Actuator acts as an output device.
§ Example: smartwatches use Ambient Light Sensor to detect the surrounding light
intensity and uses an electrical/electronic actuator circuit to adjust the screen
brightness for better readability.
v The I/O Subsystem 45

 The I/O subsystem of the embedded system facilitates the interaction of the embedded
system with the external world.

 The interaction happens through the sensors and actuators connected to the input and
output ports respectively of the embedded system.

 The sensors may not be directly interfaced to the input ports, instead they may be
interfaced through signal conditioning and translating systems like ADC, optocouplers,
etc.
v The I/O Subsystem (cont.) 46

q Light Emitting Diode (LED)


q 7-Segment LED Display
q Stepper Motor
q Optocoupler
q Relay
q Piezo Buzzer
q Push Button Switch
q Keyboard
q Programmable Peripheral Interface ( PPI)
v Light Emitting Diode (LED) 47

 LED is an important output device for visual indication in any


embedded system. LED can be used as an indicator for the status
of various signals or situations.
 Typical examples are indicating the presence of power
conditions like ‘Device ON’, ‘Battery low’ or ‘Charging of battery’ for
a battery operated handheld embedded devices.
Fig : LED
interfacing
 LED is a p-n junction diode it contains an anode and a cathode.
For proper functioning of the LED, the anode of it should be
connected to +ve terminal of the supply voltage and cathode to the
–ve terminal of supply voltage. The current flowing through the LED
must be limited to a value below the maximum current that it can
conduct. A resister is used in series between the power supply and
the LED to limit the current through the LED.
v Light Emitting Diode (LED) (Cont.) 48

 LEDs can be interfaced to the port pin of a


processor/controller in two ways.
 Current source:
 The anode is directly connected to the port pin
 The port pin ‘sources’ current to the LED when the port pin is at
logic High (Logic ‘1’)

 Current Sink:
 The cathode of the LED is connected to the port pin
 The LED is turned on when the port pin is at logic Low (Logic ‘0’)
v 7-Segment LED Display 49

 The 7-segment LED display is an output device for displaying alpha numeric characters.
 It contains 8 light-emitting diode (LED) segments arranged in a special form.
 Out of the 8 LED segments, 7 are used for displaying alpha numeric characters and 1 is used
for representing ‘decimal point’ in decimal number display.
 The LED segments are named A to G and the decimal point LED segment is named as DP.
v 7-Segment LED Display 50

 The 7-segment LED displays are available in two different configurations, namely; Common
Anode and Common Cathode.
 In the common anode configuration, the anodes of the 8 segments are connected commonly whereas
in the common cathode configuration, the 8 LED segments share a common cathode line.
 The LED segment’s anode or cathode is connected to the port of the processor/controller in the order
‘A’ segment to the least significant port pin and DP segment to the most significant port pin.

Fig.: Common anode and cathode configurations of a 7-


segment LED Display
v 7-Segment LED Display 51

 7-segment LED display is a popular choice for low cost embedded applications like, Public telephone
call monitoring devices, point of sale terminals, etc.

[Link]
v Stepper Motor 52

 A stepper motor is an electro-mechanical device which generates discrete displacement


(motion) in response to dc electrical signals.
 It differs from the normal dc motor in its operation.
 The dc motor produces continuous rotation on applying dc voltage whereas a stepper
motor produces discrete rotation in response to the dc voltage applied to it.
 Stepper motors are widely used in industrial embedded applications, consumer electronic
products and robotics control systems.
 The paper feed mechanism of a printer/fax makes use of stepper motors for its functioning.
v Stepper Motor (Cont.) 53

 Based on the coil winding arrangements, a two-phase stepper


motor is classified into two. They are:
(1) Unipolar (2) Bipolar

(1) Unipolar:
§ A unipolar stepper motor contains two windings per phase.
§ The direction of rotation (clockwise or anticlockwise) of a 2-Phase unipolar stepper motor
stepper motor is controlled by changing the direction of
current flow.
§ Current in one direction flows through one coil and in the
opposite direction flows through the other coil.
§ It is easy to shift the direction of rotation by just switching the
terminals to which the coils are connected.
v Stepper Motor (Cont.) 54

(2) Bipolar:
§ A bipolar stepper motor contains single winding per phase.
§ For reversing the motor rotation the current flow through the windings is reversed
dynamically.
§ It requires complex circuitry for current flow reversal.
v Stepper Motor (Cont.) 55

 The stator winding details for a two phase unipolar stepper motor is shown in Fig. below.

Fig. Stator Winding details for a 2 Phase unipolar stepper motor


v Stepper Motor (Cont.) 56

 The stepping of stepper motor can be implemented in different ways by changing the sequence
of activation of the stator windings. The different stepping modes supported by stepper motor are
explained below.

 Full Step In the full step mode both the phases are energized simultaneously. The coils A, B,
C and D are energized in the following order:
v Stepper Motor (Cont.) 57

 Wave Step:
In the wave step mode only one phase is energized at a time and each coils of the phase
is energized alternatively. The coils A, B, C, and D are energized in the following order.
v Stepper Motor (Cont.) 58

 Half Step
It uses the combination of wave and full step. It has the highest torque and
stability. The coil energizing sequence for half step is given below.
v Stepper Motor (Cont.) 59

 The rotation of the stepper motor can be reversed by reversing the order in which the coil is
energized.
 Two-phase unipolar stepper motors are the popular choice for embedded applications.
 The current requirement for stepper motor is little high and hence the port pins of a
microcontroller/processor may not be able to drive them directly.
 Also the supply voltage required to operate stepper motor varies normally in the range 5V to
24 V.
 Depending on the current and voltage requirements, special driving circuits are required
to interface the stepper motor with microcontroller/processors.
v Stepper Motor (Cont.) 60

Ø The following circuit diagram illustrates the interfacing of a stepper motor through a driver
circuit connected to the port pins of a microcontroller/processor.

Fig. The interfacing of a stepper motor through a driver circuit


v Optocoupler 61

 Optocoupler is a solid state device to isolate two parts of a circuit.


 Optocoupler combines an LED and a photo-transistor in a single
housing (package).
 Following figure illustrates the functioning of an optocoupler device.

Optocoupler
 In electronic circuits, an optocoupler is used for suppressing interference in data communication, circuit
isolation, high voltage separation, simultaneous separation and signal intensification, etc.
 Optocouplers can be used in either input circuits or in output circuits. Figure below illustrates the usage
of optocoupler in input circuit and output circuit of an embedded system with a microcontroller as the
system core.

Fig. optocoupler in input and output circuit


v Relay 62

 Relay is an electro-mechanical device. In embedded application,


the ‘Relay’ unit acts as dynamic path selectors for signals and
power.
 The ‘Relay’ unit contains a relay coil made up of insulated wire on
a metal core and a metal armature with one or more contacts.
 ‘Relay’ works on electromagnetic principle. When a voltage is
applied to the relay coil, current flows through the coil, which in
turn 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.
v Relay (Cont.) 63

Ø ‘Relays’ are available in different


configurations. Figure given below
illustrates the widely used relay
configurations for embedded applications.

Fig.: Relay
Ø The Single Pole Single Throw configuration has only one pathconfigurations
for information flow. The path is
either open or closed in normal condition.
Ø For normally Open Single Pole Single Throw relay, the circuit is normally open and it becomes
closed when the relay is energized.
Ø For normally closed Single Pole Single Throw configuration, the circuit is normally closed and it
becomes open when the relay is energized.
Ø For Single Pole Double Throw Relay, there are two paths for information flow and they are
selected by energising or de-energising the relay.
v Relay (Cont.) 64

Ø The Relay is normally controlled using a relay driver circuit connected to the port pin of
the processor/controller.
Ø A transistor is used for building the relay driver circuit.

Fig. Transistor based Relay driving


circuit
v Piezo Buzzer 65

 Piezo buzzer is a piezoelectric device for generating audio indications in embedded application.
 A piezoelectric buzzer contains a piezoelectric diaphragm which produces audible sound in
response to the voltage applied to it.
 Piezoelectric buzzers are available in two types. ‘Self-driving’ and ‘External driving’.
 The ‘Self-driving’ circuit contains all the necessary components to generate sound at a predefined
tone. It will generate a tone on applying the voltage.
 External driving piezo buzzers supports the generation of different tones. The tone can be varied
by applying a variable pulse train to the piezoelectric buzzer.
v Push Button Switch 66

 It is an input device. Push button switch comes in two configurations, namely ‘Push to Make’ and
‘Push to Break’.
 In the ‘Push to Make’ configuration, the switch is normally in the open state and it makes a circuit
contact when it is pushed or pressed.
 In the ‘Push to Break’ configuration, the switch is normally in the closed state and it breaks the circuit
contact when it is pushed or pressed.
 In embedded application push button is generally used as reset and start Switch.
v Keyboard 67

 Keyboard is an input device for user interfacing.


 If the number of keys required is very limited, push button switches can be used and they can
be directly interfaced to the port pins for reading.
 Matrix keyboard is an optimum solution for handling large key requirements.
 Matrix keyboard greatly reduces the number of interface connections.
 In a matrix keyboard, the keys are arranged in matrix fashion.
 For example, for interfacing 16 keys, in the direct interfacing technique 16 port pins are
required, whereas in the matrix keyboard only 8 lines are required. The 16 keys are
arranged in a 4 column × 4 Row matrix.
 The key press in Matrix keyboard is identified with row-column scanning technique.
v Keyboard (Cont.) 68

Matrix keyboard Interfacing


vProgrammable Peripheral Interface
( PPI) 69

 Assignment for you?


70

You might also like