Go Down

Topic: Separating analog and digital supplies / grounds (Read 2367 times) previous topic - next topic

jtw11

Hi all,

It seems I'm a little confused as to what people are referring to when discussing separating analog and digital grounds.

I'm working on a project at the moment using lots of different application specific ICs, for example - I'm using an IC that takes the input from a thermocouple, amplifies, conditions and converts into digitally accesible SPI information. So, would one consider this an analog, or a digital IC, given that it's accepting an analog signal but outputting / interfacing digitally?

My main question is, or my understanding is - separate noisy devices on a board  by giving them their own ground, i.e there's one +V connection to the board, and multiple GND connections - 1 for digital circuitry, another for the noisy things like H bridges etc. Then of course, these multiple ground connections go back to the power source.

When talking about separating digital and analog, would one use two separate supplies off the same source - i.e. two 5v voltage regulators, one supplying analog, one supplying digital? Then simply connect the grounds?

...but that's where I'm confused, I know of course all grounds must be common unless one is a fan of the magic smoke, but if you connect the grounds - do you not connect the noise between the two? Or is that the purpose of connecting grounds using a ferrite bead?

dc42


When talking about separating digital and analog, would one use two separate supplies off the same source - i.e. two 5v voltage regulators, one supplying analog, one supplying digital? Then simply connect the grounds?


You would not normally need to use 2 separate supplies for analog and digital circuitry, although you might use a LC network to filter power to the analog device.

The important thing to realise is that when you want to sense a voltage accurately - such as measuring the output from a thermocouple with the chip you are referring to, or measuring the output from a LM34 or similar temperature sensor by connecting it to the analog input of an Arduino - then unless the measuring chip has a differential input, it is measuring the input voltage with respect to its local ground pin. Some chips, such as the microcontrollers used in Arduinos, even have a separate AGND pin for this. So you need to make sure that the ground side of the thermocouple, temperature sensor etc. is connected as directly to that ground pin as possible. What you do not want is for the ground side of the sensor to share a wire, PCB trace or connector that also supplies power to the chip, or is the return side for a load connected to a digital output - because power or output current will induce a small voltage in the shared ground connection due to its resistance and inductance.

When connecting a sensor to an Arduino analog input, then short of soldering a wire directly to AGND on the IC, the best that can be achieved is to dedicate one of the Arduino ground pins to use as analog ground, and use the other ground pins for power and the return side of outputs. Ideally, they would have designed the Arduino boards with one of the ground pins separately routed direct to AGND.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

SirNickity

Too add another perspective:

It's all a matter of compromise.  A chip with both analog and digital functions is considered a hybrid IC.  The Atmel uC is a good example of this, since it does have analog inputs.  As dc42 said, it has a dedicated analog ground pin for this reason.  How much separation you provide is entirely up to you and the needs of your application.

For ultra-precise 24-bit ADC, for example, you would want to go to great lengths to ensure the supplies (Vcc and Gnd) were as stable as physically possible.  This means heavily filtered Vcc, and super low-impedance grounds.  The thinking behind this is that there's no such thing as a perfect ground.  All traces, wires, pins, and components have some impedance.  The longer and more convoluted the path, the more impedance.  The more stuff sharing that path, the more that impedance starts to manifest as current.  In other words, Ground ceases to be 0.0000v, and instead ends up being 0.01v, for example.  Worse still is it will fluctuate as loads change.  This is exactly what you don't want with a "reference".

So, regarding whether it's a good idea to use separate regulators and whatnot, well... again... it depends.  You could power every component with its own battery.  You could share the battery and provide separate regulators.  You could share a regulator and put local filtering caps right up at the Vcc pins of the ICs.  It depends on how much, in practical use, one component affects others.  Bear in mind, you may get better results from using filters (inductors, caps, resistors, and diodes in various arrangements) where the Vcc line splits than you get with anything short of dedicated power supplies for each IC.

For grounds, you don't want any filtering.  Those should be as direct as they can be back to the supply ground terminal.  The idea of separation here is that a given trace or wire can only funnel so much current before the voltage on that line is non-zero.  (Technically, it can't funnel any current without being non-zero.  Really I mean "with a negligible increase.")  Digital circuits tend to switch between fully-on and fully-off.  This causes power dips on the off-to-on transition, and power spikes on the on-to-off transition.  The filtering caps will absorb this and shunt the resulting AC noise to ground.  So, you don't want your analog ground reference twiddling around with spikey transients when it should be a perfect flat 0.000v.  The solution is to provide a dedicated, clean ground.

