A clock edge that reaches the open end of a line or a stub is reflected. If the reflections pull the voltage back through the receiver’s threshold, the receiver counts one edge as two. A converter that takes its rate from that clock then runs at about twice the intended rate.
Why does a converter depend on its clock?
Many analog-to-digital converters, delta-sigma converters among them, take a master clock from outside and derive everything from it: the modulator rate, the digital filter and the output data rate. The converter does not know what time it is. It counts clock edges. Give it twice as many edges and it delivers twice as many samples, with its filter moved to twice the frequency, and it reports nothing unusual.
When several sensing nodes must sample on one clock, that clock is sent to them over a trace or a cable. From that moment the clock is not a logic level. It is a wave on a line.
What happens to an edge at the end of a line?
An edge travels along a cable at about 5 ns per metre. Where the line ends, the wave meets whatever is connected there. The share that is sent back is the reflection factor
Γ = ( Z_end − Z0 ) / ( Z_end + Z0 )
with Z0 the characteristic impedance of the line and Z_end the impedance at its end.
| End of the line | Γ |
What comes back |
|---|---|---|
Resistor equal to Z0 |
0 | Nothing: the edge is absorbed |
| Open, or a high-impedance input | +1 | The whole edge, same sign: the voltage at the end doubles |
| Short | −1 | The whole edge, inverted |
A logic input is a few picofarads and megaohms. For an edge it is an open end.
The reflected edge runs back to the driver. A driver with an output resistance below Z0 reflects it again, inverted and smaller, with Γ_s = (R_s − Z0) / (R_s + Z0). The line rings: the voltage at the open end steps up and down around its final value, once per round trip.
Worked example (example values, not our circuit). A driver with R_s = 25 Ω sends a 1 V step into a line with Z0 = 100 Ω, open at the end.
- The step launched into the line is
Z0 / (R_s + Z0)= 0.8 V. Γ_s = (25 − 100) / (25 + 100)= −0.6.- The voltage at the open end, one level per round trip: 1.60 V, 0.64 V, 1.22 V, 0.87 V, 1.08 V, towards 1 V.
The second level is the one that matters. After rising to 1.6 V the voltage falls back to 0.64 V and then rises again. An input whose threshold lies above 0.64 V sees the clock go high, low and high: two rising edges where one was sent.
When does a line count as long?
When the reflections arrive after the edge is over. If the round trip is much shorter than the rise time, the reflections overlap with the edge that caused them and merge into a slight overshoot. The usual rule: a line behaves as a transmission line when its one-way delay exceeds about one sixth of the rise time [1].
Example. A 4 ns edge is about 0.8 m long on a cable. One sixth of that is 13 cm. A 2 cm trace on a board is harmless for this edge. A 1.5 m cable has a round trip of 15 ns, almost four times the rise time, and every reflection stands clear of the edge. In the model above, with these example values, the second edge is counted from a line length of about 0.4 m.
Note what the rule depends on: the rise time, not the clock frequency. A slow clock from a fast driver rings exactly as a fast one does.
What is a stub, and why does an open one matter?
A stub is a length of line that branches off, or runs on, and ends in nothing that absorbs the wave: a branch to a connector, a test point, a cable to a node whose input is the only thing at its end. Where a stub leaves a line of the same impedance, an arriving edge sees two lines in parallel, half the impedance. One third of it is reflected, inverted, and two thirds continue into each branch:
Γ_junction = ( Z0/2 − Z0 ) / ( Z0/2 + Z0 ) = −1/3
The part that runs into the stub returns from its open end one stub round trip later and is split again at the junction. Every receiver on the net then sees the edge in pieces: a first step, and later arrivals that add to it or take away from it. The receiver at the open end of the stub sees the largest swings, as in the figure.
Whether those pieces produce an extra count depends on three things: how large the returning wave is (the driver’s impedance and the terminations), how late it arrives (stub length against rise time), and where the input’s threshold lies and how much hysteresis it has. In the model the count is one at a threshold of 50 % and two at 70 %; with a stronger driver it becomes three or more. That is why this fault shows up as “about twice” the rate, and why it can come and go with temperature, supply voltage or a different cable.
Does the same happen on an RS-485 bus?
Yes, with data edges instead of clock edges. An RS-485 bus is a twisted pair terminated at both ends in its characteristic impedance, typically Z0 = 120 Ω, with the nodes along it. Each node hangs on the trunk through a short branch, and its receiver input is a high impedance, so every branch is an open stub. An edge that runs into a long branch returns from its open end and puts a step or a dip into the edges on the trunk, at every node. Where that dip crosses a receiver’s threshold, a bit flips or a start bit appears that was never sent: framing errors, wrong bytes, a node that does not answer, or one that answers when another was asked.
The rules are the same as for a clock. Keep every branch electrically short against the driver’s rise time. Terminate the two ends of the trunk and nothing else. Run the trunk from node to node instead of branching it from a star. A driver with slower, controlled edges makes a longer branch harmless, where the bit rate allows it. Note 2 shows what sets the sample rate of the same kind of bus.
What did we find on our own bench?
While we developed our own measuring chain, an unterminated stub on a clock line made a converter count reflected clock edges and run at about twice its rate. Nothing in the data stream flagged it: every sample was a valid sample. Only the rate was wrong, and with it every frequency in the signal. We traced it to the stub.
Three signs point to this fault:
- The output data rate, measured against an independent time base, is about double the configured one, or a known test frequency reads at half its value.
- The fault changes when a cable is swapped, a connector is left empty or a probe is attached. A probe adds a few picofarads and is itself a small stub.
- The clock looks clean at the driver and has a step or a dip in its edges at the receiver.
How do you fix it?
- Terminate the end. A resistor equal to
Z0at the far end absorbs the edge. The cost is direct current through the resistor and a lower level:Z0 / (R_s + Z0)of the swing, 80 % in the example. A capacitor in series with the resistor removes the direct current. - Or terminate the source. A series resistor that raises the driver’s output resistance to
Z0absorbs the reflection when it returns. This suits one receiver at the end of the line. Receivers along the line would see a step at half height for one round trip. - Remove the stub or make it short. Route the clock from node to node in one line, with the termination at the last node, and keep every branch shorter than one sixth of the edge.
- Do not make the edge faster than needed. A slower edge makes more of the net electrically short. The limit is jitter: a slow edge crosses the threshold less sharply.
- Use an input with hysteresis, and a differential pair for a clock that leaves the board.
- Check the count. Measure the output data rate against a second time base in the production test.
What are the limits of this model?
The figure uses a lossless line, a linear driver, an ideal open end and one threshold with a small hysteresis. Real cables damp the ringing, real inputs clamp overshoot with their protection diodes, and real drivers are not resistors. The model shows the mechanism and the direction of every fix. It does not predict the count for a given circuit; a measurement at the receiver does.
Where we fit
Clock distribution is part of the chain we design: the sampling clock for multiple sensing nodes, its lines and their terminations. If you have a sensor whose rate, noise or spectrum does not match its settings, Sensor Rescue rules out one candidate at a time, each with a measurement: supply, reference, clock, cabling, termination, protocol, mechanics. Send us a scope capture of the clock at the receiver.
What this means for your product
A clock or a bus that leaves a board is a transmission line, whatever its frequency. Decide for every such net where it ends and what absorbs the edge there, and count every connector that may be left empty as an open stub. If your sensor runs at a multiple of its rate, or changes its behaviour with the cable, look at the edges at the receiver before anything else. Then send us that capture: Sensor Rescue finds the cause from it.
[1] H. W. Johnson and M. Graham, High-Speed Digital Design: A Handbook of Black Magic, Prentice Hall, 1993: transmission lines, reflections, terminations, and the rule that a line longer than one sixth of the edge’s length behaves as distributed.
[2] ANSI/TIA/EIA-485-A, Electrical Characteristics of Generators and Receivers for Use in Balanced Digital Multipoint Systems, Telecommunications Industry Association, 1998.