Download Design_Hardware - Network and Systems Laboratory

Document related concepts

Control system wikipedia , lookup

Alternating current wikipedia , lookup

History of electric power transmission wikipedia , lookup

Telecommunications engineering wikipedia , lookup

Embedded system wikipedia , lookup

Mains electricity wikipedia , lookup

Opto-isolator wikipedia , lookup

Electronic engineering wikipedia , lookup

Fault tolerance wikipedia , lookup

Printed circuit board wikipedia , lookup

Surface-mount technology wikipedia , lookup

Network analysis (electrical circuits) wikipedia , lookup

Public address system wikipedia , lookup

Transcript
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Making A Hardware Board
Define system
requirements
Finding components
and design circuit
PCB board
Capture Schematic
Printed Circuit
Board (PCB) layout
Professional PCB
manufacturers
Soldering
Components
Home made PCB
prototype
Testing
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Typical Process
Define requirements
Get the circuits
1.
2.
Design from scratch
Google
Ask some one who know



Find components
2.
Which IC you want to use

Create component libraries in the PCB software
Capture schematic
3.
4.
Draw the circuit on the PCB software

Layout
5.
1.
2.
3.
Decide the shape of the board
Placing components
Make connections
Make the hardware board
6.


Export layout to manufacturer output, send to PCB manufacturer
Home made PCB
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Today’s Class
 Focus on PCB (Printed Circuit Board) design and
layout
 Assume you can “find” the circuit you want
 How to use PCB design software

We use Altium Designer 6
 How to make the hardware “board”
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Why “Find”?
 Circuit design is a large topic
 Impossible to teach in a few hours
 Circuits for sensor network applications are usually simple
and traditional
 Many resources available
 Technology advance
 Today, you don’t need to design everything from scratch
 Many things are provided to you as a package
 All you need to do are



Find the available components
Read the datasheet carefully
Put things together
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Resources Available On Internet
 Books
 Google
 Application notes
 A document which gives more specific details on using a
component in a specific application
 Provided by IC manufacturers

Example: TI MSP430 application notes
 Reference design
 Especially RF IC
 Example: CC2420 reference design
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Traditional Circuit Design
 Circuits are build up by many fundamental components
 Resistor, capacitor
 Diode
 Transistors
 Operational amplifier
Operational amplifier (Op-Amp)
 etc.
This is a instrumentation amplifier
circuit compose by three op-amps
and resistors. It amplify the input
voltage. It has better accuracy and
stability, usually used for medical
and industrial measurement
You can use
this circuit to
amplify sensor
signal and
feed to ADC
Vout = (V2-V1)*(1+2R/Rgain)
Rgian can adjust the gain of the amplifier
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
In One Package Now
 AD623 In-Amp
 http://www.analog.com/en/prod/0%2C2877%2CAD623%2C00.html
An instrumentation
amplifier in one package
 Even better:
 In-Amp + 16-bit ADC (AD7798)
 In-Amp + 24-bit ADC (AD7799)
 www.analog.com
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Modules
 Many companies provide whole system in a package
 Bluetooth module, Ethernet module, GPRS module,
802.11 module, Zigbee module, etc.
 Example: Multitech (www.multitech.com)
 SocketEthernet IP



Embedded Serial-to-Ethernet Device Server
A complete server on this device
HTTP, SMTP, FTP, SNMP, TCP/IP, POP3…
 SocketWireless® Bluetooth®
 SocketWireless® Wi-Fi®
 SocketModem® GPRS
MSP430
UART
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Putting Things Together
 You can find reference circuits and module
 These are related easy to find on Internet
 But how to put things together and make a PCB board?
 Lack of resources teaching the whole process
 Hardware prototyping
 Breadboard
 Printed Circuit Board
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Breadboard




Fast and easy
Signal unstable and inaccurate
Ugly!
Un-professional
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Printed Circuit Board
Home made PCB
 Take some time
 Professional
 Signal is more stable
Industry fabrication PCB
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Outline
 Understand the schematic
 Use Taroko as an example
 Design a better accelerometer board
 Define system requirements
 PCB layout
 Making PCB at home
