RUE Logo

Module 1.6 - Interface Circuits

Verifying proper level translation, termination, and signal conditioning for reliable communication

1. Level Translation Between Voltage Domains Critical

What It Is

Level translation is required whenever signals cross between different voltage domains (e.g., 3.3V MCU communicating with 5V sensor, or 1.8V FPGA interfacing with 3.3V memory). The translator ensures signals from one domain are shifted to appropriate voltage levels for the other domain without exceeding any IC's absolute maximum input voltage ratings.

Translation methods include: dedicated level-shift ICs (TXB0108, SN74LVC8T245), resistor dividers (high-to-low only), MOSFET-based circuits (BSS138 for bidirectional), and series resistors with clamping diodes.

Why It Matters

Connecting a 5V output directly to a 3.3V input exceeds the input's absolute maximum rating (typically Vcc + 0.3V = 3.6V). This causes current flow through the IC's ESD protection diodes, eventually degrading or destroying the input pin. In the other direction, a 3.3V output driving a 5V-threshold input may not reach the minimum VIH level (typically 3.5V for CMOS 5V logic), causing unreliable logic detection and intermittent communication failures.

How to Check - Step by Step

  1. Map ALL voltage domains in the design. List every IC and its I/O voltage level.
  2. Identify every signal that crosses between voltage domains.
  3. For each crossing signal, verify a level translation mechanism exists.
  4. Verify the translation method is appropriate for signal speed: BSS138 (up to ~1MHz I2C), TXB0108 (up to ~100MHz), SN74LVC8T245 (push-pull, up to 200MHz).
  5. Check signal direction: unidirectional signals need simpler translators than bidirectional (I2C).
  6. Verify that "5V-tolerant" inputs are actually 5V-tolerant per datasheet (not all MCU pins are). Check the I/O structure column.
  7. For resistor dividers: verify the divider ratio provides correct voltage AND does not excessively load the driver or slow signal edges.

3.3V MCU to 5V peripheral translation:

Signal: UART_TX (3.3V MCU output to 5V GPS module input)
  Method: SN74LVC1T45 (single-bit direction-controlled translator)
  VCCA = 3.3V, VCCB = 5V, DIR = HIGH (A-to-B)
  Speed: Supports up to 420 Mbps (far exceeds UART 115200 baud)

Signal: I2C_SDA/SCL (bidirectional, 3.3V MCU to 5V I2C EEPROM)
  Method: BSS138 N-MOSFET level shifter (2x, one per line)
  Low side: 3.3V pull-up (4.7k)
  High side: 5V pull-up (4.7k)
  Speed: Suitable for I2C up to 400kHz (rise time limited by pull-ups)

Signal: SPI_MISO (5V peripheral output to 3.3V MCU input)
  MCU pin PA6 is 5V-tolerant (verified: FT marking in STM32 pinout table)
  No translator needed - direct connection is safe.

Direct connection without translation: 5V Arduino Mega UART_TX (output HIGH = 5V) connected directly to ESP32 UART_RX (absolute maximum = 3.6V). ESP32 input clamping diode conducts continuously, injecting current into the 3.3V rail, causing voltage rise on ESP32 power domain, heating the protection diode, and eventually destroying the input pin after weeks of operation. Communication appears to work initially, masking the damage occurring.

KiCad: Create distinct power symbols for each voltage domain. Visual inspection of cross-domain signals. Add level-shifter ICs between domains explicitly on schematic.

Altium: Use Net Classes per voltage domain. Design rules can flag nets that span multiple voltage domains without passing through a translator component.

