19
8/9/2016 1 ĐẠI HC QUC GIA TP.HCHÍ MINH TRƯỜNG ĐẠI HC BÁCH KHOA KHOA ĐIN-ĐIN TBMÔN KTHUT ĐIN T1 Embedded System Design Chapter 4: Hardware design for an embedded system 1. Hardware components 2. Design block diagrams 3. Design detail schematics 4. Hardware Design Deployment Bmôn KThut ĐinT1. Hardware components 1. Microprocessors/Microcontrollers 8/16/32bit microcontroller: PICs, ARMs DSP 2. Peripherals Input devices: button, switch, keyboard, mouse, touchscreen Display devices: LED, text LCD, graphic LCD Sensors: temperature, humidity, light, motion Actuators: motor, solenoid, relay, FET, triac, SCR Interfaces: UART, USB, I2C, SPI, Ethernet, Wifi, Bluetooth, Zigbee 3. Clock / reset circuits 4. Power supply AC/DC adapters Battery 2 Chapter 4

Embedded System Design - Project Management Systemtqvinh/Lectures/ESD/ESD-Ch4_2016.pdf · Embedded System Design Chapter 4: Hardware design for an embedded ... process participants,

Embed Size (px)

Citation preview

8/9/2016

1

ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINHTRƯỜNG ĐẠI HỌC BÁCH KHOA

KHOA ĐIỆN-ĐIỆN TỬ BỘ MÔN KỸ THUẬT ĐIỆN TỬ

11

Embedded System Design

Chapter 4: Hardware design for an embedded system

1. Hardware components2. Design block diagrams3. Design detail schematics4. Hardware Design Deployment

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components1. Microprocessors/Microcontrollers

– 8/16/32‐bit microcontroller: PICs, ARMs

– DSP

2. Peripherals– Input devices: button, switch, keyboard, mouse, touch‐screen

– Display devices: LED, text LCD, graphic LCD

– Sensors: temperature, humidity, light, motion

– Actuators: motor, solenoid, relay, FET, triac, SCR

– Interfaces: UART, USB, I2C, SPI, Ethernet, Wifi, Bluetooth, Zigbee

3. Clock / reset circuits

4. Power supply– AC/DC adapters

– Battery

2Chapter 4

8/9/2016

2

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components• Microprocessors/Microcontrollers

– Is a center processing unit

– Control input devices, sensors, actuators, display devices

– Process tasks, functions, and algorithms

– Interface other systems

3Example of an embedded system

microprocessor

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components• Microprocessors/Microcontrollers

– The Intel MCS‐51 (commonly referred to as 8051) is a Harvardarchitecture, CISC instruction set, single chip microcontroller (µC) serieswhich was developed by Intel in 1980

– PIC is a family of modified Harvard architecture microcontrollers madeby Microchip Technology

– ARM is a family of instruction set architectures for computer processorsdeveloped by British company ARM Holdings, based on a reducedinstruction set computing (RISC) architecture.

4

PIC8051 ARM

Chapter 4

8/9/2016

3

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components• Peripherals

– Input devices: button, switch, keyboard, mouse, touch‐screen

– Display devices: LED, text LCD, graphic LCD

– Sensors: temperature, humidity, light, motion

– Actuators: motor, solenoid, relay, FET, triac, SCR

– Interfaces: UART, USB, I2C, SPI, Ethernet, Wifi, Bluetooth, Zigbee

5

Display device: LCD

Input device: keypad

Interface: UART

Actuator: relay

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components• Clock / reset circuits

– Clock circuits: provide clock signal for microcontrollers

6

On-chip oscillator

XTAL1

XTAL2

20MCRYSTAL

C1

22p

C2

22p

Off-chip oscillator(a) Crystal oscillator (b) RC oscillator

Chapter 4

8/9/2016

4

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components

• Clock / reset circuits

– Reset circuits: provide reset signal for microcontrollers

7

RESET

R110k

RESET

R210k

RESET

R310k

C31uF

Active-low reset Active-high reset Power-on auto reset

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components• Power supply

– AC/DC adapters

8Chapter 4

8/9/2016

5

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components• Power supply

– Switching power supply

9Chapter 4

A simple switching power supply using LM2576

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components

• Power supply

– Battery

10

Simple 5VDC battery power supply

12VDC battery backup power supply

Chapter 4

8/9/2016

6

Bộ môn Kỹ Thuật Điện Tử

1. Hardware components• Connectors

– Interface with extension hardware

11

Power connector

connectors

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

Team work • Describe hardware components of your design for your class project.

• List 4 component groups: 

– Processor / microcontroller

– Peripheral

– Clock/reset circuit

– Power supply

12Chapter 4

8/9/2016

7

Bộ môn Kỹ Thuật Điện Tử