Next Class
 Soldering
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Function Block
Power
CC2420
Radio
MSP430
Sensors, memory, LEDs,
switches, expension
USB
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Schematic
Rectangle with pin
names are usually
components
Usually on the schematic or
their description, they will tell
you what component it is (part
number). You can find the
datasheet of the component
from Internet
Rectangle with
numbers are usually
connector
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Schematic
Switches
LEDs
Light sensors
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Real Device And Schematic
There will be a
designator for
each component
on schematic. And
it is 1-to-1 map to
the PCB board
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Map to Real Device
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Map to Real Device
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Map to Real Device
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Search For Datasheet
 M25P80
 Datasheet

8 Mbit, low voltage, serial Flash memory with 75 MHz SPI bus
interface
 It is a flash memory
 SHT11
 Datasheet

SHT1x / SHT7x
 Temperature and Humidity Sensor
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
What To Look In Datasheet
 Functionality
 What does this IC do
 Electrical Characteristic
 Supply voltage
 Current consumption
 Etc
 Application Information
 How to make it work
 Packages
 What is the IC looks like
 Shape, size, pins design, pitch, etc.
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
M25P80 Datasheet
SPI interface
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
M25P80 Signal Description
SPI interface
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Connect M25P80 and MSP430
Pin 2, 5, 6 is SPI
interface on M25P80,
connected to SPI
interface of MSP430
Chip select and Hold
pin connected to GPIO
pins on MSP430
Write Protect is connected
to Vcc, that means we are
not using write protect
function
GPIO on
MSP430
The SPI interface is
shared with radio chip
SPI interface
on MSP430
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
M25P80 Datasheet
 Usually at the end of the datasheet, there will be some
section call “Packaging information”, “Package”, ……
 This section contain the information about how the
chip looks like
 Lets take a look at the common packages
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Through-hole vs SMD
 Through-hole
 A mounting scheme
 Pins inserted into holes drilled in PCB and soldered to
pads on the opposite side


Expansion connector on Taroko
Light sensor on Taroko
 SMD: surface mounted device
 Components are mounted directly onto the surface of
PCB


Many devices on Taroko are SMD
Resistor, capacitor, MSP430, and more.
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Through-hole Packages
 SIP: single in-line packages
Through-hole package are
old, their number decreased
in modern design
 DIP: dual in-line packages
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
SMD Packages
 Chip resistors, capacitors, inductors
 0402, 0603, 0805, …


Represent size of the chip
0805 means 0.08” x 0.05” rectangle
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
SMD Packages
 SO: Small outline
 Usually refer to IC with two rows of leads
 QFP: Quad flat package
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
SMD Packages
 QFN: Quad flat package, no-leads
 The packages we introduced just now are most
commonly used
 Device datasheet should include the package
information
 You will need it for PCB layout
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
SMD Packages
 BGA: Ball Grid Array
 PGA: Pin Grid Array
These two are widely used
in high end processor.
They allow more pin-out
from a single package. We
seldom use ICs in these
package, it is too difficult
to solder by hand
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
M25P80 Packages
 A chip may have
more than one
package
 M25P80 has three
 Package
information gives
you the footprint
of the chip
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
SO8W
 We use M25P80 SO8W package on Taroko
b
e
E
A dot here
defines pin #1
E1
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Function Block
Power
?
CC2420
Radio
MSP430
USB
Sensors, memory, LEDs,
switches, expension
We already go
through this part,
what about the
others?
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko USB schematic
USB to serial chip
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Radio Schematic
Radio chip
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Radio And USB
 These two function blocks are more complicated
 Usually you try to find a chip that include everything
 That’s what Taroko did
 For radio, they choose CC2420 chip from Chipcon (now
TI)

IEEE 802.15.4 compatible
 For USB, they choose FT232 from FTDI

What it does is convert UART signal to USB signal
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Reference Design
 Usually for these complicated ICs, the manufacturers
will provide reference design
 Which tell you how to connect the device
 Lets take a look at the reference design of FT232
 Go to the product page
 Look around the documentation




Application notes
Schematic
Reference design
Etc
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
From FT232 Reference Design
It looks similar to
the schematic on
Taroko
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
RF Chip Reference Design
 High frequency layout is a different territory
 Especially RF chip layout
 It require high level of detailed knowledge in
electronic
 That’s not what we can do
 I don’t how to do the RF layout
 Most of us just copy the reference design from