OrCAD: Group components by voltage domain on separate schematic pages. Signals crossing pages between domains should pass through translator circuits on a dedicated "interface" sheet.

  • TXB0108 limitations: Cannot be used with I2C (doesn't support open-drain), sensitive to capacitive loads >70pF, can oscillate with strong pull-ups. Use only for push-pull signals.
  • 5V-tolerant misconception: "5V tolerant" means the input can withstand 5V without damage. It does NOT mean the output can drive 5V levels - output is still limited to VCC (3.3V).
  • Power sequencing with translators: If the low-voltage side powers up first, current can back-feed through the translator to the unpowered high-voltage side, causing latch-up or damage.

2. Termination Resistors for Long Traces Major

What It Is

Termination resistors are placed at the end (or beginning) of transmission lines to absorb signal reflections that cause ringing, overshoot, and data errors. A PCB trace becomes a transmission line when its length exceeds approximately 1/10th of the signal's wavelength (or when trace propagation delay exceeds 1/6th of the signal rise time). Common termination schemes: series (source), parallel (end), AC (end with cap), Thevenin (pull-up + pull-down).

Rule of thumb: if trace is longer than 2 inches (50mm) for signals with rise times below 2ns, termination is likely needed.

Why It Matters

Without proper termination, signals reflect at impedance discontinuities (trace end, via, connector). Reflections cause the signal to ring above VCC and below GND, potentially triggering false clock edges, violating input thresholds, and stressing IC input protection diodes. In SDRAM interfaces, unterminated signals cause bit errors. In CAN buses, unterminated ends prevent reliable communication. A 6-inch unterminated 100MHz clock trace can have 50% overshoot (5V peak on a 3.3V signal).

How to Check - Step by Step

  1. Identify high-speed signals: clocks above 10MHz, data buses above 50MHz, any signal with rise time below 2ns.
  2. Estimate trace lengths for these signals (from PCB layout or planned board dimensions).
  3. Calculate if termination is needed: if trace delay (6.5ps/mm for outer layer, 7ps/mm for inner) exceeds 1/6 of rise time.
  4. For series termination: verify resistor value = Z0 - R_driver (typically 22-33 ohms for most CMOS drivers on 50-ohm traces).
  5. For parallel termination: verify resistor value matches trace impedance (50 or 100 ohms typical).
  6. For CAN/RS-485 buses: verify 120-ohm termination at BOTH ends of the bus.
  7. Verify termination resistors are placed as close as possible to the destination end (for parallel) or source end (for series).

SPI clock with series termination:

Signal: SPI1_SCK at 20MHz, trace length: 80mm
Rise time: 2ns (STM32F4 GPIO in high-speed mode)
Propagation delay: 80mm * 7ps/mm = 560ps
Threshold: rise_time / 6 = 2ns / 6 = 333ps
560ps > 333ps --> Termination REQUIRED

Solution: 33-ohm series resistor at MCU output (source termination)
  STM32 output impedance: ~15 ohms
  33 + 15 = 48 ohms (close to 50-ohm trace impedance)

Placement: Resistor within 5mm of MCU pin (on schematic, noted "place near U1")
Result: Clean signal with no ringing at flash IC input.

No termination on long clock: 25MHz Ethernet RMII clock routed 120mm across board from PHY to MCU with no series resistor. Rise time 1.5ns on 50-ohm trace. Signal rings from 0V to 4.2V (1.3x overshoot on 3.3V signal). Reflection causes double-clocking at the receiver - MCU sees two edges per clock cycle. Ethernet has 50% packet error rate. Engineer spends weeks debugging firmware when the fix is a $0.01 33-ohm resistor.

KiCad: Add series resistors in schematic near source IC. Note placement requirement ("place within 5mm of U1 pin 32"). Use IBIS simulation in external tools to verify termination values.

Altium: Use Signal Integrity Analysis with IBIS models to simulate reflections. Termination Advisor suggests optimal resistor values. Place resistors near source in schematic.

OrCAD: Use PSpice with transmission line models (T-element) to simulate signal integrity. Adjust termination values until ringing is within acceptable limits (10% overshoot maximum).

  • Series resistor at wrong end: Series termination MUST be at the source (driver) end. If placed at the receiver end, it forms a voltage divider that reduces signal amplitude.
  • Over-termination: Adding both series AND parallel termination on the same signal creates excessive signal attenuation and DC loading.
  • Forgetting return path: Termination only works if the ground return path is continuous. A ground plane split under the signal trace negates any termination benefit.

3. Series Resistors for ESD/Current Limiting Major

What It Is

Series resistors placed on signal lines serve multiple purposes: limiting current during ESD events (reducing stress on IC protection diodes), limiting current when interfacing between voltage domains during power-up sequencing, reducing EMI radiation from high-speed signals, and protecting IC outputs from excessive capacitive loads. Typical values: 22-100 ohms for most digital signals, 1k-10k for slow signals at connectors.

These resistors form the first line of defense for IC pins exposed to the external environment.

Why It Matters

IC pins at external connectors are exposed to ESD from human touch (8-15kV), cable discharge events (up to 25kV), and overcurrent from external faults. Without current limiting, ESD energy concentrates at the IC pin, overwhelming internal protection structures. A 100-ohm series resistor limits ESD peak current from 15A to approximately 10A (Ohm's law with ESD generator model), dramatically improving survival rate. For signals between boards, series resistors prevent damage during hot-plug when power domains sequence differently.

How to Check - Step by Step

  1. Identify all signals that connect to external connectors (USB, HDMI, headers, test points accessible in final product).
  2. Verify series resistors exist on these external-facing signals (or dedicated ESD protection ICs).
  3. Check resistor values are appropriate for signal speed: lower values (22-33 ohms) for high-speed, higher values (100-1k) for slow GPIO/buttons.
  4. For UART signals at connectors: verify 100-220 ohm series resistors for ESD current limiting.
  5. For GPIO driving LEDs: verify current-limiting resistors to prevent exceeding IOH/IOL ratings.
  6. Verify series resistors don't create unacceptable signal degradation (voltage divider with input capacitance forming RC filter).
  7. Check that resistor placement is correct: between IC pin and connector, not between IC and internal circuit.

UART at external debug connector:

STM32 PA2 (UART2_TX) --[100R]-- J5 pin 3 (TXD to external)
STM32 PA3 (UART2_RX) --[100R]-- J5 pin 2 (RXD from external)

Purpose: Limits ESD current to IC pin. At 8kV contact discharge
(150pF, 330 ohms HBM model): I_peak = 8000V / (330+100) = 18.6A
Without resistor: I_peak = 8000V / 330 = 24.2A
23% reduction in peak ESD current extends IC pin lifetime significantly.

Also limits back-feed current if external device is powered while STM32 is off.
Resistor value (100R) negligible at UART speeds (115200 baud = 8.7us bit period).
RC time constant: 100R * 10pF(pin cap) = 1ns << 8.7us. No signal impact.

No protection at external interface: Debug UART header pins connected directly to STM32 GPIO pins with no series resistors and no ESD diodes. During development, engineer touches the header pins while wearing a wool sweater. 8kV static discharge goes directly into MCU pin. Pin's internal ESD structure fails, creating a permanent short to VDD. MCU must be replaced. Worse: in a product, customer experiences intermittent UART failures after a few months of connector plug/unplug cycles.

KiCad: Add series resistors on signal paths between ICs and connectors. Group them near the connector for clear intent. Add schematic note: "ESD protection resistors."

Altium: Create net class rules for connector-facing signals requiring series protection. Verify resistor presence in BOM vs. connector pin count.

OrCAD: Place series resistors in schematic between IC and connector symbol. Use auto-numbering to group (R_ESD1, R_ESD2, etc.) for clear identification.

  • High-speed signals: Adding 100 ohms in series with a 100MHz SPI clock creates RC filtering with input capacitance: 100R * 15pF = 1.5ns, limiting maximum frequency. Use 22-33 ohms maximum for high-speed.
  • Resistor AFTER ESD device: Series resistor must be BEFORE the TVS/ESD diode (between connector and diode) to limit current flowing into the ESD clamp during a surge event.
  • Analog signals: Series resistors on ADC inputs create a voltage divider with the ADC input impedance during sampling, causing measurement errors. Use lower values (10-47R) or buffer with op-amp.

4. AC Coupling Capacitors Major

What It Is

AC coupling capacitors block DC voltage while passing AC signals between circuit blocks that have different DC bias points. They are required in audio circuits, high-speed serial links (USB, PCIe, Ethernet), RF signal paths, and any interface where the transmitter and receiver have different common-mode voltage levels. The capacitor value determines the low-frequency cutoff: f_c = 1/(2*pi*R*C) where R is the receiver input impedance.

AC coupling also provides galvanic isolation between boards that may be on different ground references.

Why It Matters

Without AC coupling on USB high-speed data lines, the DC bias of the transmitter (pulled to 3.3V by internal bias resistors) would conflict with the receiver's bias circuit, preventing proper signal detection. In audio, DC offsets would cause speaker cone deflection and distortion. In Ethernet, DC coupling between devices on different ground references would create ground loops carrying hundreds of milliamps, generating hum and potentially damaging transceivers.

How to Check - Step by Step

  1. Identify all interfaces requiring AC coupling per their specification: USB 2.0 HS, USB 3.x, PCIe, SATA, Ethernet (transformer already provides isolation), HDMI, audio outputs.
  2. Verify AC coupling capacitors are present on the correct signals (data lines, not clock or power).
  3. Check capacitor values meet the interface specification: USB 2.0 HS = 100nF on D+/D-, PCIe/USB3 = 100-200nF on TX pairs.
  4. Verify capacitor tolerance and type: low-ESR ceramic (NP0/C0G for tight specs), voltage rating adequate.
  5. For differential pairs: verify both capacitors are same value and matched tolerance to maintain differential signal balance.
  6. Check that the capacitor does not attenuate low-frequency signal content (verify f_cutoff is well below minimum signal frequency).

USB 2.0 High-Speed AC coupling:

Per USB 2.0 Specification Section 7.1.2:
  D+ line: 100nF NP0/C0G 0402 (between USB transceiver and connector)
  D- line: 100nF NP0/C0G 0402 (between USB transceiver and connector)

Calculation:
  USB HS data rate: 480 Mbps (minimum frequency content: ~240MHz fundamental)
  Receiver impedance: 45 ohms (USB HS termination)
  f_cutoff = 1/(2*pi*45*100nF) = 35.4 kHz (well below 240MHz - passes all data)

  DC blocking: Prevents host/device bias conflicts
  Capacitor tolerance: +/-5% (NP0 standard)
  Both caps matched to maintain differential signal symmetry.

Missing AC coupling on USB: USB 2.0 High-Speed device connects D+/D- directly from PHY IC to USB connector with no series capacitors. Works fine on most hosts (where both sides have compatible DC bias). Fails on specific host controllers where the bias voltages conflict - device is not detected. Intermittent "USB device not recognized" errors affecting 10% of host computers. Fix requires cutting traces and soldering caps - field recall situation.

KiCad: Place coupling caps in schematic inline with differential pairs. Use matched component values. Add note referencing specification section requiring AC coupling.

Altium: Include AC coupling caps in differential pair schematic. Use Matched Length rules for differential pair routing including cap placement.

OrCAD: Place capacitors in series with signal path. Use paired component placement near the signal source for optimal signal integrity.

  • Wrong capacitor dielectric: Using X7R for precision AC coupling in audio/RF. X7R has microphonic effects and voltage-dependent capacitance changes. Use NP0/C0G for critical coupling.
  • DC bias on coupling caps: AC coupling cap between two circuits at different DC levels. The DC bias across the cap can reduce its effective capacitance (for MLCC) - calculate effective capacitance at operating bias point.
  • Forgetting DC bias path: After AC coupling, the receiver side needs its own DC bias network (resistor to mid-rail or internal bias). Without it, the received signal drifts to undefined DC level.

5. Common-Mode Chokes Major

What It Is

Common-mode chokes (CMCs) suppress common-mode noise on differential signal pairs while allowing the differential signal to pass unimpeded. They consist of two windings on a shared magnetic core - differential current (signal) creates opposing magnetic fields that cancel, presenting minimal impedance. Common-mode current (noise) creates additive fields, presenting high impedance that blocks the noise. CMCs are essential on USB, HDMI, Ethernet, CAN, and any high-speed differential interface at a board-to-cable boundary.

They are the primary defense against conducted EMI on cables that act as antennas.

Why It Matters

Differential signal cables connected to a PCB act as antennas for common-mode noise. Without a CMC, high-frequency switching noise on the ground plane couples onto the cable and radiates, causing EMC test failures. A 1-meter USB cable with 10mA of common-mode current at 200MHz radiates enough to fail FCC Class B limits by 10-20dB. A properly selected CMC can provide 20-40dB of common-mode rejection, making the difference between passing and failing certification.

How to Check - Step by Step

  1. Identify all differential signal pairs that exit the board through cables: USB, HDMI, Ethernet, CAN, RS-485.
  2. Verify a common-mode choke is present on each pair between the IC and the connector.
  3. Check CMC impedance at the noise frequency: typically 90 ohms at 100MHz minimum for USB, higher for EMC-critical applications.
  4. Verify CMC differential impedance is low (should not significantly affect the signal): typically < 1 ohm at signal frequency.
  5. Check CMC current rating exceeds the maximum DC current on the pair (relevant for USB VBUS, CAN biased buses).
  6. Verify CMC does not create excessive insertion loss at the signal frequency (check S-parameter data from manufacturer).
  7. For USB 3.x / high-speed: verify CMC bandwidth supports the signal data rate without excessive attenuation at Nyquist frequency.

USB 2.0 with CMC for EMC compliance:

Signal: USB D+/D- (480 Mbps High Speed)
CMC: Murata DLW21HN900SQ2 (SMD 0805, 90 ohms at 100MHz common-mode)
Placement: Between USB PHY and Type-C connector, after ESD protection

Specifications:
  Common-mode impedance: 90 ohms @ 100MHz (blocks noise)
  Differential insertion loss: 0.5 dB @ 480MHz (minimal signal impact)
  DC resistance: 0.3 ohms per line (negligible voltage drop)
  Rated current: 200mA (USB HS draws < 100mA on data lines)

Result: 25dB common-mode rejection at 100MHz.
Board passes FCC Class B with 6dB margin on USB cable emissions.

No CMC on USB: USB device connects PHY directly to Type-A connector with only ESD diodes. During EMC testing, USB cable (1.5m) radiates 15dBuV/m above FCC Class B limit at 240MHz (USB clock harmonic). Common-mode current of 25mA measured on cable. Adding a CMC in production requires board respin because there is no footprint provisioned. Product launch delayed 6 weeks for redesign.

KiCad: Use dedicated CMC symbol (two coupled inductors). Place between IC and connector in schematic. Specify MPN for correct impedance characteristics.

Altium: Model CMC with S-parameters from manufacturer. Run channel simulation to verify signal integrity with CMC in path. Use SI analysis for eye diagram.

OrCAD: Model CMC as coupled inductors in PSpice. Simulate common-mode rejection. Verify differential signal is not excessively attenuated by the choke.

  • Wrong frequency range: CMC rated at 90 ohms at 100MHz but noise problem is at 500MHz where the CMC impedance has dropped to 20 ohms. Verify CMC impedance at your actual noise frequency.
  • High-speed signal degradation: CMC with too much differential impedance (poor winding symmetry) attenuates the signal, causing eye diagram closure and bit errors on USB 3.x or HDMI.
  • Saturation with DC: CAN bus has DC bias through the CMC. If DC current saturates the core, common-mode impedance drops to zero - no EMC benefit. Check rated DC current.

6. Interface Timing Compliance Critical

What It Is

Interface timing compliance verifies that signal setup times, hold times, clock-to-data delays, and propagation delays meet the requirements specified in interface standards and component datasheets. This includes verifying that clock-data relationships are maintained after accounting for trace delay differences, component delays, and operating frequency. Every synchronous interface has a timing budget that must balance.

Timing analysis catches errors that work at low speed/short traces but fail at full speed/production board lengths.

Why It Matters

A timing violation of even 1 nanosecond causes the receiving IC to sample data at the wrong moment, resulting in bit errors. At high data rates (DDR memory at 1600 MT/s), the total timing window is only 1.25ns - leaving margins of only 200-300ps per source of delay. An unterminated trace with 500ps of flight time difference between clock and data can consume the entire timing margin, causing intermittent errors that depend on temperature, voltage, and data pattern. These are the hardest bugs to diagnose in production.

How to Check - Step by Step

  1. Identify all synchronous interfaces and their timing specifications: SPI (setup/hold relative to clock edge), SDRAM (tDQSS, tDS, tDH), I2C (tSU;DAT, tHD;DAT).
  2. Extract component timing parameters from both the source and destination datasheets.
  3. Create a timing budget: Available_window = Clock_period - Setup_time - Hold_time - Clock_jitter - trace_skew.
  4. Estimate trace length differences (skew) between clock and data signals on the PCB.
  5. Calculate propagation delay skew: Skew = (Length_difference) * (6.5 ps/mm for microstrip).
  6. Verify remaining timing margin is positive with at least 10-20% guardband.
  7. For SDRAM/DDR: use JEDEC timing spreadsheets or vendor tools (Micron timing calculators) to verify all parameters.

SPI interface timing budget at 20MHz:

Clock period: 50ns (20MHz)
STM32 SPI output: data valid 5ns before clock edge (setup provided)
W25Q128 Flash requirements:
  tSU (setup time): 3ns minimum (data must be stable 3ns before clock)
  tHD (hold time): 5ns minimum (data must remain stable 5ns after clock)

Trace length difference (clock vs. data): 15mm maximum
Propagation skew: 15mm * 7ps/mm = 105ps = 0.105ns

Timing check:
  Setup margin: 5ns(provided) - 3ns(required) - 0.105ns(skew) = 1.9ns MARGIN
  Hold margin: data holds for > 20ns (half clock period) - 5ns(required) = 15ns MARGIN

Both margins positive with large guardband. PASS for 20MHz operation.

SDRAM timing violation: STM32F4 driving SDRAM at 168MHz (6ns period). Data bus trace lengths vary by 30mm between shortest and longest. Propagation skew: 30mm * 7ps/mm = 210ps. SDRAM tDS (setup) = 350ps, tDH (hold) = 350ps. Available window: 3ns (half period for SDR) - 350ps - 350ps - 210ps - 200ps(jitter) = 1.89ns. This is positive but only 60% margin. At temperature extreme (faster propagation) and with connector added (extra delay), margin drops below zero. Intermittent data corruption at high temperature. Board works perfectly at 25C but fails at 70C.

KiCad: No built-in timing analysis. Use external timing spreadsheets. Add maximum trace length constraints as notes on schematic. Define match groups for layout.

Altium: Use Signal Integrity with IBIS models for timing analysis. Define Matched Length rules for synchronous bus signals. Net classes with max length constraints.

OrCAD: Use PSpice transient simulation with transmission line models. Measure setup/hold times at receiver pins. Compare against IC timing requirements.

  • Prototype works, production fails: Short prototype traces have negligible skew. Production boards with different layout have longer, more varied trace lengths that consume timing margin.
  • Clock jitter ignored: Timing budgets that ignore clock jitter (typically 50-200ps for PLL-generated clocks) overestimate available margin.
  • Via delays: Each via adds approximately 30-70ps of delay. A signal with 3 vias vs. a clock with 1 via has 60-140ps of skew from vias alone.