My boring first PCB, what do you think? - Page 1
Forum section: electronics / projects

author: AnasMalas
author_rank: Regular Contributor
timestamp: December 28, 2021, 09:58:59 pm
content: Hello!Im unsure at what point to stop calling myself a beginner (feels like never), but after tons of work, i've completed my first PCB ever (YAY)! Would you please take a quick look and let me know if anything jumps out to you? I dont expect a comprehensive review or anything, ive stared at this project for so long that I might be missing something obvious. This PCB takes commands from a raspberry pi and does some functions like operating a solenoid, driving addressable LEDs, etc.Attached are photos of all 4 layers, the schematics. An error prevented me from attaching the kicad file, so here is a link:https://1drv.ms/u/s!AkWX-lk5t5U8kudpRYyJFfNO7H5TOQ?e=ljfaYHThanks!

author: amosborne
author_rank: Contributor
timestamp: December 28, 2021, 10:52:34 pm
content: I took a brief look at the schematic. It’s hard to understand exactly what this circuit is doing without knowing more about the specs of what it is intended to interface with, and what the operating principles are.A few things caught my eye:1. What’s the motivation for all the ESD protection diodes? My gut feeling is that ESD protection on things like the “door switch” interface is total overkill.2. It looks like the solenoid is a low-side FET PWM control. Are you using a TVS diode on the low side to sink the back EMF? I’d put an anti parallel diode across the solenoid instead.3. It looks like you are filtering the tachometer signal to get an analog signal. Are those corner frequencies right? The 318Hz filter (per the note) is not a 318Hz filter. I would also consider reducing R and increasing C, 5nF is kind of small in my opinion. I’d aim for 100nF.4. I have no idea what is happening in the RGB strip interface circuit, but I’d like to understand why a 41MHz filter is necessary. As drawn I’m skeptical you’ll get the performance you desire… 41MHz requires you to start thinking about parasitics in both the components and the PCB layout.5. I’m not grasping your note about the crystal oscillator ground. There will be common mode current injected from the crystal into the controller. If you do not provide a low inductance return path, it will find one on its own (and emit some radiation for the trouble).

author: AnasMalas
author_rank: Regular Contributor
timestamp: December 29, 2021, 09:46:46 am
content: Thanks for the reply! I would like to eventually opensource this as part of a larger project, so im ready to give full information. But realistically, who'd read a really long paragraph?Quote from: amosborne on December 28, 2021, 10:52:34 pmThis is a one-off board to be handed to a university with people probably way too busy to be able to diagnose an ESD fault when someone eventually opens the case and touches something. It is supposed to last 4-6 years as a minimum, so throwing $10 of ESD protection is a worthy investment.QuoteThats the product of a very long thread with the wonderful T3sl4co1l. The TVS diode will be as good or better than a flyback diode because a flyback diode only concerns itself with the inductor, not the stray inductances of wires and traces.QuoteGood catch! You are right. That note is indeed inaccurate, it is left over from a previous revision. The filtering done throughout this PCB is because there are multiple 2W 860 MHz RFID antennas close by, and I don't trust ill shield it all properly. All lines that go to long wires are filtered to a frequency that shouldnt cause interference but otherwise maintaining the original signal. Previously, I was trying to just get the signal and was told that this is excessive (this is a 100 Hz signal).QuoteIt really isnt. The resistor is needed either way to protect the microcontroller from a short circuit, and I do not want to get into ferrite beads for my first PCB (this thing has been in the making for ages now, oh and the signaling includes a 300 ns pulse)... I consider that 8.2 puff cap to be a good luck charmQuoteWell, the lowest inductance path to the ground plane is a large via, so I hope that is enough? The microcontroller has a GND pin right next to the XTAL pins, what that notes says is that the GND used for the crystal casing and the load capacitors should connect to that pin, and no other signal goes into that GND via. As you see in the screenshot, the GND pin adjacent to XTAL has only the crystal and its capacitors on it, not even the decoupling capacitors.Thanks for the reply, ill ammend the filter notes now

author: amosborne
author_rank: Contributor
timestamp: December 29, 2021, 01:47:35 pm
content: Yea, I guess I just am not grasping what you meant by that note on the crystal, but the layout of the crystal itself looks OK.Just from the layout screenshot you attached, you might revise the power connection to the microcontroller. Generally you want:1. Decoupling capacitors to be placed between the pins and the vias. Right now you have the vias between the pins and the decaps.2. Same number of vias on power and ground pin entries. Right now you two 5V via and one ground via.See if you can flip the decaps around and place them straight across the pins- this would be optimal. That’s not to say it would work as is, however.Honestly you might want to add a bunch of 0ohm jumper resistors at power inputs and external interface points. Think about how you’ll bring this board up and test it. If you’ve been working on this a long time you might as well just build it… expect debugging and fixes!

author: Terry Bites
author_rank: Super Contributor
timestamp: December 29, 2021, 04:16:13 pm
content: The problem your struggling with is never in the FM!