1.4.1 Ground Offsets and Single-Ended Signals
Ground offsets are especially dangerous when measuring single-ended signals. The ground return impedance can generate voltage offsets, which adds error to the measurement. The current (IFLOW) flowing through the impedance of the ground return (ZGROUND) generates voltage offsets (VOS).
From this formula, there are two ways to reduce the size of a voltage offset - one is to reduce the amount of current flowing through the ground return, and the other is to lower the impedance of the return.
Lowering the current flow through the ground return is straightforward. High current paths, such as those from a motor or a heating element, must be given their dedicated ground return isolated from the microcontroller’s ground return. In the case of a ground plane, the current will be dispersed throughout the copper plane.
The other way to lower the offset is to reduce the impedance of the ground return. Impedance has two components associated: A real resistance (R) and an imaginary reactance (X).
The actual resistance is derived from the resistivity of the material connecting point A to point B. Attaching the microcontroller directly to a ground plane is the best way to minimize the amount of resistivity. However, in many cases, it is necessary (from a layout perspective) to instead use a via to connect the device to a ground plane.
The reactance of the ground return is created primarily from the parasitic inductance (L). This causes the reactance to increase as the frequency (f) rises.
One of the challenges with digital signals is that they are not composed of a single frequency like sine waves. Instead, square waves are composed of odd-numbered sinusoidal harmonics of their switching frequency (f). For example: 3f, 5f, 7f, etc., as shown in Figure 1-6.
One of the ways to suppress the high-frequency currents by digital logic is by placing decoupling capacitors near the microcontroller. These capacitors act as short-circuits to the high-frequency elements, which reduces the reactance and the impedance seen by these elements.