2. Design block diagram• Block diagram 

– Is a diagram of a system in which the principal parts or functions are represented by blocks connected by lines that show the relationships of the blocks

– Use to model the system graphically and show the relationships in the process. 

– presents a quick overview of major process steps and key process participants, as well as the relationships and interfaces.

13Chapter 4

Bộ môn Kỹ Thuật Điện Tử

2. Design block diagram

• Hardware block diagram

– Use a rectangle for a hardware block

– Use an arrow for a connection

14

Single connection Multiple connections

One way

Two ways

One way

Two ways Multiple ways

Curve connection

Chapter 4

8/9/2016

8

Bộ môn Kỹ Thuật Điện Tử

2. Design block diagram

• Hardware block diagram

– Use a symbol for a special block

15

computerNetworkEnergyLamp DatabaseSpeaker

Antenna Bell Microphone Amplifier Converter Rectifier

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

2. Design block diagram• Block diagram features:

– Block diagram name

– Physical blocks

• Block name

• Have at least one connection

– Connections

• One direction / two directions/ multiple directions

• Single / multiple connections

• Data type of connections

– Special block

• Block name

• Extra information16Chapter 4

8/9/2016

9

Bộ môn Kỹ Thuật Điện Tử

2. Design block diagram• Recommendations

1. CPU block is at the center

2. Sensor/input blocks are at the left side

3. Actuator blocks are at the right side

4. User interface blocks are at the top

5. Memory/ database/ blocks are at the bottom

6. Use different colors for differently functional blocks

7. Use symbols for special blocks

• Exceptions

– Not enough space

– Special systems such as SoC, NoC

– Complex systems

17Chapter 4

Bộ môn Kỹ Thuật Điện Tử

Hardware block diagram – Example 1• Poor example

– No block diagram name

– Wrong direction of connection

– Problem of single / multiple connections

– No data type of connections

18

PIC Microcontroller

Temperature sensor

Buttons

Heater

Chapter 4

8/9/2016

10

Bộ môn Kỹ Thuật Điện Tử

Hardware block diagram – Example 2

19

MOTOR CONTROL BLOCK DIAGRAM

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

Hardware block diagram – Example 3Home security system

=> Make this block diagram better!

20

PIC Microcontroller

Door sensor

Smoke sensor

Motion sensor

IR sensor

SIM900

Chapter 4

8/9/2016

11

Bộ môn Kỹ Thuật Điện Tử

3. Design detail schematics• Schematic components:

– Information table• Title

• Description

• Author

• Date

• Revision

– Schematic circuit• ICs

• Devices

• Connections

21

– Extra information• Explanation of operations

• Parameters

• Acronyms  

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

3. Design detail schematics – Example 1

22

RA0/AN02

RA1/AN13

RA2/AN2/VREF-4

RA4/T0CKI6

RA5/AN4/SS7

RE0/AN5/RD8

RE1/AN6/WR9

RE2/AN7/CS10

OSC1/CLKIN13

OSC2/CLKOUT14

RC1/T1OSI/CCP216

RC2/CCP117

RC3/SCK/SCL18

RD0/PSP019

RD1/PSP120

RB7/PGD40

RB6/PGC39

RB538

RB437

RB3/PGM36

RB235

RB134

RB0/INT33

RD7/PSP730

RD6/PSP629

RD5/PSP528

RD4/PSP427

RD3/PSP322

RD2/PSP221

RC7/RX/DT26

RC6/TX/CK25

RC5/SDO24

RC4/SDI/SDA23

RA3/AN3/VREF+5

RC0/T1OSO/T1CKI15

MCLR/Vpp/THV1

U1

PIC16F877

VDD

CE

7R

D6

C/D

8

VS

S2

VD

D3

VE

E4

WR

5

D0

10

FS

118

FG

1

D1

11

D2

12

D3

13

D4

14

D5

15

D6

16

D7

17

RS

T9

LCD1PG12864F

VD

DV

EE

S1

R110k

X14MHz

C1

10p

C2

10p

D2

R2

10k

1 2 3 4

J1CONN-H4

R310k

D1

1N4148

E l e c t r o n i c s

Labcenter Electronics, 53-55 Main Street, Grassington, North Yorkshire, BD23 5AAFax: +44 (0)1756 752857 Tel: +44 (0)1756 753440

Email: [email protected] http://www.labcenter.co.uk/WWW:

EPE PIC/LCD DEMO

This circuit is taken from John Becker's article in the February 2001 editionof Everyday/Practical Electronics and is reproduced with theirpermission.

It is an excellent demonstration of how Proteus VSM can be used to carry out experiments with microprocessors and their peripherals without the need toassemble the physical hardware.

EPE PIC/LCD DEMO

Chapter 4

8/9/2016

12