manufacturer
 www.ti.com
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Still One Part Missing
?
Power
CC2420
Radio
MSP430
Sensors, memory, LEDs,
switches, expension
what about Power?
USB is 5V, MSP430 operating
range is 1.8V ~ 3.6V. How to
get supply power from USB?
USB
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Regulator
 A semiconductor device that converts an input DC
voltage (usually a range of input voltages) to a fixedoutput DC voltage
 Many types of regulators, most commonly used
 Linear regulators
 Switching regulators
 You might accept power supply from various sources
with different voltage, but you need a stable voltage for
your system
 Use a regulator
(5V ~ 40V)
input
Regulator
output
3.3V (fixed)
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Switching Regulator can
step up the voltage
Linear Regulator
(3.3V) input
Linear
regulator
 Output voltage < input voltage
 All linear regulators require an input voltage at least some
minimum amount higher than the desired output voltage

output 5V
This minimum amount is called drop-out voltage
 You can only step down the voltage
 Inefficient, power dissipated as heat
Power provided at the
output = 5V * 60mA
= 300mW
(5V ~ 40V)
Power provided at the
output = 3.3V * 60mA
= 198mW
input
Regulator
output
Taroko
Power dissipated on regulator
= 300mW – 198mW
= 102mW
3.3V (fixed)
Taroko current
consumption=60mA
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Key Parameters of Regulators
 Input voltage range
 A range of possible input voltage
 Output voltage
 Fixed to some value
 Adjustable

Can be adjust by some external resistors
 Maximum output current
 Maximum current allowed
 Drop-out voltage
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Linear Regulator ICs
 MCP1700T-3302TT (on Taroko)
U25 on Taroko
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Typical Application Circuit
 Usually the datasheet has the typical application
circuit
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Power Supply
5V U_VCC bypass
capacitors
5V U_VCC input
Regulator:
5V -> 3.3V
P_DVCC is 3.3V,
supply to VCCin
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Power Supply
VCCin bypass
and filter.
Produce DVCC
VCCin from
previous sheet
DVCC supply the
other components
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Taroko Power Supply: Summary
Regulator:
5V -> 3.3V
DVCC
Taroko
System
If you connect a battery
to Taroko, the power is
enter from here
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Why To Buy
 You have a schematic, and already found out what is the
components on it
 But, where to buy?
 Various sources
 Online retailers


www.digikey.com
www.mouser.com
 Local distributors
 M25P80
 MCP1700
These are probably two of the world largest
online electronic components retailers. If
the component you need cannot buy from
these two sources, you might want to
consider the other component!
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Outline
 Understand the schematic
 Use Taroko as an example
 Design a better accelerometer board
 Define system requirements
 PCB layout
 Making PCB at home
 Soldering
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Making A Hardware Board
Define system
requirements
Finding components
and design circuit
PCB board
Capture Schematic
Printed Circuit
Board (PCB) layout
Professional PCB
manufacturers
Soldering
Components
Home made PCB
prototype
Testing
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
MSP430 build-in ADC
 A better accelerometer measurement
Resolution
 MSP430 build-in ADC
= (2.5-0)/4096

12-bit, voltage reference: 0~2.5V
 ADXL330 sensivity


= 0.6mV
Resolution from MSP430 measurement
= (0.6)/300
= 20 mg
300 mV/g
Device resolution: 2.5 mg @ 50Hz
 Measured by MSP430 build-in ADC, we can only have 20
mg at best

In real measurement, it is usually much worst
 We need a higher resolution ADC
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Need Another ADC
 Search around the manufacturer’s website
 www.analog.com
 We found AD7798/AD7799




3 channels, 16-bit/24-bit, 470 SPS
2 mW power consumption
Build-in instrumentation amplifier (IN-AMP)
SPI interface
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
AD7798/AD7799
Voltage reference
SPI interface
3 channel inputs
Build-in signal amplifier
16/24-bit ADC
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
System Block Diagram
24-bit Accel
Vcc
Accelerometer
x
y z
Digital interface
AD7799
GND
Because the expansion of Taroko
do not have SPI interface, we use
GPIO to simulate SPI interface
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
The Circuit
Vcc
Vcc
GND
Vcc
Xout
Yout
Zout
Vcc
REFIN(-), AIN1(-),
AIN2(-), AIN3(-)
connect GND
2
4
6
8
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Making A Hardware Board
Define system
requirements
Finding components
and design circuit
PCB board
Capture Schematic
Printed Circuit
Board (PCB) layout
Professional PCB
manufacturers
Soldering
Components
Home made PCB
prototype
Testing
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
PCB Layout
 Software
 We are using “Altium Design 6”
 There are many other software available
 Process
