Lectures 6-10 Flashcards
Voltage threshold levels:
VOH, VIH
VOL, VIL
What are they, which one must be bigger/smaller than the other?
VOH: minimum voltage that can be interpreted at output as logic high
VIH: minimum voltage for logic high at input
VOL: max voltage for logic low at output
VIL: max voltage for logic low at input
VOH > VIH
VOL < VIL
What is noise immunity in relation to voltage thresholds?
Difference between input and output thresholds
Max noise signal that can be added without producing errors
Noise immunity may be different for logic low and high
Whats propagation delay, race conditions
PD: delay between inputs changing and outputs changing on a digital circuit
RC: when a logic circuit produces erratic output because various inputs have been applied at slightly different times
Sinking and sourcing current:
Definition
On a circuit diagram, how can you tell if the current is sink or source?
Sink: when current flows INTO an input or output
Source: when current flows OUT of an input or output
Sink: flowing from voltage supply to circuit
Source: flowing from circuit to ground
I(IL), I(IH) (how do these relate to VIL and VIH?)
IOL, IOH
What are they?
I(IL): current that will be sourced from an input at logic low (at VIL)
I(IH): current that will sink into an input at logic high (at VIH)
IOL: max current that can sink into an output at low
IOH: max current that can be sourced from an output at high
Output circuits: push-pull/ TTL totem pole
- What do they both look like
- Pros, cons (same for both)
PP top to bottom: Voltage supply, two p/n type transistors, ground
Output from between transistors
TTL: Same except resistor under voltage supply and transistors are NPN (source and current are drawn at angles)
Pros: switchs fast due to low impedance
-Can sink or source current
Cons: two or more outputs can
Output circuits: open-collector/drain outputs
- What does it look like
- Pros, cons
Voltage supply goes through pull-up resistor to ‘bus’ (dotted line)
Multiple transistors with source connected to bus, drain connectedto a ground
Pros: multiple digital devices can pull the line to logic low
Cons: Slow to switch due to pull-up resistor
Output circuits: tri-state
- What does it look like
- Pros, cons
A load of push-pull circuits with outputs connected to a bus.
Pros: Fast, same data bus
Cons: Only one circuit can be in the ‘ON’ state
TTL: Whats supply voltage usually?
Power consumption?
Max/min voltage input thresholds?
Output voltages in comparison to power supply rails?
-Usually fixed at 5V
-High
-Usually 0.8 V and 2.0 V
Usually just a few hundred millivolts difference
CMOS: Whats supply voltage usually?
Power consumption?
Max/min voltage input thresholds?
Output voltages in comparison to power supply rails?
- Flexible, between 1.8V and 5V
- A function of clock speed (zero with no input/output changes)
- Usually 1/3 and 2/3 of power supply voltage
- Essentially equal to power supply (very close)
Microcontroller digital inputs:
What happens if left unconnected?
What do some microcontrollers have to help with this?
What do you need to remember about this help?
Input will ‘float’ and be sensitive to noise
Pull-up resistors which can be applied with software
Resistors should not be more than 10% of input impedance and not less than the value that would cause output current to reach 90% of the recommended limit
Connecting outputs and inputs at different voltage levels-example:
5V output to 3.3V input
3.3V output to 5V input
Solutions for each
Potential dividor (speed is reduced tho)
Direct connection if the lower circuit can handle the voltage
Bi-directional level shifter IC
Direct connection if the VOH for the 3.3V device is higher than VIH for the 5V device
Bi-directional level shifter/buffer IC
Load Switching
Revise
Why is serial communication more popular than parallel?
- Requires multiple input-output connections which is impractical
- As distance increases individual bits in parallel will arrive at different times
Synchronous vs asynchronous:
Whats the difference
What does each need to work
S: each data bit sent is synchronised with the transmission
Requires some form of common timing clock
AS: each data bit sent is NOT synchronised with the transmission
Requires two clocks to be generated which will eventually get out synch
Requires prior agreement for the transfer rate (baud rate)
Full-duplex vs half-duplex
FD: communication can take place in both directions simultaneously
HD: two directions but not simultaneously
UART: what duplex type is it
What type of communication is it
What was the original called?
How do you start and stop a transmission?
What attributes do you need to set in software?
Full-duplex Asynchronous RS-232 Logic 1 as start bit Logic 0 stop bit and pause Baud rate and frame length
I^2C protocol: what type of communication is it
What two things does it need for this to work?
Synchronous
Two lines: clock line (Serial Clock, SCL) and data line (Serial Data, SDA)
I^2C protocol: What duplex type is it?
What type of system is it? What does this mean can happen?
What is there to prevent conflict?
Which device is in control of the flow of data?
Half-duplex
A bus system
More than two devices (ICs) can be connected to the SCL anf SDA lines
An open-collecter bus scheme
By default SCL/SDA lines are high and any device may pull them low
Usually one device acts as master, others are slaves
I^2C protocol: what unique feature to with the clock does it have?
Whats its “Standard Mode” speed?
If a receiving device is struggling to keep up, it can slow down the transfer by holding the clock line ‘low’
Called clock stretching
100 kbit/s
I^2C protocol: equation for bus voltage
Whats V(IH) equation?
Equation for maximum pull-up resistor when given minimum rise time
Whats equation for minimum value of pull up resistor?
What minimum rise time for standard mode?
Vbus = Vsupply*(1 - e^(-t/RC)) t = rise time (time taken for Vbus to reach V(IH) R = pull-up resistance C = bus capacitance
V(IH) = 0.7*Vsupply
As V(IH) = Vbus
R = t/1.2C
R > Vsupply/(3*10^-3)
1μs
SPI: differences to I^2C, pros, cons
Four bus lines, names and what they stand for
How many master and slaves are there?
Does not use open collecters Uses tri-state pull-pull Much simpler, faster due to push-pull Less flexible SCLK: Serial Clock MOSI: Master Output, Slave Input MISO: Master Input, Slave Output SS: Slave Select One master, many slaves
CAN protocol: whats it mainly used in?
What type of system does it use (weird)?
Two conductor names, pros of this
How to get logic high and low
Cars
Uses open-collector differential signalling
Two conductors: CAN high (CANH) and CAN low (CANL)
Shielded twisted-pair wires, gives noise immunity
When both lines are the same, logic high
When CANH is driven 1V higher and CANL driven 1V lower, logic lower
CAN protocol: how does it decide which master gets to control bus?
What does every device on bus have to do?
Synch or asynch?
Rate the speed for different distances
Prioritises masters according to their unique address
Most important master has most logic lows (zeros)
Listen to each message
Asynch
Fast at short, slow at long
Whats interference?
Whats crosstalk?
Whats noise?
Unwanted signals from outside the system
Unwanted coupling of signals from within the system
Random process which may originate internally or externally
Whats a parasitic element in a circuit?
What stray element in a circuit?
Unwanted by inevitable element-i.e. resistor inductance or capacitor leakage
Unwanted element which exists between circuit components-i.e. fields between wires
Mutual capacitance:
What is it?
Capacitence equation for two paralell wires per metre length
When mutual capacitance occurs between two points C = πε/ln(d/a) ε = permitivity d = distance between wires a = radius of wires
Mutual inductance:
What is it?
Effects of this for high loop and low loop impedance circuits
When two current-carrying conductors are in proximity, there will be a mutual inductance between them
High loop: series coupled voltage source
Low loop: current flow which produces voltage drops
Capacitive coupling vs inductive coupling: what kind of signals make each likely to happen
How to minimise each
CC: high frequency voltage signals
Place a grounded screen/shield around circuit
IC: low frequency current signals
Max distance between likely sources of interference and circuit
Balanced lines:
What are they
Requirements for it to work
System of two conductors which have the same impedance with respect to a common ground
Both conductors must have same exposure to any source of interference
Must use differential signals
Balanced lines: why do they work?
They work because any interference will affect each signal the same, meaning the difference between each will remain the same
How do they deal with interference in:
Professional audio systems
Modern network cables (whats the name of these)
Balanced lines with three conductors, two being the lines and one being a grounded shield
Multiple pairs of conductors twisted together. Each pair is twisted by different amounts to minimise crosstalk
CAT5
Ground loops: how are they formed?
What does it do to a circuit?
Connecting signals from two different pieces of equipment together and creating a duplicate ground connection
Adds voltage to ground-equivalent circuit is a voltage source placed in series with ground
Ground loops: solutions (bad to good)
Break the loop
Disconnect mains protective ground
Use isolated inputs/outpupts i.e. use a transformer to transfer the signal
Shared ground paths: how are they formed
Solutions
When ground paths are connected to several current-drawing loads, causing IR voltage drops
Separate ground paths for sensitive circuits
Things to consider when choosing a power supply for a circuit-3 things
How much current/voltage does the circuit draw?
How much you’ll need to protect your circuit from over voltage/current
Mains or battery?
Whats current compliance in a voltage source?
The amount of load current a reulated voltage source can maintain supply voltage up to
Converting mains AC to DC: transformer-based power supplies, 3 components
How to tell output power
Regulated or unregulated?
Consists of a step-down transformer, full bridge rectifier and a smoothing capacitor
Use ratio of transformer i.e. 20:1 will convert 240AC to 12DC
Unregulated
Converting mains AC to DC: switching power supply
3 components
Pros, cons vs transformers
Rectifier, smoothing capacitor, switching using PWM
Pros: more compact, efficient, easy to adapt to different power-line voltages
Cons: more complicated, quality of DC output is worse
Things to consider when choosing batteries: three things
Use single-discharge (primary) or rechargeable (secondary)
Primary batteries for suitable for circuits with low average power consumption
Also check battery source resistance
Linear voltage regulators:
What do they do?
Why do they get hot?
Whats headroom/drop-out voltage?
They reduce input voltage (+/-10V to +/-5V)
It is constantly dissipating energy
Minimum difference between input and output voltage
Linear voltage regulators: power dissipation equation
Whats an alternative to LVR’s (think power electronics)
How to get a voltage reference without a LVR
Preg = (Vin - Vout)*I(load)
Its ya boi buck and boost converters (DC-DC)
Use a zener diode (when Vin > V(zener))
Thermal management: equation for max junction temperature
4 parameters
How to rearrange to get thermal resistance for a heatsink if needed?
Tj = P(R(θJC) + R(θCA)) + Ta Tj = max junction temp P = power dissipation (remember equation from earlier) R(θJC) = thermal resistance, junction to case R(θCA) = thermal resistance, case to ambient Ta = ambient temperature
Rearrange for R(θCA), this is the value you need
What is:
failure mode
Fail-safe design
4 things to be concerned about with electronic circuits
A possible fault condition that may arise
A design approach where if any failure modes occur, consequences are not dangerous
Overheating
Component rupture
Unsafe output voltage
Unsafe controlled functions
Power supply failure: what to worry about if power goes
Over-voltage happens
Over-current happens
Need back-up safety if it fails (e.g. doors)
Circuits that produce safety warnings should automatically warn if power fails
Use ‘crow-bar’ circuit using a thyristor to short circuit supply
Use fuses (i.e. PPTC fuse)
Connection failure: why can this happen
What to do about it
Oxidising, bad solder, thermal cycling
Design it so the system is aware if this happens
Can use weak pull-down resistors to avoid floating inputs
Processor/logic failure:
What is it
What to do about it
Microcontrollers can fail, software can have bugs
Use timers to reset if processor stops responding
Write code so that if anything fails, system reverts to safe state
Component failure:
What components are risky?
What to do about it
Capacitors as they store a lot of energy
Resistors and inductors can fail from faults elsewhere in the system
Don’t short circuit them
Use over-current protection or bigger resistors
Load faults: what are they
What to do about it
Loads which become short-circuited
Use capacitors and resistors rated for the max possible voltage and power in a circuit
Human interaction:
common problems
What to do about them
Connecting power wrong (battery wrong way round, power connected wrong way round)
Use a series diode or bridge rectifier (although this causes voltage drop)
Devices where you don’t want them left on
Make it so you constantly require input (i.e. drills)