You may be thinking, "well doesn't the ground at the supply have all this accumulated mess on it?"  Yes, yes it does.  BUT, the important thing to remember is that "Ground" is not a concrete, tangible thing.  It's a reference point.  Vcc (and any signal) is relative to this reference.  If Vcc is +5 (with respect to ground), it doesn't matter if ground is really +60 with respect to some other arbitrary circuit.  The difference between Vcc and Ground is all that matters to the component using that supply ***.  As long as all components share the same precise reference point, their relative offsets are all perfectly aligned.

Once you grok this, you'll find yourself in the inevitable debate:  Which is better -- star grounding, or ground planes?  Many experts will argue one side or the other.  The truth is, star grounds have the advantage of every spoke of that star being at the same exact reference potential.  But, a ground plane implies lots of copper area on a PCB, and therefore minimal impedance.  So which is better?  Dedicated ground planes (for each device) in a star topology of course!  But then you run out of PCB area...  So you must compromise and decide which components can share a plane without dirtying it up too much, and isolate those that would poison the well for everything else.

*** Of course, this assumes that your circuit is not directly (DC) coupled to some other circuit where Ground is +60.  This is where isolation comes into play.  For instance, if two circuits are isolated from mains through a transformer, they're both floating with respect to each other.  Putting a probe of a meter on each circuit's ground will have undefined results, since they have nothing in common.  This is why you must always tie all connected circuit grounds together, so their voltages are all relative to the same reference.

LarryD

FYI:
http://www.maximintegrated.com/app-notes/index.mvp/id/4345
The way you have it in your schematic isn't the same as how you have it wired up!

jtw11

Sorry it's taken me so long to reply to these replies, I've been pinned with a number of other things.

I'm just trying to absorb these now. On the subject of ground not being 0, I assume this voltage is according V=IR, in which case - is the resultant non 0 value of ground a negative voltage?

SirNickity


jtw11


Only if the current is negative.


Hmm, I which case - I've clearly missed a fundamental block, what causes the shift upwards from 0v? I know people say its due to resistance, but by what formula?

Grumpy_Mike

Quote
I know people say its due to resistance, but by what formula?

Ohms law, suppose you have a ground lead with a 1A current flowing through it an a 1 ohm resistance.
Then at one end of the ground lead, the one at the supply, will be 0V and the other end will be 1V. Half way along that lead it will be 0.5V. So if you connect something else half way along that ground lead it will not be ground but 0.5V.

Therefore connect all current carrying ground leads together at one point. This is called a star configuration.

jtw11


Quote
I know people say its due to resistance, but by what formula?

Ohms law, suppose you have a ground lead with a 1A current flowing through it an a 1 ohm resistance.
Then at one end of the ground lead, the one at the supply, will be 0V and the other end will be 1V. Half way along that lead it will be 0.5V. So if you connect something else half way along that ground lead it will not be ground but 0.5V.

Therefore connect all current carrying ground leads together at one point. This is called a star configuration.


Aha! The number of different articles I've read - but how that was worded for some reason makes perfect sense to me. It also explains perfectly why a number of devices I've worked with have two ground connections on the board back to the power supply, one for the high current devices which won't be 0V ground, but lifted, whilst the other ground for control devices will be 0V (well, much closer!). I assume that's exactly what you're referring to when you say "therefore, connect all current carrying grounds together at one point"...

You're not so grumpy after all!  :)

retrolefty

Quote
You're not so grumpy after all!


Being Grumpy and being correct are not mutually exclusive.  One can be both ;)
Lefty


jtw11

Quote
A chip with both analog and digital functions is considered a hybrid IC


So, in this case - where would you locate a hybrid chip on the board, with the digital devices, or the analog devices? :D

dc42

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

jtw11


Between the two.


Of course - that makes sense! As for hybrid grounds, I'd imagine (using the example of my thermocouple interface SPI device) I'd ground this along with the rest of the control digital circuitry. It would make sense.

dc42

If there is just one hybrid chip involved, then you would connect the analog and digital grounds together at that chip and nowhere else.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

jtw11

Bit of a thread revival here - I've been flat out with other things for the last couple of weeks, so have let this slip. So, my board will have two separate grounds - one for digital, one for analog.

On the subject of classifying ICs, I'm just listing mine out and have a few left which I can't quite justify whether its analog or digital.

- h-bridge, as it takes digital signals but ultimately the waveform across the output terminals are not truly digital due to the motor inductance
- stepper motor driver, again - digital in, not truly digital out
- switching MOSFETs and IGBTs, for switching inductive loads, so again - analog or digital?
- gate drivers, hmm.
- discretes such as TVS diodes?

Go Up