1
\$\begingroup\$

I'm designing a two layer PCB for a keyboard where most of the board space is taken up by the key switches and backlight LEDs. The switches have a traditional switch matrix configuration with diodes and the LEDs are charlieplexed. Thus, none of the current for the switches and LEDs will actually return through ground.

Of course, there is also an ARM MCU with a crystal oscillator, I2C between the MCU and the LED matrix chip. The ARM MCU will be placed wherever it will fit since the board is jam packed with switches and LEDs and this means I will have to run USB traces from that part of the board to the rear where the connector will be.

My initial idea would be to have as many signal traces as possible on the top and a ground fill/plane on the bottom. I would then only take short jumps to the bottom layer where needed in order to keep the ground plane as contiguous as possible. However, since this is a switch and LED matrix, traces crossing each other is inherent to the design. If I could use both layers for the matrix, that would greatly reduce the number of vias needed and simplify routing.

So the question is, is there any downside to limiting the ground plane only to the area around the MCU and LED matrix controller chip? As I said above, none of the return paths for the matrix goes through ground. What would be purpose of ground be in the matrix part?

Also, since USB has to be routed from the MCU to the rear, should I just put a wide "ground strip" under the USB lines? How wide would that be?

Of course... I could also got to a 4 layer board and all of this would be solved but that sounds excessive for a simple keyboard.

\$\endgroup\$
  • \$\begingroup\$ I’d go for a 4 layer board. \$\endgroup\$ – Andy aka Jul 27 at 8:53
  • \$\begingroup\$ @Andyaka Any particular reason? \$\endgroup\$ – Emil Eriksson Jul 27 at 9:41
  • \$\begingroup\$ Justify why four layers would be excessive. \$\endgroup\$ – Andy aka Jul 27 at 10:08
  • \$\begingroup\$ What interference environment must your product accept? a large motor at 0.1 meter, with evil sparks from the motor's commutator? cellphone at 0.1 meter, where all your long PCB traces are antennas for the cellphone transmitter output? \$\endgroup\$ – analogsystemsrf Jul 27 at 10:29
  • \$\begingroup\$ @analogsystemsrf Home environment so evil sparks unlikely, cellphone very likely. \$\endgroup\$ – Emil Eriksson Jul 27 at 11:09
2
\$\begingroup\$

I don't see any need for the ground plane in the matrix area. It could serve some purpose for reducing noise, but likely there is no measurable difference.

A strip under the USB is probably the best you can do in your case. Make it at least one trace width wider than the diff pair, the wider the better.

Going for 4 layers would be the best choice, but if you need to save those pennies, you can make it work with 2 layers.

\$\endgroup\$
  • \$\begingroup\$ With the prices of 4 layer boards these days, I'm tempted to just go with that since it's something I've never done before, coule be insteresting. \$\endgroup\$ – Emil Eriksson Jul 27 at 9:33
  • \$\begingroup\$ Yeah, 4 layers is so cheap that you need really high volumes to justify 2 layers. \$\endgroup\$ – TemeV Jul 27 at 12:07
0
\$\begingroup\$

Really cheap electronics use a 1 layer board and wire jumpers on the top side. Sometimes such boards will also use conductive ink for things like button contacts. Think: remote controls, toys, power supplies, and yes, keyboards.

You could break up the design into the big board as 1-layer, and a small 4-layer one for the MCU.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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