CES 520 - WEEK 6 September 26, 2006
- Current consumption
- Normally power supply current is directly proportional to clock rate. DC current ~= 0.
- Floating inputs can cause large DC current, expecially for higher-voltage (5V) parts.
- CMOS latchup
- Most modern CMOS parts have less of a problem - requires 100's of mA to cause latch up
- Beware mixed-voltage interfaces, e.g. 5V CMOS driving 3.3V or 1.8V CMOS
Driving Hardware
- Typical CMOS output current specified at about 4 or 5 mA
- Bipolar transistor must be driven into saturation for lowest "on" collector voltage
- Don't use the published non-saturated beta (current gain) value
- Darlington transistor needs much less drive current
- Note that the output voltage is higher - V(BE) of output transistor + V(CE)sat of input transistor
- Bipolar drive transistors may need a pull-down resistor on the base input to prevent unwanted switching
- ULN2003 has 7 darlington transistors with built-in input pulldown resistors
- LEDs
- Forward current determines brightness. Typically 10-20 mA for small indicator LEDs.
- Forward voltage (Vf) typically about 1.5-3V.
- Relays
- Used for switching high-current or AC loads
- The relays for the lab take 5V / 500 Ohms = 10 mA
- Beware inductive kickback.
- Clamp diode increases relay turn-off time.
- Opto isolators / solid-state relays
- Give near-perfect isolation between driver and load
- No common ground connection required
- Reduces noise and provides safety isolation
- Solid-state relays may be able to drive AC loads
- Compared to electromechanical relays
- Require only a few mA drive current
- Much more reliable (with careful design)
- Much faster
- Buttons and keypads
- Contact bounce causes switches and relays to have noise upon closing and opening
- Can cause the software to report multiple key presses
- Software solution: Read the port several times until a stable reading is achieved
- Hardware solution: Add a capacitor in parallel and use a Schmidt-trigger input to the latch
- Keypad matrix
- Processor continuously scans a "high" across the rows, one row at a time
- Looks for a high on the column outputs to determine which switch was pressed
- Liquid-Crystal Displays (LCD)
- Most have driver/encoding electronics integrated into the module
- Backlight requires high-current power supply
- Digital potentiometers
- Uses tapped resistor and analog switches to simulate a potentiometer
- Unlike a DAC, all three terminals are floating
- Non-volatile memory and very low standby current = almost like a real pot
- More reliable and stable than a pot
- Allows calibration under software control
- Tend to have high/non-linear wiper resistance. Better to use as a potentiometer vs variable resistor
- Not good for high power.
Interfacing to the external world
- Crossing clock boundaries
- Metastability
- May occur if a signal violates setup or hold times of a flip-flop
- Increases propagation delay of flip flop, possibly enough to cause an error
- Solution is to add one or two flip-flops to synchronize the input signal
![MTBF=exp(tr/gamma)/(FD*FC*TP), MTBF2=exp([tr+(1/FC)-tsu]/gamma)/(FD*FC^2*TP^2)](graphics/metastable_equations.GIF)
- MTBF = Mean Time Between Failure for single synchronizer
- MTBF2 = Mean Time Between Failure for two synchronizers
- tr = Resolve Time = clock period - path delay (including FF clk-to-data-out and tsu of next device)
- Gamma = Flip-flop metastability window = tsu + thold, tsu = Setup time, thold = Hold time
- FD = Data Frequency, FC = Clock Frequency, TP = Flip-flop Propagation delay
- Typical MTBF can vary from seconds to years. (delta t = clock period)
- FIFO buffer
- Used to smooth out intermittent data flows
- Needed even in fully-synchronous systems if data source can ever temporarily out-pace the receiver
- ESD (Electro-Static Discharge)
- It's a big problem in manufacturing.
- A good web site for more information on ESD
- Some devices are more susceptible than others
- Discrete MOSFET and JFET devices
- Microwave devices such as small-signal Schottky diodes
- Small-geometry digital ICs
- Precision analog ICs
- Precision thin-film resistors
- Human body model (HBM)
- Simulates a human touching the device
- 100 pF / 1.5 KOhm
- Machine Model
- Simulates an object touching the device
- 200 pF / 0.5 uH
- A potential problem for any circuitry that communicates to the outside world
- Connectors of all kinds
- Recessed pins and grounded shell help
- AC or DC power inputs
- Any circuitry in a user-accessible space
- Panel switches and controls
- ESD can jump through any non-insulated orifice
- Protection devices
- Series resistor/shunt diodes
- Must be clamped to a voltage outside the normal signal range
- Switching diode gives fast response but fairly limited protection
- Power Schottky diodes are fast but expensive and have considerable leakage current
- Zener diodes. "Transorb" is trade name for Zener-based ESD protection device.
- Selectable clamp voltage.
- Fast switching but typically has large capacitance.
- Should be protected with a fuse if overvoltage condition is not transient
- Metal-oxide varistor (MOV) - non-linear resistor similar to a Zener diode
- Can typically dissipate more power than a Zener
- Gas discharge tubes
- Use internal spark gap - good for high-power ESD events
- Becomes almost a short circuit once it fires
Regulatory issues:
- Safety
- UL - Underwriters' Labs
- UL is a private company. No government regulations require UL certification.
- "UL Listed" applies to equipment
- "UL Recognized" applies to components (e.g. line cords)
- CSA - Canadian Standards Association
- Not Canada only. Often specified in USA and other other countries as well.
- CE - Covers the European Economic Area
- Certifies that the equipment meets electromagnetic compatibility as well as safety regulations
- EMI
- United States: Regulations specify radiation limits only. Part 15 and 18 of FCC regulations.
- Class A is for commercial and scientific equipment
- Class B is for home or consumer equipment. Much more stringent requirements.
- Europe: Regulations specify both radiation and susceptibility. IEC/EN standards.
- Based on IEC and CISPR recommendations
- Most other nations follow CISPR recommendations in developing their standards
- Design techniques to reduce radiation and susceptibility
- Filter cables and wires that go between PC board assemblies
- Bypass wires right where they exit a shield enclosure
- Use low-voltage differential signalling (LVDS) between assemblies if possible
- Common-mode chokes reduce RF interference without degrading the signal
- Ground loops are a source of low-frequency interference
- Use differential signalling
- Ground the two chassis or PC boards together. Use single-point ground.
- Use opto-isolators or transformers to break the ground loop
- Transformers don't work at DC or low frequencies
- Coaxial cable works well at RF frequencies
- Keep clock and other high-speed traces short
- Use multi-layer PC board with power/ground planes on inner layers
- Put small (50-100 ohm) resistors on output of high-speed drivers - reduces ringing
- Rabbit 3000 Low-EMI features
- Separate power pins for core and I/O
- Includes an external I/O bus separate from the memory bus
- Clock spreader option smears out the clock spectrum and its harmonics
- Some internal clocks can be gated off when not needed.
- An internal clock doubler allows the external crystal oscillator to operate at 1/2 the frequency.
Assignments:
- Read Embedded Systems Design, Chapter 5, pp 116-143.
- Lab 4: Add relays and LED hardware and software. (Due in 2 weeks)