mixed signal pcb layout

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

12afael

Well-known member
Joined
Aug 6, 2004
Messages
1,332
Location
Helsinki
I´m designing a small codec/microcontroller board.  the pcb also have analog signal.
I have been reading about design of mixed signal pcbs and is a bit different of what I have learned as good design rules for analog circuits.  My first idea was use different grounds for analog and digital signals but I already know it is a bad idea.

In many pages people recommend set areas for digital and a different area for analog signals sharing the same ground but not crossing signals over this areas.

There are some things that I would like to know and I haven´t found on those pages.  by example I have to decide where the lowest ground impedance should be. the analog or the digital part? in other words where I should make the ground connection of the board.

other point where I´m a bit lost is that the system will have two boards. one with the microcontroller and the codec and other with an I/O expander connected by I2C. both pcbs will be in the same rack so distance is arround 15cm.  I wonder what would be the best way to set the ground on the I/O expander. should I create a digital area on that second board sharing the same ground or should I run a ground connection to the other digital section in the other boards?

I think this is just experience. Anyway if someone have some experience I would love to hear ideas or experiences.
 
So you think using separate grounds for analog and digital "is a bad idea"?

I disagree. In fact I would say it is a critical necessity.

The usual layout is to put the analog stuff on one side of the board and digital stuff on the other and then split the ground planes into an analog ground and digital ground. And usually the codec has analog stuff on one side of the chip and digital stuff on the other so that the chip can actually have analog pads on the one ground plane and digital pads on the digital ground plane.

Then run two separate ground traces back to the filter cap next to the power supply. Or if the power supply is a separate board, then run two separate wires back to the PS and connect right next to the negative terminal of the PS filter cap. This should also be the one and only point at which the two grounds come together.

Look at the datasheet for layout recommendations.
 
I would agree with square wave , separate grounds that only connect at one point. You can learn a lot from the datasheets of mixed chips, they often have layout suggestions that show how to arrange things.

You need to be careful with the PCB layout though, as the software can interpret things as a single net name, so sometimes you need some tricks to accomplish things.

You also want separate digital and analog power supplies. Or at the very least a filter between them to keep the digital hash from crossing over.
 
squarewave said:
So you think using separate grounds for analog and digital "is a bad idea"?

I disagree. In fact I would say it is a critical necessity.

The usual layout is to put the analog stuff on one side of the board and digital stuff on the other and then split the ground planes into an analog ground and digital ground. And usually the codec has analog stuff on one side of the chip and digital stuff on the other so that the chip can actually have analog pads on the one ground plane and digital pads on the digital ground plane.

OK, so at the day job we do very complicated boards with multiple ADCs (in one case, sixteen 100 MHz 16-bit ADCs talking to two FPGAs), and we achieve the noise performance indicated by the converter manufacturer data sheets, and we do it with boards which are laid out without split ground planes. Yes, that's a 12-layer board. I have some experience with this.

What happens when you have more than one converter on the board (like above)? Which one do you choose to be your ground-connection location?

What happens when you have digitally-controlled analog switches and muxes, or you use a device like a PGA2320? Or you have a DAC controlling a VCA? Or ADCs feeding a microcontroller for a metering or AGC application?

Basically, the idea of the split plane is very old, doesn't take into account the last 25 years of research in this area, and is not useful for any design with more than one mixed-signal device.

Look at the datasheet for layout recommendations.

Data sheets for recent devices all recommend one ground plane with no splits (I just checked some recent TI, AKM and Cirrus parts). That's what Henry Ott recommends, too, see here. Instead of splitting planes, you logically partition the board into analog areas and digital areas. Keep the analog signals out of the digital area, and the converse.

You must be sure to route the boards such that your analog signals and your digital signals do not cross. That can be difficult when using analog mux chips. When they do cross, they should cross at right angles. It's really to your advantage to do a four-layer board to ensure that traces are drawn over planes.

Remember that the signals take the path of least inductance, and that the return current for a single-ended signal will be in the adjacent plane. This makes for easy visualization where signal returns might mix, so you can avoid that.

And with that visualization, you can see where a ground plane split will cause trouble. If you split the plane, the return current for a signal is no longer constrained to be in the plane below it, but instead it will have to go around the edges of the split. This is a disaster for signal integrity and for EMI.

Here is a picture of a trace and its return current for high-speed digital signals:
Return-Current-in-the-MHz1-300x175.png


and here is how the return current has to follow along a split area:
Return-Current-Loop1-300x182.png


as you can see, that's not good!

Don't split your planes.

-a

