Checkpoint LAB | USB-RS232 | input and output electronics SCHEMATIC - CHECKPOINTS

input and output
electronics
PRACTICAL DESIGN
CONSIDERATIONS
1
Prof. George Slack
Lecturer, Electrical and Microelectronic Engineering
Blding 9, Office 09-3189
(585) 475-5105
Rochester Institute of Technology
79 Lomb Memorial Drive
Copyright © 2012 Rochester Institute of Technology
Rochester, NY 14623-5603
All rights reserved.
SCHEMATIC - CHECKPOINTS
Step 1. Schematic Bullet List Plan
Step 2. Input Output Device Advice
a. Interface Specifications
b. Spec Sheets & App Notes
Step 3. Input Devices
Step 4. Controller and protocols
Step 5. Noise immunity
Step 6. Harnesses
Step 7. Switches/Connectors/ Pins/TPs/ LEDs
Step 8. Custom PCB versus universal prototype board.
Appendix
2
Step 1. Schematic Bullet List Plan
Typical Example list:
Microcontroller, Software,
OS needs.
Data sample rate?
Frequency response?
Integrate / discrete
components / hybrid
Warning: Don’t stop at
the board’s edge!
Remove the magic of Black
Boxes
Why? Neither you, your team
nor faculty can help with a
series of black boxes.
Circuit Board?
• test points –LEDs, JTag,
USB, RS232, (may not need
the form factor)
accessory power connectors
Power On switch(s), reset and
safety switches, function
select switch
3
STEP 2: INPUT OUTPUT DEVICE ADVICE
a: Interface Specifications
Bandwidth, frequency response; rf to dc
Data rate, Sample rate
Protocol: RS232, I2C, CAN, Bluetooth, Zigbee, ….
Analog versus digital (you should know by now)
Circuit protection
Power/ Current
Voltage Levels: Vdd/Vcc, multiple? Level shifting needed?
Devices (Vdd vary from 1.5 VDC to 18 VDC)
Microprocessor I/O - GPIO output: Sink or source?
Microprocessor I/O - Analog; ADC, DAC
Data Controls: enables, select lines, etc.
EMI Noise
Heat
•
Need vs. Available: Resolution 8, 12, 16 bit
4
Step 2. Input Output Device Advice
b. Spec Sheets & App Notes
The Devil is in the Details”
Save Hours of design time! Exploit manufacture’s Design Notes!
1. Specification Sheets have application circuits that may apply
directly to your design! Use them!
“Fail Early, Fail Fast”
Good engineers don’t start from scratch!
2. Purchase device evaluation/ demo kits (Microcontroller, Motor
controllers, sensors)
5
3. INPUT DEVICES
Temp Probes, Thermocouples, Thermistors
Sonars
Hall Effect
Encoders
IR
RFID
Strain Gauge, Load Cells
Level Shifter
Pressure Transducer
IMU
H Bridge
6
TEMPERATURE PROBES, THERMOCOUPLES,
THERMISTOR
Thermo monitoring:
• One and 70 microvolts per degree Celsius (µV/°C) for
standard metal combinations, air, gas surface.
• Low current, high impedance circuit needed.
• Tip types beaded, probe clip
• Review manufacture’s specifications
7
SONAR
(SOUND NAVIGATION AND RANGING)
Acoustic Device for measuring gases (i.e. air) and water.
Robotics; typically used to measure distance from a few inches to
several meters.
Overview: Periodic send are receive cycles. Starts with a transmitted
ultrasound ping, then waits for its echo. Calculates sound propagation.
It’s that simple!
• Most sonars have internal electronics that translates the time
propagation into a representative voltage level.
• Electrical Interface: This may be an analog value or digital via a serial
interface.
• Environmental concerns: Whale activists accuse US navy submarines
to beach whales during practice events…
8
HALL EFFECT SENSOR
Rotation Movement
• Uses internal magnetic fields.
• External rotation blocks and unblocks a metallic
slotted plate which changes the magnetic field and
creates high and low voltage levels.
• Like optical sensors, these are non-contact sensors.
Both are accurate.
• Hall effect is better in extreme environmental
conditions. Optical sensors need to stay clean. Hall
effect relies on a magnetic field so oils, water, dirt,
fumes, heat have little or no effect.
• Micro-amp power – may be passive (non-powered)
• CMOS IC subminiature sized for ease of mounting,
inexpensive.
• Used in automotive, robotics, biomedical, industrial.
• Rotational or touch, touchpads.
9
ANGULAR PLACEMENT: ENCODERS
• Optical , hall effect or magnetic,
potentiometers
• Can measure rotation (i.e. cw, ccw)
• Can measure home position.
• Detailed theory of encoders:
http://www.automationdirect.com/
static/manuals/d4hsc/appxa.pdf
http://www.lynxmotion.com/p-653gear-head-motor-12vdc-301200rpm-6mm-shaft.aspx
http://www.pololu.com/catalog/pr
oduct/1442
10
(Continued) ANGULAR PLACEMENT: ENCODERS,
Color
Function
Black
motor power
Red
motor power
Blue
Hall sensor Vcc (3.5 –
20 V)
Green
Hall sensor GND
Yellow
Hall sensor A output
White
Hall sensor B output
11
ANGULAR PLACEMENT
POSITIONING: HALL SENSOR A AND B
This will tell the RPM speed. Often
400 pulses/ rev
• A and B pulses are offset by 90°.
This offers rotational direction
of motor. That is, “A” lead edge
is leading “B”, thus indicates CW
direction. When “A” leads “B”,
then CCW.
• Some encoders (not this one)
have another sensor output (i.e.
C) labeled “Home Position” which
offers one pulse per revolution.
• Some encoders have serial
interface and calculates RPM and
periodically sends various
parameters.
12
RFID –
RADIO FREQUENCY IDENTIFICATION
Wireless Short Range Locator
How it works: RF unit transmits to listening
devices (RFIDs) within its range. Once within
range, this listening device will chirp back its ID.
Popular frequencies: 13 MHz, 2.4 Ghz. FCC
compliant: < 80dBuA @ 13 MHz; 4W @ 2.4 GHz.
Uses: In pets, people, cards, badges, cloths,
marathon runner shoe, UPS tracking, voter ID.
Readily available and inexpensive. SOC makes
it reasonably simple.
13
STRAIN GAUGE, LOAD CELLS
As the gauge bends or flexes,
resistance changes. That simple!
Output voltage range is typically in
millivolts. Supply voltage is typically in
Vcc range. Good linear response.
Metallic – shown to the right. Range
from 30 to 3000 Ω.
Wheatstone bridge circuit may be
used for better precision and
calibration.
Semiconductor – more reliable, more
predictable
Piezoresistive – alternative.
14
LEVEL SHIFTER
• Needed for multiple voltage devices. That is, when mixing CMOS, TTL
and other IC devices, the threshold voltage levels will be different.
• Don’t make your own, buy an IC to get the correct level thresholds.
• Independent of VCC and VDD.
• Offers precise switching thresholds.
• Check for mono or bi-directional needs.
• Some have fixed Vcc values some are not.
• Typical example - Single-Supply Voltage Translator
• 1.8 V to 3.3 V (at VCC = 3.3 V)
• 2.5 V to 3.3 V (at VCC = 3.3 V)
• 1.8 V to 2.5 V (at VCC = 2.5 V)
• 3.3 V to 2.5 V (at VCC = 2.5 V)
15
PRESSURE TRANSDUCER
Wide range of forces available.
As low as finger touch, to load cell in tons.
Measure liquid, gas, touch force.
Piezoelectric materials is common.
Recommendation: Know your
environment, range & precision and go
shopping! Circuits are simple and readily
available.
• There are numerous manufactures. Start
with Mouser, DigiKey, McMaster-Carr.
•
•
•
•
•
16
IMUs AND ACCELEROMETERS
Inertial Measurement Unit
Measure acceleration and gyroscope
• serve as orientation sensors in the human
field of motion.
• At the core of Segways, Airplanes, Ships,
some robots.
• Supplies data to guidance controller.
• IMUs are “blind” and relies on previous
calculations to know their current
location. Periodic “zeroing” or dead
reckoning is needed.
17
H BRIDGE
H Bridge has two functions:
• Boost the power to rotate a motor
• Control direction DC motor
• Schematic offers forward and
reverse motor direction.
• H-bridge got its name from its
schematic shape. That is, it forms
an H. Four switching elements at
the "corners" of the H and the
motor forms the cross bar.
18
H BRIDGE
How H Bridges work
The switches are turned on in pairs, either
high left and lower right, or lower left and
high right, but never both switches on the
same "side" of the bridge. If both switches
on one side of a bridge are turned on it
creates a short circuit between the
battery plus and battery minus terminals.
Anything that can carry a current will
work, from four SPST switches, one DPDT
switch, relays, transistors, MOSFETs.
Brake mode.
closed.
Upper or lower switches
19
H BRIDGE
SUPPRESSION DIODES AND ARCING
Why? Protect the four transistors.
How do Suppression Diodes help? First, note these diodes are
reversed from normal power supply so no current will flow when
the motor is off or when the motor is on.
The issue is when a motor switches off. Since internal electrical
circuitry of a motor is a coil of wire (i.e. inductor), current in an
inductor needs to continue to flow. When the diagonal
transistor pair switches off and thus causing I C go to zero, the
motor coils (i.e. inductors) are still charged with current and
must flow through the internal inductors in the motor. This is
called Back EMF. Without suppression diodes, the current must
flow through the transistors which are switched off. Since the
transistors are off, the Back EMF will go in 100’s of voltages to
push the current through the motor’s inductor circuitry. This
Back EMG voltage is high enough to damage transistors. So
the current path when the transistor pair switches off is through
the motor (Back EMF), through the suppression diode to V+,
through the power supply, through the Gnd, through the lower
suppression diode and then back into the motor. This current
surge will end without damaging the electronics. Okay when
current flows into the positive lead of the power supply, the
voltage level will dip or perhaps even go negative for a short
period of time. You can trigger your scope to see this.
Electronics such as a microcontroller can easily reset itself when
this happens. Some times at random.
20
H BRIDGE
BUY OR BUILD H BRIDGE?
• Your project’s Needs!
• Cost?
• Reliability?
• Features?
• If you buy an H Bridge, there are 100’s to pick from! For your DC
motor, know your voltage and current specifications. As an example
of a small H bridge,
http://www.ti.com/lit/ds/symlink/drv8837.pdf
• This “small power” IC drives a 11V at 1.8A DC motor.
• Has a brake function, arc suppression (they all do….)
21
STEP 4. CONTROLLERS AND
PROTOCOLS
• Refer to Dr. Gomez’s Lecture.
• WARNING: Arduinos – Good for component tryouts but
typically lacks data rate performance for projects. Good for
quick circuit tryouts from motors to IMU’s but once integrated
often lacks needed performance.
• Not a resume builder at Career Fair. Viewed as a hobby toy.
• Vast libraries and examples make it appealing.
• WARNING: Serial Interfaces - I2C, SPI, CAN may be difficult to
implement.
• Unless you have first hand experience or plan to purchase closely
integrated interface solutions.
• If a serial interface is needed and the project data rate is “slow”, then
the old and trusted RS232 protocol is trustworthy.
• Self defined protocols are lacking in needed data sync’ing.
• For digital wireless select proven Bluetooth, Zigbee protocols.
• Borrow a Protocol Data Analyzer – See Prof. Slack
22
STEP 5. NOISE IMMUNITY
Know the project’s planned environment
Circuit noise immunity is the ability of a
device or component to operate in the
presence of noise disturbance .
Electro Static Discharge is the sudden
discharge (i.e. transients, surge). To the
circuit, this is a rapid high voltage, low
current situation.
23
NOISE IMMUNITY
lab misuse, ESD, unwanted signals
Fatal to Electronics:
• Senior Design Lab misuse, abuse.
•
KEEP A CLEAN BENCHTOP…… Fasten boards and
circuits to the bench! STOP and clean up! Get some
sleep!
• End-user or consumer abuse and solutions:
• Bridge to block reverse polarity,
• Schottky diode: very fast switching times and low forward
voltage drop. As low as 0.15 volts for low ma applications.
• Zener diode across the input.
• Circuit breaker – GFI
24
NOISE IMMUNITY
optoisolator, optocoupler – input signal
The LED input circuit is
isolated from the photo
transistor, as shown.
Slower transient pulses (> 0.1
ms) may still power the LED
and thus pass a signal to the
transistor side.
25
NOISE IMMUNITY
optoisolator – driver side
Isolating noisy output
Typical Specifications:
Controlling or switching DC loads of 560 VDC. 4000 volts (transient) of
optical isolation between the field
devices and the control logic.
Typical uses and applications for DC
output modules include switching the
following loads:
DC relays
DC solenoids
DC lamps or indicators
PLC logic
Acrobat Document
NOISE IMMUNITY
optoisolator, optocoupler – on-line signal & drive
Analog and Digital Optocoupler /Optoisolators
Analog Devices:
• http://www.analog.com (Analog Devices)
• High speed couplers - Analog Devices
http://www.analog.com/en/interface-isolation/digitalisolators/products/optocoupler_alternative_icoupler/fca.html
Low voltage 1.8 V isolators for bus or multiple I/O lines
• http://videos.analog.com/video/1553875079001/ADuM348x-FirstIsolator-to-Interface-to-18V-IO/
• http://www.analog.com/en/prod/0,2877,ADuM2401,00.html
• http://www.vishay.com/optocouplers/
Solid State Relays
• http://www.vishay.com/solid-state-relays/ ;
• http://www.vishay.com/docs/83820/lh1521ba.pdf
27
NOISE IMMUNITY
POLARITY PROTECTION
(+)
+
1N5822
or
Schottky diode
1N5817
–
(–)
Schottky Low
forward
voltage drop
1N4001
or
Schottky
Input Port
+
Input Port
–
28
NOISE IMMUNITY
OVER-VOLTAGE PROTECTION
Helps against
transients and over (+)
voltage protection.
Unfortunately fuses
may not be
sufficiently fast to (–)
protect your circuit.
Understand the
incoming
environmental
conditions.
Fuse
+
input port
–
Zener diode
(also MOV)
1N5339 (5.6V for a 5.0V input)
29
NOISE IMMUNITY
TRANSIENT PROTECTION FOR DIGITAL INPUTS
Many digital devices
including microcontrollers
include diodes on their
GPIO to protect from
transients. Check the
manufacturer’s spec sheet.
Add if transients may be
an issue to protect CMOS
inputs (or any input
circuit).
30
NOISE IMMUNITY
A SOLUTION: LOWPASS FILTER
Remove high frequency noise. Simple RC low pass filter
(left) or active circuit (right) for improved isolation, gain and
current driving capability. May want to add software
sampling to remove glitches or switch bounce.
31
NOISE IMMUNITY
CMOS AND NOISE
• 1 uA input? Not sure? Get the spec sheet!...
• Draw the equivalent circuit for each internal pin.
That is, CMOS versus TTL input impedance, output is
pull-up or pull-down circuit, current limiting resistor
value.
• CMOS inputs have very high input impedance
which is good for low power consumption but
susceptible to sudden discharge or misuse when
connecting to the outside world.
32
NOISE IMMUNITY
DECOUPLING CAPACITORS
• Know your performance response needs.
• Try to eliminate frequencies outside your performance needs
(i.e. filtering, smooth out spikes in DC power of IC’s).
• Digital Isolation Caps:
• Common practice is to isolate digital IC’s with isolation
capacitors. See manufacturer’s Spec Sheet for capacitor
values. Be sure to add to your schematic prior to Design
Review.
33
STEP 6 HARNESSES
ANALYSIS HARNESS SIGNAL RESPONSE
Research you max data rate, distance, noise, parasitic
capacitance, reflections, distortion spec, etc.
Frequency Response for both: Digital rise time to support data
rate and if analog max frequency and distortion needs.
•
•
•
•
•
•
DC to 100 khz Open Wire
DC to 40 MB/s Ribbon Cable (less than 3’)
• SCSI, SPI-3 applications
DC to 300 mhz Twisted Pair - unshielded, ribbon
DC to 100/1000 MB/s ethernet Cat 5 minimum
spec. RJ45 connector.
Coax, VHF 3000 megahz (scope probe, cable
TV) attenuation, reflectance, Cable TV, Rf
DC to 4 gigahz Fiber Optics
34
STEP 6 HARNESSES
HARNESS -TWISTED PAIR
When purchasing harness cable:
• Unshielded Twisted Pair (UTP)
• Shielded Twisted Pair (STP)
• Purchase or make your own! To make your own, start with 10’ to
50’ of wire and wrap with an electric drill to get the desired wrap.
Study the manufacturer’s Specification to match to
your needs.
Practical Design Considerations – What are twisted pairs?
http://www.cirris.com/testing/twisted_pair/twist.html
35
TWISTED PAIR
What is does: Cancels out crosstalk from neighboring
wires and electromagnetic interference from
external sources
36
PRACTICAL CONSIDERATIONS
1. Current, Voltage Needs
•
Gauge of wire, insulation
2. Customer’s Use and Abuse
•
•
•
•
•
•
Connect/ disconnect needs
Routing, protecting
Mounting, vibration and stability
Strained or solid
Gold versus Tin; environment, corrosion, current rating
Instrumentation quality for long life
3. Color Coding for ease in Debug and future use.
As
1.
2.
3.
an example;
Red Vcc/Vdd
Black Grd/ Vss
Orange, color by major node.
37
STEP 7 CONNECTORS/ PINS/ TP’S/ LEDS
Add all needed I/O connectors to your schematic(s).
1. Connect/ disconnect needs – screw terminators,
push type
2. Major Manufactures: Amp, Molex
3. Location
•
•
•
between assemblies
interface to other projects (collaborate with other teams)
instrumentation
4. Get crimp compatibility to pin manufacturers (style
and gauge).
5. Pins: crimp versus solder
6. Current rating rule of thumb is 10x. i.e. 100 ma
purchase 1 amp pins
7. Types; ribbon, D shell, PCB mount
38
Summary:
•
•
•
•
•
•
•
•
•
•
Start your schematic(s), if not already.
Sketch a drawing or visualization your project including the
following:
Define I/O Design Needs
Specification Sheets & Application Notes
Analysis I/O
Design Output Devices
Design Input Devices
Consider Noise immunity
Harness; Signal Response
Connectors/ Pins
Next Steps:
•
Define your control electronics and software modeling, subsystem
lab tryouts and code development
39
ELECTRONICS DESIGN BOOKS
(NOT CLASSROOM TEXT BOOKS)
Electronic Instrumentation Design – Kim R. Fowler, Oxford, ISBN 019-508371-7
• Given your project budget, you may want to consider
purchasing this text. Less than $10 used on Amazon.
A Baker’s Dozen – Real Analog Solutions for Digital Designers.
Bonnie Baker. Newnes, ISBN: 0-7506-7819-4. $70 on Amazon.
• Best integration of analog and digital electronics.
Approaches design from an engineer’s “problem to be
solved” rather than text book “solve this equation”. Presents
the problem and then goes into the needed electronics and
mathematics to solve your design issue. Engineering
“humor” throughout….
40
APPENDIX
More resources and notes
41
Step 1. Schematic Bullet List Plan
best practices, fine print…
Some example areas:
Develop Engineering Specifications from your general specifications table
Start at the interfaces, then drill down.
List Interface Devices
List ALL inputs and outputs
Research dynamics for electronic devices
I2C, RS232, 24 VDC motor @ 20 amps, MSP430.
Can you sketch the internal device electronics at the interfaces to complete a circuit diagram?
Detailed Design Review readiness: don’t stop at the board’s edge! Scan or copy key pages from the
manufacturer’s specifications sheets.
Don’t forget the “simple” stuff!
Power On/Off switch?, reset and safety switches, function select switch
Add Connectors, cables, harnesses!
test points – you will thank me later!
LEDs (more is better)
JTag, USB, RS232, (may not need the form factor)
accessory power connectors
42
Step 2. Input Output Devices
Where to start?
1.
2.
3.
4.
5.
Google search
Wallace RIT Library http://library.rit.edu/
RIT IEEE http://ieeexplore.ieee.org/Xplore/home.jsp
Manufacturer’s: TI, Freescale, Analog Devices, ….
Suppliers: DigiKey, Mouser and Allied offer good on-line spec
sheets
http://www.findchips.com/
6.
If the spec sheet document is large, send me the link and I
will print for you. Some may be 400 pages but DO IT!
You will thank me later….
Step 2. Input Output Device
Typical Output Devices
Matching (Voltage, Impedance, Current)
Discrete Components
•
•
•
•
•
Bipolar Transistor: Single stage and Darlington.
FET
JFET
MOSFET
IGBT DC to AC inverters (motors)
DC to DC converters
• voltage boasting/ ± polarity
• current boasting
• buck/ boost
44
Step 2. Input Output Device Advice
1. Impedance matching to your control electronics
Outputs
• GPIO Logic (VOH and IOH) converted to either a lower or higher power range
• DAC (Vcc) active range to either a lower or higher power range
Inputs
• GPIO Logic (CMOS gate impedance and protective devices)
• ADC (Vcc) active range
2. The basics! Apply to Thevenin Equivalent Circuits
•
•
•
Source electronics – Input interface
Device being driven – Output interface
R, RL, RC, RLC loads (& potential for unwanted current and voltage
spikes)
45
STEP 5. NOISE IMMUNITY
HOW DOES NOISE GET INTO ELECTRONICS?
• ground connections and loops
• power supply connections
• high impedance signal inputs
• inadvertent ESD
• (human touch, lightning)
• Reverse current surges via inductive devices
(motors, solenoids, inductive devices)
• rf emissions
46
STEP 5. NOISE IMMUNITY CONTINUED
HOW DOES NOISE GET INTO ELECTRONICS?
Energy Coupling
(Conductive, Inductive, Capacitive)
• EMI - Current surges
(ElectroMagnetic Interference) An electrical disturbance in a
system due to natural phenomena, low-frequency waves
from electromechanical devices or high-frequency
waves (RFI) from chips and other electronic devices.
Allowable limits are governed by the FCC.
•
RFI – high impedance devices requiring very
limited current.
(Radio Frequency Interference) High-frequency electromagnetic waves that
emanate from electronic devices such as chips.
If the source is sufficiently strong this can enter your circuit.
47
STEP 5. NOISE IMMUNITY
design solutions
Protect from?
• ESD
• Solution: Proper grounding, optical isolators,
capacitors
• Transients
• Solution: Low pass filter, optical isolators,
software sampling
• Reverse polarity
• Solution: Diode circuits to protect against,
fuse.
48
Download PDF