1. Initial setup
2. Create schematic library
3. Create PCB library
4. Capture schematic
5. PCB layout
6. Output
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Altium Designer 6
 Electronic product development solution
 Schematic capture
 PCB Board design
 Simulation
 FPGA design
 etc.
 We will use it to do the PCB layout
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
PCB Layout Process
 Process
1. Initial setup
1.
2.
3.
2.
3.
4.
5.
6.
Create design workspace
Create PCB project
Add new “Schematic”, “PCB”, “Schematic library” and “PCB
library”
Create schematic library
Create PCB library
Capture schematic
PCB layout
Output
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Schematic Library
 Component list (what components you need)
 AD7798
 ADXL330
 Miscellaneous components



Resistor
capacitor
10 pins connector
 Schematic library contain the components you will use
 Altium Designer has a collection of libraries



Search the libraries
If the components you want is not in the libraries provide, you have
to create one (both AD7798, ADXL330 was not found)
 Create library components for AD7766 and ADXL330
Copy Miscellaneous components
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
AD7799 And ADXL330
 final result
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
PCB
copper
1-layer board
copper
copper
2-layer board
Multi-layer board
(Taroko is 4-layer board)
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Terminologies
Top layer: copper on top
Top overlay: white marks on top layer
Keep out layer: defines the shape of
the board
pads: holds the IC leads
vias: holes
Bottom layer: copper on bottom
Bottom overlay: white marks on Bottom layer
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
PCB Library
 Once you have every component you need on the
schematic library, you can start create PCB library
 PCB library defines the footprint of the component
 Footprint of ADXL330 and AD7798

“Dimension” section in the datasheet
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
What Is Footprint
A footprint created
in the software
After finish the layout
and get the PCB board.
This is how it look like.
AD7798 placed on the
footprint
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Dimension
The basic idea is the
footprint you defined can
fits the chip
6.4mm
extra space for
soldering
 Must follow the exact dimension
 Other wise the component cannot solder on the board
 Leave some extra space for soldering
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Simple Calculation
7.7mm
4mm
(0.3* 1.85) mm
These are pads, they use to
hold the lead of the IC. You
can define the length you
want. You must leave some
space for soldering
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Create Footprint
 By wizard
 Manual edit
 Place pads
 Place overlay

The white mark
 Place through-hole
 If necessary
 Copy miscellaneous component’s footprints
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Link Schematic Library And PCB Library
 After create all the footprint need, linking with the
schematic library
 link AD7799, ADXL330
 link Miscellaneous components
 Notes
 Pins on the schematic library must map to the pins on
PCB library, which is identical to real chip.
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Capture Schematic
 Schematic library and PCB library are ready
 Capture Schematic
 01
 02
Vcc
Vcc
GND
Vcc
Give every power
supply line a 0.1 μF
capacitor
Xout
Yout
Zout
REFIN(-), AIN1(-),
AIN2(-), AIN3(-)
connect GND
Vcc
2
4
6
8
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
The Schematic
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Export to PCB
 Compile the schematic and export the components to
PCB design document
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
PCB Layout
 Setup the layout environment
For example, a (2cm x
2cm) rectangle
 Defines the keep out layer
 Place the component 01 02
 Component placing is important
 Carefully place the component according to the signal path
 Place the bypass capacitor as close to the power pin as possible
 Editing design rules
 It defines the rules that your PCB board must follow
 Routing 01 02 03 04 05 06 07
 Rule of thumb

Route the power line first, route them at the edge



Make the track width wider for power line
Route the signal line on the top layer as much as you can
Make the bottom layer as a continuous ground plane
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Design Rules Check (DRC)
 This function check everything
 According to the rules you setup
 If errors found, must fix it
 Clearance Constraint
 Broken-Net Constraint
Network and Systems Laboratory
nslab.ee.ntu.edu.tw
Fabrication Outputs
 Export the layout to fabrication outputs
 Send these files to PCB manufacturer
 wait for about 1.5 weeks
 cost about NT4000 ~ NT6000
 you will get a professional PCB board