I'm currently designing my own 60% per-key RGB mechanical keyboard. (60% means the keyboard only contains 60% of the keys of a regular keyboard.)

I've laid out the components, routed the switch scan matrix. I could theoretically finish the board with only two layers, but I know it's going to be a mess of vias and I've just started laying out the R, G, B traces.

The board is USB-C and designed around an ATMEGA32u4 and an IS31FL3733 led driver. The switches I'm using are cherry-MX styled, with RGB THT LEDs on each switch.

Do I really need to switch to four layers? The board is 287mm * 100mm and I can't make it bigger. It's not going to be a production board, just a hobbyist project (I say this for EMI).

And what do you think the best layer stackup would be? I've done plenty of two layers boards but never a four layers one.

Here's a picture of my PCB just to get an idea :

  • 2
    \$\begingroup\$ For me, when working on low qtys of boards, its when the extra cost of 4 layers is smaller than the time/effort it would take to lay the board out in 2 layers. (which is basically always). For low volume, its so much easier to layout in 4 layers that except in the most basic cases I always use 4 layers. \$\endgroup\$
    – Wesley Lee
    Aug 12, 2021 at 12:32
  • 1
    \$\begingroup\$ Your USB d+ and d- follow a long and windy path with lots of vias, I'd try and optimise that a bit. \$\endgroup\$
    – Colin
    Aug 12, 2021 at 12:41
  • 3
    \$\begingroup\$ The USB traces may be an issue. They need to be routed as a differential pair with a characteristic impedance. It may not be possible to achieve it with two layers if the distance to ground plane is too much which depends on PCB thickness. But you can move the MCU next to the connector so the impedance mismatch is not too long. \$\endgroup\$
    – Justme
    Aug 12, 2021 at 13:14
  • 2
    \$\begingroup\$ Also note that if a screw head contacts the PCB at any of those through-hole areas, a nylon washer (or screw) will be needed. Metal screws tend to scrape off solder mask and short/damage traces. \$\endgroup\$
    – rdtsc
    Aug 12, 2021 at 13:21
  • 1
    \$\begingroup\$ If possible, but the keyboard in usb1 low speed mode so that you don't need to worry about routing ~GHz frequency USB2 lines on a 2 layer board. \$\endgroup\$ Aug 12, 2021 at 14:53

2 Answers 2


Generally you switch to 4 layers or more for EMC reasons. Most importantly when you want a big ground plane rather than individual traces, which is almost always the case when it comes to non-trivial PCBs.

Some of the more layout-sensitive circuits like switch regulators might also require several layers in order to keep traces short etc.

Another reason is when cadding fine pitch components with lots of connections and you simply can't route all traces in a sensible manner. In your case you've got a QFP44, but don't use all pins. In case you do, you might find it needlessly complicated to draw all 44 traces with just 2 layers available.

Regarding stack-up, it's a bit subjective. See this: The best stack-up possible with a four-layer PCB?


Do I really need to switch to four layers?

I don't see why you would have to. You don't seem to have a reason, either. So the answer is no.

The one thing I'd recommend is not making half the USB trace switch planes, but always keep the pair on the same layer.


Your Answer

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

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