The Basics: Single-Ended and Differential Signaling
Single-ended signaling is a simple and common way of transmitting an electrical signal from a sender to a receiver. The electrical signal is transmitted by a voltage (often a varying voltage), which is referenced to a fixed potential, usually a 0 V node referred to as "ground."
One conductor carries the signal and one conductor carries the common reference potential. The current associated with the signal travels from sender to receiver and returns to the power supply through the ground connection. If multiple signals are transmitted, the circuit will require one conductor for each signal plus one shared ground connection; thus, for example, 16 signals can be transmitted using 17 conductors.
Differential signaling, which is less common than single-ended signaling, employs two complementary voltage signals in order to transmit one information signal. So one information signal requires a pair of conductors; one carries the signal and the other carries the inverted signal.
Single-ended vs. differential: Generic timing diagram
The receiver extracts information by detecting the potential difference between the inverted and non-inverted signals. The two voltage signals are "balanced," meaning that they have equal amplitude and opposite polarity relative to a common-mode voltage. The return currents associated with these voltages are also balanced and thus cancel each other out; for this reason, we can say that differential signals have (ideally) zero current flowing through the ground connection.
With differential signaling, the sender and receiver don't necessarily share a common ground reference. However, the use of differential signaling does not mean that differences in ground potential between sender and receiver have no effect on the operation of the circuit.
If multiple signals are transmitted, two conductors are needed for every signal, and it is often necessary or at least beneficial to include a ground connection, even when all the signals are differential. Thus, for example, transmitting 16 signals would require 33 conductors (compared to 17 for single-ended transmission). This demonstrates an obvious disadvantage of differential signaling.
Differential signaling topology
Benefits of Differential Signaling
However, there are important benefits of differential signaling that can more than compensate for the increased conductor count.
No Return Current
Since we have (ideally) no return current, the ground reference becomes less important. The ground potential can even be different at the sender and receiver or moving around within a certain acceptable range. However, you need to be careful because DC-coupled differential signaling (such as USB, RS-485, CAN) generally requires a shared ground potential to ensure that the signals stay within the interface's maximum and minimum allowable common-mode voltage.
Resistance to Incoming EMI and Crosstalk
If EMI (electromagnetic interference) or crosstalk (i.e., EMI generated by nearby signals) is introduced from outside the differential conductors, it is added equally to the inverted and non-inverted signal. The receiver responds to the difference in voltage between the two signals and not to the single-ended (i.e., ground-referenced) voltage, and thus the receiver circuitry will greatly reduce the amplitude of the interference or crosstalk.
This is why differential signals are less sensitive to EMI, crosstalk, or any other noise that couples into both signals of the differential pair.
Reduction of Outgoing EMI and Crosstalk
Rapid transitions, such as the rising and falling edges of digital signals, can generate significant amounts of EMI. Both single-ended and differential signals generate EMI, but the two signals in a differential pair will create electromagnetic fields that are (ideally) equal in magnitude but opposite in polarity. This, in conjunction with techniques that maintain close proximity between the two conductors (such as the use of twisted-pair cable), ensures that the emissions from the two conductors will largely cancel each other out.
Single-ended signals must maintain a relatively high voltage to ensure adequate signal-to-noise ratio (SNR). Common single-ended interface voltages are 3.3 V and 5 V. Because of their improved resistance to noise, differential signals can use lower voltages and still maintain adequate SNR. Also, the SNR of differential signaling is automatically increased by a factor of two relative to an equivalent single-ended implementation, because the dynamic range at the differential receiver is twice as high as the dynamic range of each signal within the differential pair.
The ability to successfully transfer data using lower signal voltages comes with a few important benefits:
- Lower supply voltages can be used.
- Smaller voltage transitions
- reduce radiated EMI,
- reduce power consumption, and
- allow for higher operating frequencies.
High or Low State and Precise Timing
Have you ever wondered how exactly we decide if a signal is in a logic-high or logic-low state? In single-ended systems, we have to consider the power supply voltage, the threshold characteristics of the receiver circuitry, perhaps the value of a reference voltage. And of course there are variations and tolerances, which bring additional uncertainty into the logic-high-or-logic-low question.
In differential signals, determining the logic state is more straightforward. If the non-inverted signal's voltage is higher than the inverted signal's voltage, you have logic high. If the non-inverted voltage is lower than the inverted voltage, you have logic low. And the transition between the two states is the point at which the non-inverted and inverted signals intersect—i.e., the crossover point.
This is one reason why it is important to match the lengths of wires or traces carrying differential signals: For maximum timing precision, you want the crossover point to correspond exactly to the logic transition, but when the two conductors in the pair are not of equal length, the difference in propagation delay will cause the crossover point to shift.
There are currently many interface standards that employ differential signals. These include the following:
- LVDS (Low-Voltage Differential Signaling)
- CML (Current Mode Logic)
- High-quality balanced audio
Clearly, the theoretical advantages of differential signaling have been confirmed by practical use in countless real-world applications.
Basic PCB Techniques for Routing Differential Traces
Finally, let's learn the basics of how differential traces are routed on PCBs. Routing differential signals can be a bit complex, but there are some basic rules that make the process more straightforward.
Length and Length Matching – Keep It Equal!
Differential signals are (ideally) equal in magnitude and opposite in polarity. Thus, in the ideal case, no net return current will flow through ground. This absence of return current is a good thing, so we want to keep everything as ideal as possible, and that means we need equal lengths for the two traces in a differential pair.
The higher the rise/fall time of your signal (not to be confused with the frequency of the signal), the more you have to ensure that the traces have identical length. Your layout program might include a feature that helps you to fine-tune the length of traces for differential pairs. If you're having difficulty achieving equal length, you can use the "meander" technique.
An example of a meandered trace
Width and Spacing – Keep It Constant!
The closer the differential conductors are, the better the coupling of the signals will be. Generated EMI will cancel out more effectively, and received EMI will couple more equally into both signals. So try to bring them really close together.
You should route the differential-pair conductors as far away from neighboring signals as possible, in order to avoid interference. The width of and space between your traces should be selected according to the target impedance and should stay constant over the entire length of the traces. So if possible, the traces should remain parallel as they travel around the PCB.
Impedance – Minimize Variations!
One of the most important things to do when designing a PCB with differential signals is to find out the target impedance for your application and then lay out your differential pairs accordingly. Also, keep impedance variations as small as possible.
The impedance of your differential line depends on factors such as the width of the trace, the coupling of the traces, the copper's thickness, and the PCB's material and layer stack-up. Consider each of these as you try to avoid anything that changes the impedance of your differential pair.
Do not route high-speed signals over a gap between copper areas on a plane layer, because this also affects your impedance. Try to avoid discontinuities in ground planes.
Layout Recommendations – Read, Analyze, and Overthink Them!
And, last but not least, there is one very important thing you have to do when routing differential traces: Get the datasheet and/or application notes for the chip that is sending or receiving the differential signal, read through the layout recommendations, and analyze them closely. This way you can implement the best possible layout within the constraints of a particular design.
Differential signaling allows us to transmit information with lower voltages, good SNR, improved immunity to noise, and higher data rates. On the other hand, the conductor count increases, and the system will need specialized transmitters and receivers instead of standard digital ICs.
Nowadays, differential signals are part of many standards, including LVDS, USB, CAN, RS-485, and Ethernet, and thus we all should be (at the very least) familiar with this technology. If you are actually designing a PCB with differential signals, remember to consult relevant datasheets and app notes, and if necessary read this article again!
Featured image courtesy of Hardwareonkel (own work) [CC BY-SA 3.0]