Bộ môn Kỹ Thuật Điện Tử

3. Design detail schematics – Example 2

23

Size Rev

Date: Sheet of

Title

1

Cadence Design Systems2655 Seely Av enue

408.943.1234

A

1 1Thursday , Nov ember 01, 2012

BANDPASS

San Jose, Calif ornia 95134

U1

OP-07

+3

-2

V+

7V

-4

OUT6

OS11

OS28

R3

400

R1

50k

C3

0.1u

R560k

0

0

V1

AC = 1TRAN =

DC =

-15

15

C1

0.1u

U2

OP-07

+3

-2

V+

7V

-4

OUT6

OS11

OS28

R4

1.2k

R2

49k

C4

0.25u

-15

out

R649k

15

C2

0.1uV2

15

V3-15

0

0

-15

15

0

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

Group discussion • Discus about below block diagram:

24

PIC Microcontroller

Keypad

LCD

Speaker

Solenoid

Battery Management

Digital door lock

Chapter 4

8/9/2016

13

Bộ môn Kỹ Thuật Điện Tử

Team work 

• Draw a block diagram for your class project

25Chapter 4

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• Choose options for hardware design

• Example: Temperature controller

Chapter 4 26

ComponentsOption 1 Option 2

Description Score Description Score

Processor / Microcontroller

PIC16F877 Program memory  8K

8 ARM STM32F030Program memory 16K

6

Temperature Sensor

LM35(analog output)

8 DS18B20(digital output)

7

Display Text LCD LCD1602

9 Graphic LCD LM32019P2

7

TOTAL 25 19

High score: high quality, cheap price, familiar, much support from manufacture Low score: expensive, difficult to use, high power consumption, …

8/9/2016

14

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment

• Quality Function Deployment (QFD) is a method:

– proposed by Dr. Yoji Akao in 1996

– to transform qualitative user demands into quantitative parameters

– to deploy the functions forming quality

– to deploy methods for achieving the design quality into subsystems and component parts, 

– to specific elements of the manufacturing process.

27Chapter 4

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment

• House of Quality: is a techniques based on QFD– Appeared in 1972

– The house can be divided in “rooms”

28Chapter 4

8/9/2016

15

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 1: What?

• What is desired in order to reach the new service’s development?

29

No. Customer’s requirements

1 Long life cycle

2 Easy to charge energy

3 Low power

4 Low cost

Example: Automatic light control system

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 2: How list

• How are the design requirements of the product?

30

No. Design requirements

1 Low power microcontroller

2 LED light bulb

3 Solar panel

4 Lithium‐ion battery

Example: Automatic light control system

Chapter 4

8/9/2016

16

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 3: Relation matrix• shows the relationships between “What” and “How”

• defined by three strength levels: weak, medium, and strong relation. 

31

Designrequirement

Customer’s requirement

Low power micro‐controller

LED light bulb

Solar panel Lithium‐ion battery

Long life cycle S S S S

Easy to charge energy W W S M

Low power M S W M

Low cost M M M S

Chapter 4

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 4: Benchmarking• Benchmarking is carried out for “What” and “How”. 

• Persons in charge of the product design make this evaluation 

32

Designrequirement

Customer’s requirement

Lowpower micro‐controller

LEDlight bulb

Solar panel

Lithium‐ion battery

Evaluator1

Evaluator2

Evaluator3

Bad Average Good

Long life cycle S S S S X

Easy to charge energy W W S M X

Low power M S W M X

Low cost M M M S X

Chapter 4

8/9/2016

17

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 5: Importance level

• Create a value for each relationship between client and design requirement

• The personnel in charge of the system design make this evaluation.

33Chapter 4

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 5: Importance level

34

Designrequirement

Customer’s requirement

Lowpower micro‐controller

LEDlight bulb

Solar panel

Lithium‐ion battery

Evaluator1

Evaluator2

Evaluator3

What Importance Bad Average Good

Long life cycle 4 S S S S X

Easy to chargeenergy

1 W W S M X

Low power 2 M S W M X

Low cost 3 M M M S X

Importance 52 64

Strong = 9 Medium = 3 Weak = 1

Chapter 4

8/9/2016

18

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 6: Correlation matrix

• is a triangular table.

• describes the strength of the relationships between the design requirements.

• is to identify which requirements support each other and which ones do not.

35Chapter 4

Bộ môn Kỹ Thuật Điện Tử

4. Hardware Design Deployment• House of Quality:

– Table 6: Correlation matrix

• ++ Strong positive

• + positive

• ‐ negative

36

Low power micro‐controller

LED light bulb Solar panel Lithium‐ion battery

+

++

+

Chapter 4

8/9/2016

19

Bộ môn Kỹ Thuật Điện Tử

Team work 

• Design House of Quality for your class project

37Chapter 4