A lack of attention to ground is a common problem in the analog world, so understanding principles about ground leads to more fun with ADCs.
What’s the big deal about running an analog-to-digital converter (ADC) device? Tie a sensor output to an ADC input and start taking readings. Right? After all, digital signaling offers strong noise rejection, so switching between levels is firm and there is plenty of built-in margin. Still, analog signaling is much more susceptible to noise.
Put too much noise around an ADC and results suffer. And most analog noise problems trace back to one issue: a lack of attention to ground. For makers, understanding basic principles about ground leads to more fun with ADCs.
Is ground as simple as it looks?
The ease of low- and mid-speed digital design makes ground seem simple. On a solderless plug-in breadboard, there are rails running down opposite edges—power and ground. Power gets tied to the red pin on the power supply or red lead on the battery and ground gets tied to the black pin or lead. After power and ground pins on parts get tied to a nearby rail and things power up, ground goes unnoticed in many designs.
Figure 1 The above image shows power rails on edges of solderless plug-in breadboard. Source: BusBoard Prototype Systems
The faster digital things switch and the finer analog resolution becomes, the more ground screams for attention. Ground isn’t merely a zero-voltage level. It’s a return path for current, where electrons get soaked up after doing real work moving through transistors and passive components.
A perfect ground would change nothing in circuit behavior. Imperfect ground is another story. Add a bit of resistance in the return path from a narrow trace, a bad solder joint or too few ground pins on a chip, and “ground bounce” shows up as voltage spikes. Throw in a bit of stray inductance from leads on chip packaging, and power supply noise intensifies at higher frequencies.
Higher ADC resolution pushes step widths into the millivolt range, making noise and spikes on the analog input a problem. Bits of error from input noise sit on top of error sources inside the ADC.
Off-the-shelf designs can help a lot
So, how should ground look when using ADCs? The good news is that makers have access to well-designed boards and sensors that take steps for improved ground quality.
Boards with microcontrollers or SoCs often have a ground plane. Ground is on a nearly solid PCB layer with as much copper thickness as possible, or more than one layer on a large multilayer board. Pins needing ground have it close by, and resistance is low from one side of the board to the other. Bypassing power pins with capacitors offsets stray inductance and smooths out power supply noise.
Smarter sensors integrate microcontrollers and ADCs. Here, the shorter distance signals travel in analog form, the less opportunity for noise to corrupt them. Makers can also grab many sensors that present data on I2C or SPI interfaces, digitized and ready to go.
The concern with off-the-shelf modules is islands of unconnected ground. Let’s look at an example with a feather board, one digital sensor breakout, and one analog sensor breakout.
Star grounds, then twist signals if needed
Those islands of unconnected ground can make all the difference. Here, two related principles should guide the connections.
Placing the analog sensor breakout closest to the feather ground pin and analog inputs helps. Using stackable modules, like a FeatherWing Proto, also helps keep signal run distances from the breakouts short.
While onboard ADC channels are handy, they may use just an analog input pin, relying on digital ground as analog ground. As sample rates increase and analog runs become more than a couple of centimeters, the analog signal may need more noise protection. Here is what to do in such situations.
Twisted pair and differential approaches rely on the same concept. Noise imposed on a tightly-coupled pair of wires is same on both wires, cancelling out when sampled. For best performance with differential signaling, pre-twisted and shielded wire is available. Pro tip: when using shielding, do not ground both ends of the shield; ground one and attach the other through a capacitor to ground.
Figure 2 Simplified layout examples are displayed for solderless breadboard, stackable analog sensor breakout, and stackable ADC with I2C interface. Source: Stratiset
Getting better ADC results
A lot has been written about ground loops. They can pose intimidating problems, but they’re a phenomenon found mostly in complex board and system designs. In digital-first maker projects combining modules with a couple analog sensors, a bit of attention to ground takes away the chance for loops and solves most issues.
Following these principles should help create better designs around ADCs and get results that algorithm can rely on.
This article was originally published on Planet Analog.
After spending a decade in missile guidance systems at General Dynamics, Don Dingee became an evangelist for VMEbus and single-board computer technology at Motorola. He writes about sensors, ADCs/DACs, and signal processing for Planet Analog.