Best Practice for Trace Layout?

So I have been working on this PCB design, and was looking at how the switches are connected to the diodes and something about all of the traces on the left side of the board just doesn’t sit right with me, is there any reason why I shouldn’t stack traces next to each other as I have done for this type of keyboard application? Any ideas to make the trace routing more robust?

Also if anything looks wrong with my design please let me know, I am planning on having this made soon and want to make sure it will work! Thank you!

Overall, the layout looks good. Despite that i have a few notes to make, please keep in mind that this isn’t a complete list since i didn’t check it very well.

Yes and no. Tracks next to each other can crosstalk. This depends on the Vd (how much the voltage changes per time), wave impedance between the 2 tracks, other tracks / copper that can be used as a return path, is there a terminator resistor, …

But since you only use switches, i wouldn’t worry too much. In case you experience crosstalk problems (you press switch 1 and switch 2 triggers also), which is very unlikely, you can just sample the switch 2-3 times before deciding that the switch was pressed.

Do you have a 100nF capacitor placed near every power input of every IC you use?

Why do you go for the RaspberryPiPico rather than a normal µC? Seems a bit overkill/overengineering. Well, depending on what you need to do, but since you have only a bunch of switches and a connector, it doesn’t look like you need a lot from a outside perspective.

In case the baudrate to Board1 is high, you have to make sure the traces are done properly and the right wires are used in the cable.

The connector to Board1 looks a bit harder to get to, depending on how many times you have to connect and disconnect this connector. Are you sure you want the connector there?

How many of them do you plan to make?
I would assume SMD would be a bit easier to assemble, but that depends on the magnitude of the amount of boards (10, 100, 1000, 10000?) and who is assembling them.

The schematic is not a layout. There is no reason you have to but Pin 1 next to Pin 2, … I would suggest you redraw RaspberryPiPico schematic symbol, so that the connections to the Switches are direct. Don’t do the Col1-GPIO16, … table, this is hard to read. Draw the RaspberryPiPico symbol so that you can make direct connections and name still the nets. Mark unused pins with the no-connection flag. Use only a single name per net. It doesn’t matter when the symbols get much bigger and don’t resemble anything of the layout, schematic is for readability.


Thank you very much for the quick response!

The capacitors are for debouncing the rotary encoder, I found similar designs for doing this by browsing online. If having this so close to the power input is a problem then moving it away should fix that?

I am using the Pi Pico as I have a few lying around, and am using this project as my first attempt at making a small macropad before having a go at a full sized keyboard.

The connector for Board one is to go to a small LCD, so once plugged it and mounted on the top plate shouldn’t even be disconnected. Definitely a bit tucked in but I think it’ll be ok.

I went with through-mount for most of the components as I will only be hand soldering about 3-4 board, and with my soldering abilities this is much easier.

Again thank you for taking the time to take a look, I am hoping that with the design I have that it will work once it has been made. I will definitely have to have another go at the schematic, this is my first try at any electronics designing so definitely have a lot to learn!

No no, they are not a problem how they are now. I say, you need (additional) capacitors near every power inputs of every IC, between GND and VCC, 100nF is a typical value. A general rule is, that there can never be too much capacitors for decoupling (this isn’t quite true, but better too much than too little).

Do you have pullups for the I2C bus on the LCD? Otherwise you need to place them in your PCB. Maybe add them to your layout anyway but you don’t need to assemble them when the LCD has some. Better to add a footprint and don’t need it than not having a footprint when you need one. What Baudrate do you plan to use?

For the layout, it should be mostly fine (except the pullups), especially since the RasperryPiPico has its own decoupling capacitors. The schematic does work but i would redraw it to be more readable.
If a capacitance is < 1 µF, i would use nF, reading 10 nF is easier than 0.01 µF.

Maybe you also want to add some additional testpoints, for an easier access for a oscilloscope and digital analyser. Most important for GND, the LCD signals could also be useful, other signal maybe too, depending on the space you have and how sure you are the software will work.

If you have the space, label signals in the layout, on F.Silk or F.Cu, specially at the connectors. It is easier to debug when you can look at the PCB and know which pin has which signal without checking your documentation for every pin. Similar as you did at the RasperryPiPico, but use better signal names, for me Row1 would be clearer than GP12.


Why did you choose this mechanical layout? A distance of 137.85mm an 80.05mm between 2 mounting holes is a bit unusual. Do you have external components or a standard you follow? If not and you create your own mounting hole pattern, i would chose whole numbers, when there are no other downsides.

Of course this has no effect on how the PCB will perform, but such things can make future version, compatible counterparts, … easier when you don’t choose such odd distances.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.