Connect with us

PCB Layout Help

Discussion in 'PCB Layout, Design and Manufacture' started by Rendman, Jul 12, 2014.

Scroll to continue with content
  1. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Hello,

    I am designing a board with an ATSAMD20 microcontroller and the ENC28J60 Ethernet PHY with some additional things. The issue that I have is the 25MHz crystal oscillator will not start up. When I probe around the crystal I see a very noisy 52KHz sine wave. Is it possible the SMPS on this board is introducing to much noise and is preventing the crystal oscillator from starting? I have attached gerber files of the board. Any help would be very much appreciated, even general feedback about layout of the board or anything.

    Thank you.

    JD
     

    Attached Files:

  2. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    Hi JD and welcome to electronicspoint!

    We can have a look at your PCB layout but better to start with the schematic. Can you please post it ?
    Also the ENC28J60 as a clockout pin where you can measure the 25Mhz clock divided by 4 (default value).

    Olivier
     
  3. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Hi Olive,

    Thanks for the reply. I have attached the schematic as a PDF. I appreciate the help.

    JD
     

    Attached Files:

  4. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    Yeah also post a picture of your layout both sides, a good screen grab will be ok.
    Adam
     
  5. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    The ATSAMD20 as a quite complex clock circuitry, do you succeed to make it work on is internal 8Mhz oscillator first?
    Also you are using the clock
    generator to produce 25MHz to the enc28j60, is the clock generator able to divide by 1? I have seen a minimum of 8 but just have a quick look on the datasheet.

    Olivier
     
    Last edited: Jul 12, 2014
  6. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Hi Olive,

    The ATSAMD20 does run fine on the internal 8MHz oscillator. I don't know if [pretty sure I can't] use the DFLL to generate the 25MHz ethernet clock. That said I was planning on clocking the entire system at 25MHz and using the generic clock 0 output pin to clock the ENC28J60. The ATSAMD20 can output the generator clock on certain pins if enabled. According to what I've seen and read the clock dividers can be set to divide by one. The real issue is that when I scope the crystal output I don't see a 25MHz signal at all. I can see alot of noise of about 80-100mV with spikes that correspond to a 52kHz frequency. I'm concerned that the power supply (LM2575) is introducing too much noise in the system and is preventing the oscillator from starting correctly. I'm a self taught electronics guy and, sadly, my understanding of EMI and PCB construction is lacking. Is there anything that stands out to you about my design? I can attach the KiCAD PCB file if you want it.

    Thanks so much for your help.
     
  7. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Hi Arouse,

    Please see attached board plots. Thanks for your assistance!

    JD
     

    Attached Files:

  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    What is the manufacturer and the complete part number for the 25 MHz crystal you're using?

    Have you tried another crystal? Either the same manufacturer and part number, or different? Or are you still using the first crystal you've tried? Have you tried more than one board?

    Are you putting your scope on the signal at the crystal? Have you tried scoping the divided-down output?
     
  9. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Hi Kris,

    I have tried two crystals. First one: Abracon ABLS-25.000MHZ-B4-F-T, the second: ECS ECS-250-18-5PX-F-TR. I have not built up another board yet, as I don't have all the parts on hand to do so at the moment. I am scoping the generic clock output from the microcontoller and I have probed the crystal input on the micro as well. I did experimentally try probing the crystal directly, and still saw no oscillation at all.

    Thanks!
     
  10. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    To me the problem is more located on the ATSAMD20 system clock configuration.
    Have looking at you gerbers and the layout looks OK. The 52Khz from you regulator should not be the root cause to me.
    You can have two issue:
    Correctly set up the ATSAMD20 for an external crystal
    Correctly set up the clock system to generate the 25MHz on the dedicated I/O

    Better to be focused on the first issue, however knowing that the internal oscillator works fine you can try to generate a 8MHz or lower clock based on that oscillator to ensure that this code part is correct. It's better to probe the signal at the divided-down output, as suggested by Chris, probing the crystal pins can give unexpected results.

    Olivier
     
  11. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    Is the 25MHz crystal usage even possible? The Atmel ATSAMD20-XPRO board is using a 32KHz (RTC) crtystal on the concerned pins.
    Olivier

    EDIT: OK misreading on my side you are using the XOSC pins, not the XOSC32K ones, that's OK.
     
    Last edited: Jul 13, 2014
  12. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Hi everyone,

    I'm pretty sure that the software is correct to enable and use the 25MHz crystal. I can see the 8MHz signal with my scope on the generic clock output pin when I run on the internal oscillator. It may have been possible when I was scoping the crystal input pins that I briefly connected XIN and XOUT through the scope probe. Would it be possible that I damaged the crystal driver circuitry in the SAMD20 this way?

    Thanks,
    JD
     
  13. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    I think your right about the noise from the switcher. Your crystal layout has some issues. Noise could be quite easily coupled onto these lines, they run very close to the ground plane which could have switching noise on it. Also the top crystal track runs very close to a track from U3 which is the power supply. This could couple noise from the switching of this device. Here is a better layout. You sometime need a guard ring around crystals when using double sided PCBs, I never use them because my PCBs have internal power planes.
    Adam

    New Picture (3).png
     
  14. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    JD, To find out if the 52KHz is the root cause can you supply the board with a linear (lab) 3V3 supply or a fresh pair of AA batteries ?
    Olivier
     
    KrisBlueNZ likes this.
  15. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Yes I will try that. I need to build up a new board, and I will not populate the power supply parts. I'll post back once I get the parts in.

    Thanks!
     
  16. Rendman

    Rendman

    10
    0
    Jul 12, 2014
    Arouse,

    Thanks for the example layout! It's very helpful. I have a question, just for my own edification. Assuming that there is approx. a 100mV 52KHz signal being coupled into the oscillator trace that runs by that supply trace, how likely is it that the noise is preventing the oscillator from starting?
     
  17. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    JD, for a test you can just cut the +3V3 track and solder a wire on C3
     
  18. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    Very likely.
    Thanks Adam
     
  19. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    It's going to depend on the higher-frequency components in the 52 kHz signal. A 52 kHz sinewave will have no effect, but a 52 kHz square wave with rise times in the nanosecond range certainly could have an effect. But Olivier's suggestion is the right answer - eliminate the switching noise and see whether it works.
     
  20. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    Yes spot on Kris. Fast rising edges can cause allsorts of EMI problems.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-