6
\$\begingroup\$

I'm designing an "Internet of Things" appliance where space and layout are constrained by mechanical and cost requirements. The main processor is a PIC18 and its crystal (probably 8MHz, maybe 16) is mounted close to some things I regard as "scary" from an EMI point of view:

  • (~5mm away) A (2.4GHz) WiFi module (a PCB-with-shielded-can-on-top style module which solders onto the main board - the "business end" is to the top left of the module so as far away from the µC and xtal as it can be).
  • (~10mm away) A small DC gearmotor (mounted a few mm above the board on a metal 'L' bracket which is grounded to the PCB).
  • (~15mm away) A3906 motor driver IC and associated power components.

I've looked over a few other "how's my crystal routing?" posts here and it seems like mine is probably OK (though I'd really welcome any criticism) but I am a bit worried about the nearby noise sources, especially as this is a solar + battery powered device that will be minimising power consumption as much as possible including minimising the power drawn by the oscillator.

I have given the crystal section its own ground planes and connected these to the bottom main ground plane at one of the PIC's VSS pins, so there will be return current on this pin but presumably not via any of the oscillator circuit.

  • OSC1 goes µC<>cap<>xtal and OSC2 goes µC<>xtal<>cap - is this OK?
  • Is the local ground plane around the xtal area going appreciably to increase the power draw of the oscillator?
  • Is the way I've connected the system & crystal grounds together sensible?
  • The top & bottom ground planes for the crystal are tied together with 3 vias but there is a return path that doesn't go through any of them. Is this "right"?
  • Are any of the above noise sources likely to be an issue and if so how might I mitigate this? (the rest of the PCB is full up, so "move it further away" isn't really an option)

2 layer board. Top red, bottom blue, white area around crystal & caps is a cutout from ground pours on top and bottom, returning via the via (ha) next to one of the two VSS pins on the PIC18 (other one is on the other side of the chip). White hatched is the top soldermask stop (motor bracket grounded to topside ground pour this way). 8 mil traces & .5mm via drills.

Below the crystal you can see the motor mounting bracket (red) and motor outline (cyan). Motor driver in extreme bottom right. BR corner of WiFi module to top/left.

Edit 0:

ver1

Edit 1: Improved grounding around signal traces in bottom right area below motor. ver2

\$\endgroup\$
1
  • 1
    \$\begingroup\$ You should consider adding a bit of text describing what has changed in the new layout. \$\endgroup\$ Apr 7, 2014 at 6:24

1 Answer 1

1
\$\begingroup\$

Your general crystal layout looks pretty good. I've seen plenty of examples that were 10 to a 100 times worse than what you show here!

Have you considered the possibility of using an MCU that has its own onboard oscillator thus eliminating the need for concerns about an external crystal?

Is there any possibility that you can share some other frequency source to drive the MCU such that the source generator is away from the motor and WiFi module?

What is the dead ended trace as highlighted here in yellow area? Is that an intentional trace to shield the two adjacent traces from each other? If it is GND shield trace would it be in need of a via a several spots to tie it into the GND plane?

enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ Thanks MK, glad it's not too bad! Was originally going to use the on board osc on this PIC but decided it wasn't worth the risk of having problems with fast-ish UART comms with the WiFi module (it has an external RS485 bus too keep track of as well but this will be slower). Unfortunately this is the only (accessible) clock source on the board - if I took the xtal off then the internal osc on the PIC would be "it". It's basically all power/line drivers, the PIC and the wifi and nothing else. That "dead end" trace is ground but thanks for pointing it out as looks like it could do with a via! \$\endgroup\$
    – wtds
    Apr 6, 2014 at 19:10
  • 1
    \$\begingroup\$ You could move some of the other vias around a little bit in the yellow area and then extend that dead ended thing over to the GND on the same layer. Doing that you would also want to get more GND fill in areas where it did not flow in completely....for example see the via just to the left of the yellow spot. \$\endgroup\$ Apr 6, 2014 at 23:09
  • \$\begingroup\$ I've spaced things out a bit and the grounding around the signal traces below the motor is now much better (new image above). \$\endgroup\$
    – wtds
    Apr 7, 2014 at 6:06
  • \$\begingroup\$ Yeah. That is better! It is almost always advantageous with 2 layer boards, where you try to flood fill one as a GND plane, to use traces + vias or small pour areas = vias on the opposite side to close gaps or bridge gaps in the GND plane. \$\endgroup\$ Apr 7, 2014 at 14:26
  • \$\begingroup\$ Ah thanks, I've always wondered whether it was really worth bothering with or whether I was just adding unnecessary drill holes having tiny little scraps of ground plane around the place. \$\endgroup\$
    – wtds
    Apr 8, 2014 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.