Series terminating resistor - Page 1
Forum section: electronics / beginners

author: Kaisha
author_rank: Contributor
timestamp: August 11, 2021, 06:37:00 pm
content: I'm looking to run 3 'buses' (interfaces?? connections?? not sure what to call them).An SPI at 10-20MHz, a parallel bus to an LCD at around 10-20MHz, and an I2S at 1-2MHz.My understanding is that I should have some sort of series terminating resistor at the source to attenuate signal reflections at those speeds. I've seen resistor sizes ranging from 33 to 100 ohms suggested online, but they all state that you need to match the resistor to the impedance of the trace, and I'm not sure how to calculate that.The impedance calculator here (https://www.pcbway.com/pcb_prototype/impedance_calculator.html) gives me a trace impedance of 133 ohms (much higher than I've seen others suggest). Also the SPI and I2S will be running across an edge connector (so I can swap in and out modules) and the LCD across a short length of FFC.Without building the whole pcb, getting it printed, and manually measuring, is there any way to calculate an approximate impedance? Is there some general size of resistor that 'just works' most of the time?

author: TimFox
author_rank: Super Contributor
timestamp: August 11, 2021, 06:41:33 pm
content: Impedance calculators such as the one you cite are the normal way to estimate the characteristic impedance before fabricating the PCB. 133 ohms is a reasonable answer, depending on all of the variables including the substrate dielectric constant.

author: Kaisha
author_rank: Contributor
timestamp: August 11, 2021, 06:52:16 pm
content: So if I know the impedance, how do I determine resistor size?And would FFC cable or card edge connector affect impedance?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 11, 2021, 07:04:14 pm
content: Mismatch corresponds to the amount of reflection present.How much reflection is tolerable?Well, EMC concerns aside, the logic receiver thresholds should still be met. For CMOS, this is typically 30/70% (some crummy devices show 20/80%, check the datasheet!).So a 30% mismatch should generally be acceptable. It's pretty loose, no big deal.Note that the line has some loss, so it may be reasonable to air on the side of lower resistance. This can be useful for longer lines and lossy dielectrics (some meters say, especially in PVC; more length for PE, PTFE, etc.). This probably isn't relevant for on-board stuff (FR-4 is lossy, but you're not going to have meters of single routes!), or short cables.Or if you don't need sharp edges, larger values may be desirable (effectively, using the TL as a filter capacitor). This probably isn't relevant for your SPI and parallel, but may be useful for the I2S.Note that a series termination resistor reduces the DC current capacity of the pin. This is fine for CMOS input pins, that draw essentially no DC. Anything with a DC load, may require a different approach. (TTL inputs are questionable, okay with low fanout; heavy loads like load termination resistors, should probably use a driver -- or find a receiver with correspondingly lower input thresholds. Special case: LEDs need a current-limiting resistor anyway -- the source terminator is free!)What is a transmission line?It's a pair of conductors, having constant cross section.They can bend and stuff, it doesn't have to be a laser straight course or anything, just that the shape is consistent along the whole path.For PCBs, this is typically a trace over, or between, ground plane.Ensure that the ground plane is solid, i.e. the trace does not cross over gaps in the plane.If multiple planes are used, it's okay to route over a gap in one, as long as the other is contiguous over a wide area surrounding that gap. Do provide adequate bypassing between planes, so that they all act together as AC grounds.If one plane is used and crossings are inevitable (2-layer board), pour both sides and "stitch" around the gaps with vias (or jumper traces if you're not pouring both sides). Note this applies to any gap in the plane: traces, and rows of pins, both cut into the pour. Prefer perpendicular crossings and nearby vias, to keep the perimeter of the ground opening small.For cables, ensure that there are multiple grounds for every signal, preferably shielding them. Coax is better than multi-conductor cable for example (not that you'll likely have that luxury very often). For example, a typical use of ribbon cable (or flex, etc.) is to ground every other line, and this gives Zo ~ 100R for the PVC ribbon stuff for example. You probably won't be able to ensure this for your LCD cable, but it's also short, so matters less. (It may still be a source of RFI; a ground connection to the bezel or its control circuit may help, or ferrite bead(s) on the cable, etc.)For longer routes, consider differential transceivers. SPI effortlessly goes via RS-422 (3 transmitters 1 receiver, and vice versa at the other end), which can use twisted-pair ribbon cable or CAT5, and a load termination resistor. (Preferably, the cable should be shielded, as RS-422 still depends on the ground reference between rx/tx; and you probably want a power line in that cable, too. Even without shield, it's a darn sight better than running plain 3.3/5V logic signals any distance!)Tim

author: Kaisha
author_rank: Contributor
timestamp: August 11, 2021, 07:29:35 pm
content: So if the trace lengths are no longer than 10cm, what values for series terminating resistors would you use for each of the 3 buses?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 11, 2021, 07:32:53 pm
content: At such short lengths, it might simply not matter.Good practice is Rs = Zo - Rpin.Pin resistance isn't usually listed, but it can be inferred from VOH/IOH and L values, and is usually 30-70 ohms.May be helpful anyway, putting in series resistors, even if they're 0-ohm jumpers -- just so you can swap around pins if you find a mistake in the prototype.Tim

author: Kaisha
author_rank: Contributor
timestamp: August 11, 2021, 07:45:05 pm
content: Is that pin resistance both pins?Rs_max = 133 - (30+30) = 73 OhmRs_min = 133 - (70+70) < 0 OhmSo pick a value between 73 and 0?

author: Vovk_Z
author_rank: Super Contributor
timestamp: August 11, 2021, 08:00:14 pm
content: I guess Rpin is an output resistance (impedance).

author: TimFox
author_rank: Super Contributor
timestamp: August 11, 2021, 08:07:22 pm
content: For an ideal "series termination", the total source resistance (device output resistance plus added series resistance) equals the characteristic impedance of the transmission line, and the load impedance is infinite (much higher than the characteristic impedance). If you drive a short pulse into a long line, then the voltage of the pulse after it leaves the source resistance is cut by a factor of two, but you get an 100% positive reflection at the far end, which restores the voltage to the original amplitude. That reflection travels back to the source, where it is absorbed in the source resistance. Mismatch of source and line impedances will give a weak pulse reflection (positive or negative, depending on mismatch) from the source impedance, which then follows the same route back and forth, until the reflected amplitude is negligible. This is the basis of more detailed descriptions above.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 11, 2021, 08:07:24 pm
content: Only the transmitting pin matters.You can't satisfy both min and max (it also varies between high and low states), so picking the middle (~50R) is appropriate.Tim

author: Kaisha
author_rank: Contributor
timestamp: August 11, 2021, 08:20:41 pm
content: I appreciate the info guys.