PCB layout wrt. Analog vs digital signals crossing on different layers.

Discussion in 'The Projects Forum' started by s_mack, Jun 18, 2015.

  1. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    I'm new to this, in that I've never done a project with any analog inputs before. Ideally, I'd just separate the two categories on the board entirely and not worry about it, but I have physical limitations to work with (such as i/o connectors that are out of my control).

    I learn best by example, so here is a section of my board I'm currently concerned with:

    ADdifficulty.jpg
    The pink line is analog supply, the orange is analog ground and the four green lines are analog signals (inputs). Everything else you see there is digital (brown is digital ground... not yet routed/poured and light pink, barely visible at the bottom, is digital supply).

    I've managed to keep A Vs D seperate except for right here. As you can see, there are four digital traces (on the bottom of the board) that cross the 4 analog signal lines (which are on the top). I can't see a way to avoid it (*), but does it matter?

    While I got you here, I'm still confused on grounding. I think what I'm going to do (barring better advice) is pour a ground plane on the bottom later for the digital and leave the analog as thick traces with no pour underneath them. I can do that by keeping VDDA and VSSA to the outside edge of the board. Then tie them together at/near the power source. That seemed the simplest to me anyway, thanks to my lack of understanding on how they interact.

    Btw. I have read a TON on the subject. Sadly, my dyslexic brain just doesn't learn by reading. I've read so many guides with seemingly at-odds advice on grounding that its all just a mess to me still. So go easy on me :)

    (*) Actually I now do see a way to avoid crossing the analog over the digital signal lines, but then those digital signal lines would have to cross the analog VDD/VSS lines. I was attempting to keep those pristine.
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Crossing the analog VDD/VSS lines is less worrisome as long as those lines are well decoupled to analog ground. Any small signal levels that might be introduced into the analog power by the digital signals should be shunted to ground by those decoupling capacitors, typically one large electrolytic along with a 0.1μF ceramic across the power and ground pins of each analog IC.
     
  3. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Thanks. So you're saying I should pull the digital signals around to the left and have them cross under the pink/orange lines rather than as I currently have them crossing under the green lines? That will be quite a bit of fiddly work, so I want to make sure I'm clear on that.

    Also, may I ask why you specifically said "electrolytic"? The μController's datasheet specifies a 4.7μF (with is C9) as well as 0.1μF (C10) but it does NOT indicate electrolytic. I actually had electrolytics on there at first, from experience with different μControllers... but I switched them to ceramic for space/cost reasons. Should it be electrolytic for some reason? Or is that just habit because in the past large value ceramics were more expensive?
     
    Last edited: Jun 18, 2015
  4. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Yes, it's better to run the digital lines under the analog power lines rather than under any analog signal lines.

    I said electrolytic since, in the past, 4.7μF ceramics were considerably more expensive.
    If cost is not an issue then the ceramic would give better performance and likely be more reliable.

    You mentioned microcontroller which, I assume, is part of the digital circuit.
    I was talking about decoupling for the analog power.
     
  5. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    I concur with crutschows suggestion. The power lines are low impedance due to the wide traces and decoupling caps. This make them less sensitive to inductive and capacitive coupling. The analog signal lines are high impedance and are more sensitive to coupling. I would like add, to minimize coupling between crossing traces, have them cross at 90 degrees. Running them parallel is not good.
     
  6. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Thanks, so this should look better:
    ADdifficulty2.jpg
    Ceramics are cheaper, by quite a bit, at smaller package size in this range of F. But it is the size more than the price that matters to me.
    I figured we were talking about the same thing. The 4.7μF I show in there (C9) is parallel with the smaller C10, which is decoupling the VDDA and VSSA pins of the microcontroller, as per its datasheet. These are the only analog digital power/ground lines I have. Are you suggesting I put another 4.7μF in parallel again?
     
  7. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Here is my confusion. :confused:
    You are talking about the microcontroller, which is digital, and I am talking about decoupling of the analog power.
    Are you saying the analog and digital power are the same lines?
     
  8. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    Err... no. The microcontroller has ADC, DAC... (don't they all these days?) it isn't really "digital". The digital side is digital. The analog i/o are analog. Aren't they? I'm sure you know WAY more about this than me, so your confusion is confusing me :)

    Here's the datasheet, if that helps. There will be a quiz, so I expect you to read it all tonight! :) Page 68 is the interesting stuff.

    I read it as VDDA and VSSA are analog separate from VDD and VSS, which are digital.

    Or am I just out to lunch? Say it ain't so.
     
  9. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Okay, so you have analog power and digital power going to the microcontroller.
    The decoupling shown on pg. 68 should be quite adequate.
    Are there any other analog components?
     
  10. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    No. Just 4 analog pots off-board, connected via cable, and going into the micro (green lines)
     
  11. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Then I think you should be okay by keeping the analog signal lines away from any digital lines.
    Of course the return (common) for the analog signal lines should be the analog power common.
     
    s_mack likes this.
  12. s_mack

    Thread Starter Member

    Dec 17, 2011
    187
    5
    You had me doing a double check on that :) I already had it, but I'm glad you mentioned it in case I wasn't on the ball. Thanks for your help.
     
Loading...