Questions regarding "best practises" before routing my PCB - Page 1
Forum section: electronics / general

author: sweetpotato
author_rank: Newbie
timestamp: August 17, 2025, 07:53:18 am
content: See attachment for schematics + board layout!Hi,Working on this PCB, I have been routing PCBs in the past but NEVER known the best practices. So, in this board, I am trying to improve on this aspect. The layout (the placement) of the LEDs and buttons can't really be changed, and I want a portable "pocket-size" PCB. This is the smallest layout I could come up with, I am happy with how it looks.Purpose: no product that'll hit market, hobbyist project (but still trying to follow best practices as much as sensible).Before starting to route, I had a few concerns, especially as I am trying to improve on the “best practises” aspect:1. I have an ADC connection between one of the switches and the microcontroller. This is perhaps the part of the board that I'm most concerned about regarding noise issues. In the placement that I've come up with, the distance between the ADC pin on the microcontroller and the switches is comparatively long. You can see the image:where I have shown the pins that need to connect together. How bad is this placement? (Testing with a breadboard and lots of wires running all across the place, I haven't come across any issues)2. The USB-C power in connects to the ON/OFF switch - see the schematic. I placed these two components quite far away from each other, because having them too close would make flicking the switch fiddly with the USB-C cable plugged in. It's also for the sake of looks, so the right side of the board isn't so empty;) I know the distance can have an impact on any noise. How mad do you become when you see this placement? (I'll learn about power planes and use them for this board)3. Generally, regarding the clearance around components: Have I placed components too close to each other?Other notes: silkscreen is unfinished, and for those good with details: J1 and PWR_LED from schematics are not present on the board as I will remove them before manufacturing.

author: Kean
author_rank: Unknown
timestamp: August 17, 2025, 09:53:39 am
content: For the ADC input, it isn't the length that matters but what signals it passes that might couple into it. In general, this is easily improved by adding a capacitor to the analog signal to filter noise - assuming you don't need to detect really fast changes. Edit: Oh, I just checked the schematic and you do have a cap C2 on the analog input so noise isn't likely to be a big issue - but you will need to allow for some as the ADC valure will vary a bit within a range for each button press or combination of button presses.For the USB-C power input, I would suggest moving the parts behind that a bit further away to allow getting a soldering iron in there as those pins are very likely going to bridge if you don't have experience with (and plan to use) solder paste stencils and reflow oven. Unlike the ADC, the power connection will be low impedance so the distance is unlikely to be an issue - it is much less than the length of any USB cable will be. Just make the power tracks a bit thicker, and use a plane for at least GND. In fact, consider making all the tracks thicker than you might have originally planned as I see lots of people using 0.15mm or something ridiculous for everything on their first designs.Apart for the USB connector, I don't see anything obvious in terms of having too little clearance - but you will need to assemble and inspect in a certain order. All SMD parts first, and then THT. You possibly won't be able to rework some of those SMD parts next to U1 after it is soldered in place.Actually, do I see some SMD resistors on each side of the USB-C connector? They are not shown on the placement diagram. If so, those are very likely too close! Edit: in the schematic I guess these are R14, R15, and R16. Why do you have a 1M resistor from USB shield to GND? I would leave it open, or use a low value capacitor - I tend to use 22pF which can help with ESD in some circumstances.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 18, 2025, 04:55:43 pm
content: Quote from: sweetpotato on August 17, 2025, 07:53:18 amYou can be interested in articles I have linked here:https://forum.kicad.info/t/decoupling-capacitor-via-placement/25132/14https://forum.kicad.info/t/decoupling-capacitor-via-placement/25132/19

author: sweetpotato
author_rank: Newbie
timestamp: August 25, 2025, 06:47:16 pm
content: Hi!First of all, thank you very much for your feedback. Also the links from @PGPG is the resource I've been looking for all summer. Thanks!Some questions:Quote from: Kean on August 17, 2025, 09:53:39 amWith the "parts behind that", are you referring to the trimpot with the label "VOLUME" underneath of it?Quote from: Kean on August 17, 2025, 09:53:39 amAh yes, we have SMD resistors around. I was concerned placing them too far away from the USB-C connector would be less beneficial in terms of noise, that's why I placed them quite close. I guess that's not really a valid concern?Quote from: Kean on August 17, 2025, 09:53:39 amThe use of a resistor to SHIELD was something I read about here:https://electronics.stackexchange.com/questions/4515/how-to-connect-usb-connector-shieldPeople are talking about it here as well:https://www.reddit.com/r/PrintedCircuitBoard/comments/gi6ele/correct_implementation_of_usb_typec_for_usb_20/