(PIctures borrowed from here. Do note that the return current for signals in the kHz bands spreads out and isn't completely constrained below the trace, and this is why you really must take care to route your digital signals away.)
 
12afael said:
other point where I´m a bit lost is that the system will have two boards. one with the microcontroller and the codec and other with an I/O expander connected by I2C. both pcbs will be in the same rack so distance is arround 15cm.  I wonder what would be the best way to set the ground on the I/O expander. should I create a digital area on that second board sharing the same ground or should I run a ground connection to the other digital section in the other boards?

When you say, "In the same rack," are you saying that it's something like a 500-series backplane with power (and power return) distributed to both boards through the backplane, or are you providing power to the I/O expander board from the microcontroller board?

What I would do, given the option, is to provide power to the I/O expander board from the micro board. I2C requires only two signals. We (at the day job) have little USB-to-UART boxes (an SiLabs CP2102) and on the UART side we have 3' cables with +5V, RX, TX and ground that plug into a target device.

I2C is about the same speed as a UART, so connecting from your micro board to the I/O board with a 15 cm cable should be fine.  The +5V and ground taken from the micro board power the I/O board.
 
Andy Peters said:
What happens when you have more than one converter on the board (like above)? Which one do you choose to be your ground-connection location?
I have not done anything near as advanced as what you're talking about but I think that all that would matter in this case would be that all grounds connect at the same point.

Andy Peters said:
What happens when you have digitally-controlled analog switches and muxes, or you use a device like a PGA2320? Or you have a DAC controlling a VCA? Or ADCs feeding a microcontroller for a metering or AGC application?
All of the A/D chips that I have ever looked at that I can recall have A pins and D pins grouped together so that they can straddle different ground planes.

Andy Peters said:
Basically, the idea of the split plane is very old, doesn't take into account the last 25 years of research in this area, and is not useful for any design with more than one mixed-signal device.

Data sheets for recent devices all recommend one ground plane with no splits (I just checked some recent TI, AKM and Cirrus parts). That's what Henry Ott recommends, too, see here. Instead of splitting planes, you logically partition the board into analog areas and digital areas. Keep the analog signals out of the digital area, and the converse.
I'm not sure I fully understand this. Where is this one ground plane connected to the power supply? Or does each board have it's own power supply cable and this multiple ground wired running to the same board (one for each region)?

If the later is the case, then I can understand how it could work since currents from a digital region would follow the path of least resistance which would be it's own supply cable. It's not crystal clear why it would be better though. Maybe connecting all regions just helps minimize any DC differences (but in theory if there are no connections between those regions it should not matter).

Also, off the top of my head I cannot think of a reason why digital traces would be traversing into an analog region or visa versa which seems to be important to the single plane technique.

Also, I find it difficult to accept that this would actually be better in all cases. For example, an LED driver can generate very fast and large changes in current. I would be very weary about connecting this to any analog ground plane.

Andy Peters said:
Don't split your planes.
I use separate ground planes and separate boards with separate ground planes for digital and analog and separate ground wires in the same power cable for my external power supply and it works well enough. In fact, I use 3 separate grounds (digitial, analog and then really quiet analog). I put some digital stuff into a regular analog channel strip and I can barely measure the digital noise.

For something that is mostly digital but with little regions of analog for I/O then maybe that's where the signal ground plane divided up into regions would be superior.
 
Perhaps split plane is the wrong terminology. Partition is a better term and what I think of when I have seen modern datasheets and layouts.

But then what exactly is a split plane? The picture Andy showed just looks like a poorly partitioned plane to me.

I think it also depends on the application and the best advice is JRs "follow the current". In mixed signal RF it is common to have distinct ground planes on different layers of the PCB,
 
I found this other article from Henry Ott. I think is a bit more easy to understand.

http://www.hottconsultants.com/pdf_files/june2001pcd_mixedsignal.pdf

split ground produce big ground loop and it act like a dipole antenna.

I was using a ground for power supply(noisy analog) and one for analog (signal) I will have to re think it.

I think I will connect the ground near the power supply between both sections. that will reduce the interaction of the analog and digital currents.

It is not a 500 format is more like front panel pcb and back panel pcb.  I will try to feed the I/0 expander from the micro board.

Andy: have you seen any book that could be good to read about this?
 
12afael said:
have you seen any book that could be good to read about this?

The Ott book on my bookshelf is c.1976 so not much modern mixed signal.

I will expand my "follow the current"  advice to follow the entire current path (out and back).  Further a consideration unique to digital is that high edge rates driving capacitive loading can cause nasty HF current spikes. Layout gets pretty important around switching power supplies to keep the current loops physically small.

You can go a little crazy trying to optimize every single current in a given design, but the first cut prototype will generally reveal what you didn't pay enough attention to.  :eek:

The modern multi-layer PCBs are a luxury we didn't always enjoy... the vast majority of my designs were single sided (including single sided SMT on one side with through hole on the other). Nowadays it's academic since PC fab rarely even support single sided design (they'll just etch off the unused side). 

JR
 
john12ax7 said:
Perhaps split plane is the wrong terminology. Partition is a better term and what I think of when I have seen modern datasheets and layouts.

But then what exactly is a split plane? The picture Andy showed just looks like a poorly partitioned plane to me.

A split plane is one where there is a physical cut in the copper.

Isolated planes are where you have two copper pours which have no DC connection at all. They are obviously split, too.

I think it also depends on the application and the best advice is JRs "follow the current". In mixed signal RF it is common to have distinct ground planes on different layers of the PCB,

"Follow the current" is my advice. And remember: ALL digital signals are RF. Your 24.576 MHz oscillator? That's RF at baseband, and if you want that to be a square wave you have harmonics well above. Even 44.1 kHz word clock, if it is to be square, has fast edges and RF-level harmonics.

-a
 
squarewave said:
I have not done anything near as advanced as what you're talking about but I think that all that would matter in this case would be that all grounds connect at the same point.

They have to connect in both a DC sense and an AC sense.

All of the A/D chips that I have ever looked at that I can recall have A pins and D pins grouped together so that they can straddle different ground planes.

No. That's the ancient thinking. They all get tied to the same ground.

[quote author=squarewave][quote author=me]Data sheets for recent devices all recommend one ground plane with no splits (I just checked some recent TI, AKM and Cirrus parts). That's what Henry Ott recommends, too, see here. Instead of splitting planes, you logically partition the board into analog areas and digital areas. Keep the analog signals out of the digital area, and the converse.[/quote]
I'm not sure I fully understand this. Where is this one ground plane connected to the power supply? Or does each board have it's own power supply cable and this multiple ground wired running to the same board (one for each region)?[/quote]

Let's simplify -- we are talking about one board with both digital and analog stuff on it, and one or more mixed-signal devices (converters) bridging the two domains.

The ground plane is connected to the power supply at the power-supply entrance. Perhaps that's a connector with your +/-15 V, +5 V, +3.3 V supplies (and a return for each).  The returns for all of the supplies are all connected to the ground plane at that entrance.

If the later is the case, then I can understand how it could work since currents from a digital region would follow the path of least resistance which would be it's own supply cable. It's not crystal clear why it would be better though. Maybe connecting all regions just helps minimize any DC differences (but in theory if there are no connections between those regions it should not matter).

This situation seems to have two boards, an analog board and a digital board, and you are sending digital signals to a DAC on the analog board. In this case, both boards have a power-supply entrance, and by that I mean each voltage and their returns. So say analog board has +/- 15 V for op-amps, +5 V for converter analog and +3.3 V for the converter digital, and the digital board has just +3.3 V and its return. Both boards connect to a common power-supply module. At that the power supply, the grounds are all tied together.

You have a cable with some digital signals going between the two boards. That cable has the signals and their returns. Yes, those returns are "ground." And yes, if you buzz out between the analog and digital boards, "ground" is the same in terms of DC continuity. BUT -- and this is the crux of the biscuit -- for proper signal integrity you must provide a return for the signals in your cable. That's because the physics says that the return current for those signals will be in the ground wire in that cable, and that's in an AC sense. If you do not provide that signal return in your cable, the return current has to works its way from the analog board, through the power supply cable to the power supply module, and then back to the digital board through another cable. That destroys the signal. (I've done these tests and I've seen it on an oscilloscope.)

Is that a ground loop? Strictly speaking, yes. Does it screw everything up? No, not at all.

Also, off the top of my head I cannot think of a reason why digital traces would be traversing into an analog region or visa versa which seems to be important to the single plane technique.

If your layout is correct, they won't. But in many cases, you are stuck. I used the example of putting analog mux chips to choose a signal path. You have to route your digital signals to the mux chips' control inputs, and if you look at the pin-out of most of those chips, you see you can't avoid crossing.

Also, I find it difficult to accept that this would actually be better in all cases. For example, an LED driver can generate very fast and large changes in current. I would be very weary about connecting this to any analog ground plane.

In those cases, you do have to manage the returns -- although I think that in that case, your LEDs are on a front-panel board which is already physically isolated from your analog stuff. And if you're controlling motors, you might even have to optoisolate the control signals from the driver.

It's common to use relays to control analog signal paths. Relays have a nasty inductive kick when they change state. The way to manage that is to run thick traces to the relay coil lines and not just connect it to a plane.

I use separate ground planes and separate boards with separate ground planes for digital and analog and separate ground wires in the same power cable for my external power supply and it works well enough. In fact, I use 3 separate grounds (digitial, analog and then really quiet analog). I put some digital stuff into a regular analog channel strip and I can barely measure the digital noise.

You have an "analog board" and a "digital board," and that's how you partition your domains. I don't know how the two boards are connected other than at the power supply. What signals go between them?

For something that is mostly digital but with little regions of analog for I/O then maybe that's where the signal ground plane divided up into regions would be superior.

It's superior in all cases where you have analog and digital stuff on the same board and the two domains talk to each other.

If the analog and digital stuff on that board have no connections between them, then having separate power and ground planes is fine.
 
12afael said:
I found this other article from Henry Ott. I think is a bit more easy to understand.

http://www.hottconsultants.com/pdf_files/june2001pcd_mixedsignal.pdf

That's a good one.

I think I will connect the ground near the power supply between both sections. that will reduce the interaction of the analog and digital currents.

It is not a 500 format is more like front panel pcb and back panel pcb.  I will try to feed the I/0 expander from the micro board.

I don't understand what is on the micro board. Can you describe it more?

Andy: have you seen any book that could be good to read about this?

Unfortunately, there are no books that are specific to digital audio out there, but Ott's "Noise Reduction Techniques In Electronic Systems" expands on the article you posted, and remains canonical. For shit that will turn you white, there is always Johnson and Graham's "High Speed Digital Design, A Handbook Of Black Magic" that really gets into the physics. This is the book that hammered home the reality that it's the rise time of a digital signal that matters, not its toggle frequency.
 
This is the book I've been working through in preparation for a small mixed signal project - http://www.cherryclough.com/EMC-for-Printed-Circuit-Boards

It was recommended by a friend who followed it religiously for a very complex and very high performance mixed signal audio product.  There are also some good free resources on the site if you dig around.

I ordered directly and it was expensive but worth it.

 
ruairioflaherty said:
This is the book I've been working through in preparation for a small mixed signal project - http://www.cherryclough.com/EMC-for-Printed-Circuit-Boards

It was recommended by a friend who followed it religiously for a very complex and very high performance mixed signal audio product.  There are also some good free resources on the site if you dig around.

I ordered directly and it was expensive but worth it.

I was going to chip in on this topic but Andy Peters (not the UK TV presenter) seems to have it covered and with the Henry Ott references too.
The link above is very good too.
Keith Armstrong and Tim Williams have written extensively on related subjects.

I'd just add that using a 4 (or more ) layer board with essentially a dedicated ground plane significantly changes what is possible with a pcb layout compred to 2 layer construction.
Much of this comes down to the fact that 'ground' at one place may not be the same as 'ground' somewhere else on the board.
Planes can reduce the impedance significantly. Ground current can flow but if the impedance is low then the resulting unwanted signal (voltage) is correspondingly low too.
Also, a mention that good decoupling capacitance practice is essential for high speed digital.
 
Quote

    I think I will connect the ground near the power supply between both sections. that will reduce the interaction of the analog and digital currents.

    It is not a 500 format is more like front panel pcb and back panel pcb.  I will try to feed the I/0 expander from the micro board.


I don't understand what is on the micro board. Can you describe it more?

it is a guitar amplifier. I have a front pcb for all the preamp and controls. And a back board with a codec and a microcontroller/dsp + send return signals. I want to run some impulse responses on the microcontroler and also use it to control the channels through the footswitch.  As the microcontroller will be in the back board (because board to board cable limitations.) I will use a I/O expander in the front pcb for change channels and light leds. 

For size limitations I´m finding very difficult to follow all the "good rules" I think I will have to do a prototype and try to solve the problems from that.

Thanks for the book/articles recommendations.

best regards
Rafael
 
Andy,

Sadly, there's no "like" button for your post.

I agree completely - one ground, with well thought out ground return patterns.

For things like control protocols, you can do some smart things like switch off those buses when not used, as well as play with the communication frequencies. i.e. for SPI, if you don't have a response time requirement, slow it down to a crawl. Or, speed it up and out of the audio band. There's multiple tricks you can play.

Most of your circuit is low current. Microcontrollers and Codec's take bugger all current. I'd be more worried about flickering LED's in a VU meter causing ground noise than anything else, or maybe your Class D amp slamming the rails back and forth.

 
12afael said:
it is a guitar amplifier. I have a front pcb for all the preamp and controls. And a back board with a codec and a microcontroller/dsp + send return signals. I want to run some impulse responses on the microcontroler and also use it to control the channels through the footswitch.  As the microcontroller will be in the back board (because board to board cable limitations.) I will use a I/O expander in the front pcb for change channels and light leds. 

For size limitations I´m finding very difficult to follow all the "good rules" I think I will have to do a prototype and try to solve the problems from that.

Thanks for the book/articles recommendations.

best regards
Rafael

You might want to look at Optical / Capacative / Magnetic  isolation of 'digital' signal and power ?
 

Latest posts

Back
Top