[HN Gopher] The Art and Science of PCB Design
       ___________________________________________________________________
        
       The Art and Science of PCB Design
        
       Author : gballan
       Score  : 135 points
       Date   : 2023-12-30 01:59 UTC (21 hours ago)
        
 (HTM) web link (pcb.mit.edu)
 (TXT) w3m dump (pcb.mit.edu)
        
       | mlsu wrote:
       | Wow, what a coincidence! Thank you for posting, this looks like a
       | great resource.
       | 
       | I am (a very novice, no EE background hobbyist) creating my first
       | design right now.
       | 
       | It seems like there are a lot of design rules that are not common
       | knowledge. And in the electronics tinkering "community" there is
       | basically a vertical wall in the learning curve after
       | Arduino/breadboard. I work on embedded software for a living so I
       | understand that side but some of the electrical stuff really
       | doesn't have an easy learning curve.
       | 
       | I am following along with this video:
       | 
       | https://www.youtube.com/watch?v=aVUqaB0IMh4
       | 
       | and having an OK time so far.
       | 
       | If anyone knows of any other resources I would love to know. And,
       | is there a place, maybe a slack or discord, that would review
       | designs? I really want to have someone look at it before it goes
       | out but I have no clue where I would begin searching for someone
       | to ask.
        
         | JKCalhoun wrote:
         | I can look at it. I'm a hobbyist like you but I have been using
         | KiCad and making PCBs for a few years now.
         | 
         | If you want to be anal you can print the PCB from KiCad on a
         | regular laser printer at actual size and "stuff" your paper PCB
         | with the components you intend to install. I've used a push-pin
         | to poke small holes in the paper PCB and then threaded the
         | resistors, etc. into the holes to get a sort of sanity check
         | that the components are going to actually fit with one another.
         | 
         | The latest KiCad has a 3D viewing mode that seems to have a
         | similar benefit. But I had a few components on my latest PCB
         | that KiCad didn't know about so there was no 3D model for those
         | components. (I could probably hunt for these component's 3D
         | models on the web but I am too lazy.)
         | 
         | Otherwise, I see lots of "can you review my PCB?" on
         | r/PrintedCircuitBoard/
         | (https://old.reddit.com/r/PrintedCircuitBoard/).
         | 
         | Here's another YouTube video I've sat through:
         | https://youtu.be/3FGNw28xBr0?si=57iSLz2EFxOdUmXn
         | 
         | I'm interested in the course as well though. I suspect there is
         | a lot I could learn.
        
           | willis936 wrote:
           | Laziness is the enemy. I spend a lot of time on things that
           | some might consider frivolous. I always make sure to set up
           | pin assignments and constraints properly so ERC and DRC
           | checks mean something. I've found that the 3D models are
           | quite helpful in finding pain points in clearance for multi-
           | board assemblies, large components, and user interactive
           | components. It's also really handy for checking mounting
           | configuration (hole size, standoff height, will standoffs
           | obliterate traces, etc.)
        
           | dekhn wrote:
           | I did spend the time to find 3d models on the web to plug
           | into my 3d views and it was definitely helpful.
           | 
           | Rather than paper, I think you could Kicad-design a 2D grid
           | of holes matching an existing proto board
           | (https://www.amazon.com/ElectroCookie-Solderable-
           | Breadboard-E...) and then do the placement and routing in
           | Kicad, and then finally assemble the board in place. To avoid
           | fritzing.
        
         | stn8188 wrote:
         | Awesome to hear of new people getting into PCBs! It's wonderful
         | how accessible PCB design has become, and I think KiCad plays a
         | major role in that. If you're the kind of person who can read
         | to learn stuff, I highly recommend this old powerpoint
         | presentation:
         | 
         | https://www.4pcb.com/media/presentation-how-to-build-pcb.pdf
         | 
         | It describes the manufacturing process in pretty good detail.
         | The reason the design rules feel like such a wall is that these
         | design rules are completely based upon the manufacturing
         | processes themselves (thus different manufacturers will have
         | different rules). As you go through that presentation, you'll
         | probably have to search or ask about many of the terms you
         | don't recognize, but that'll just help you learn even more!
         | Next, check out the design rules for a popular fabricator. For
         | example, here's one:
         | 
         | https://docs.oshpark.com/services/two-layer/
         | 
         | And they even include some helpful tips for setting up KiCad to
         | work with their fab capabilities:
         | 
         | https://docs.oshpark.com/design-tools/kicad/
         | 
         | Two other great resources to learn from are Robert Feranec and
         | the Contextual Electronics course:
         | https://www.youtube.com/@RobertFeranec
         | https://contextualelectronics.com/
         | 
         | Have fun!
        
           | roeles wrote:
           | > and I think KiCad plays a major role in that
           | 
           | I'm not trying to rain on your or KiCad's parade, but what
           | did it for me was EasyEDA's integration with JLCPCB's part
           | library. Combined with JLCPCB's assembly service. For just a
           | bit of extra money I now don't have to worry about
           | footprints, availability, exporting the right files, creating
           | a BOM, etc. I can just order at JLCPCB right from EasyEDA.
           | 
           | I really wanted to use KiCad instead of yet another online
           | tool, but for my first steps this just makes more sense.
        
             | stn8188 wrote:
             | Certainly JLC and their EasyEDA integration is a great tool
             | for reducing barriers - absolutely. There are others as
             | well, Eagle for one (maybe even before KiCad got as popular
             | as it is) plus some of the newer tools looks Libre PCB and
             | Horizon. I'm definitely biased towards KiCad, since it's
             | what opened doors for me personally a decade ago.
        
         | iancmceachern wrote:
         | >It seems like there are a lot of design rules that are not
         | common knowledge.
         | 
         | Totally. And it can often be unclear how to proceed when the
         | design rules you do know conflict.
         | 
         | Ultimately I've learned over time it's about the process rules,
         | not design rules. Follow the same logic design process each
         | time refining it to be better knowing that the design rules
         | will be bent and even broken at times.
        
         | ace2358 wrote:
         | Great post! I'm an ex maths/physics person and have always been
         | into EE and electronics as a hobby. I'm currently working on a
         | pcb and am also struggling to find that leap in knowledge.
         | 
         | I have recently found the eevblog forums [#] which are
         | extremely valuable. I haven't posted there yet but am planning
         | on engaging and seeing if I can learn some deeper knowledge.
         | 
         | I'm struggling to pick which MCU to use exactly. Let alone what
         | brands of rotary encoders are good, or which water proof usbC
         | female port I should use!
         | 
         | [#]
         | https://www.eevblog.com/forum/index.php?PHPSESSID=s3ph2f4cbq...
        
           | lnsru wrote:
           | All the parts from Mouser or Digikey are good. It takes time
           | to find your favorite vendors, parts and most enjoyable
           | datasheets. Part picking process is very time consuming.
        
             | ace2358 wrote:
             | Any tips if I wanted to get something pre manufactured
             | through the big pcb players?
             | 
             | How to figure out what parts are in stock, what can be used
             | with each other. Any tips for beginners? I'm looking to get
             | a pcb with parts soldered on (ws2812 LEDs, atmega328 and
             | supporting parts. Is this easy and feasible to do?
        
         | OJFord wrote:
         | Just checked your link - yes, Phil's Lab is good, not aware of
         | anything better for PCB design on YouTube. Maybe some of the
         | Rick Hartley recorded talks he recommends sometimes, or perhaps
         | some old EEVBlog videos would be worthwhile too.
         | 
         | But in general I agree, there's too much fascination with
         | Arduino et al. that I think's mid/long-term harmful to those
         | that stick with it personally.
        
           | pardoned_turkey wrote:
           | Rick Hartley's content is fantastic, but I think it caused
           | collateral damage by making hobbyists who work with 8-bit
           | microcontrollers and I2C believe they need to follow the same
           | rules that must be followed for GPUs and PC motherboards.
           | It's not Rick's fault, but it's a matter of the cult-like
           | following he's developed among some hobbyists. Old-timers on
           | PCB design forums try to impress and intimidate novices by
           | citing his advice without really understanding if it's
           | relevant. And most of the time, it isn't.
           | 
           | A lot of his videos should be prefaced by "it's interesting,
           | but you don't need to worry about it unless you're working on
           | the types of projects I'm paid to work on." Without this
           | disclaimer, PCB design becomes less accessible. It's akin to
           | teaching basic chemistry by starting with quantum foundations
           | and insisting that everything must be derived from that.
        
             | OJFord wrote:
             | Yes that's fair enough, I mentioned it in the spirit of
             | what else is good learning material on YouTube,
             | not/forgetting 'creating my first design right now'.
             | 
             | Phil's Lab is pretty good 'zero to DDR' though I think, for
             | PCB at least - you might need some awareness of basic
             | electronics first, he does schematic walkthroughs and
             | projects too, but it'd probably seem pretty quick and
             | unexplained if you're coming to it not knowing some
             | fundamentals.
        
         | throwup238 wrote:
         | The most basic design rules will be provided by your PCB fab so
         | they can vary quite a bit depending on the quality of the
         | manufacturer and the cost you're targeting. Some other design
         | rules (i.e. differential pairs) need to be computed using an
         | engineering calculator using some data from the fab and some
         | choices you have to make. Unless you're pushing the analog-high
         | speed digital boundary you don't need to worry much about them,
         | just choose arbitrary values that result in values within your
         | fab's specs.
         | 
         | However, most other design rules are experimentally derived by
         | the manufacturer of each part. Look for documents called
         | routing or layout guidelines which should be on the same page
         | you find a part's datasheet. The manufacturer of your CPU, RAM,
         | sensors, connectors, PMICs, and so on will usually make them
         | and they'll often include really basic info like how many caps
         | and how far they should be away from some pins, how to route
         | signals to minimize reflections, and so on.
         | 
         | But focus on the two most important words in EE: _REFERENCE
         | DESIGNS_. Until you 're doing mixed signal stuff, you can
         | usually just copy reference designs wholesale and strip out the
         | stuff you don't need. The only hard part is making sure the
         | layers and copper weights compatible. Even professional
         | engineers base their work on manufacturer reference designs
         | when they can.
        
           | willis936 wrote:
           | I don't know the full depth of the trade space of stackup
           | parameters. I go with what the fabs provide. While trying to
           | do some 200 V routing recently I found out something
           | interesting. Higher weight copper layers have thicker
           | prepreg. This is interesting to me because the rule of thumb
           | for 200 V clearance is "0.4 mm in outer layers and 0.2 mm in
           | inner layers". Most prepreg is 0.1 mm, but going to 2 oz
           | copper means 0.22 mm prepreg. This lets me route 200 V
           | without having to worry about arcing through prepreg,
           | specifying a more expensive board material, or going to more
           | layers.
        
           | MrBuddyCasino wrote:
           | > _But focus on the two most important words in EE: REFERENCE
           | DESIGNS._
           | 
           | ,,I avoid application notes as if they were the plague,
           | because frankly, more than 95% of them are incorrect."
           | https://youtu.be/QG0Apol-oj0?si=KTdYlKAlRhGVEDfB
        
             | throwup238 wrote:
             | Those are not the same things.
        
         | TaylorAlexander wrote:
         | Congratulations on starting! I am about 14 years in to my PCB
         | design journey and having an absolute blast with it. I am also
         | not formally trained but that hasn't stopped me from continuing
         | to learn and making some pretty complex boards.
         | 
         | The biggest thing I learned lately was, if your board is open
         | source, find some nice person online (twitter, mastodon,
         | reddit, etc) who is willing to offer design review for you. I
         | have learned SO MUCH from having a professional critique my
         | boards.
         | 
         | Also Phil's Lab is excellent! My favorite resource for learning
         | advanced concepts. Just ignore his shilling for Altium and
         | stick with Kicad (which he more recently has been exploring).
         | Kicad is an incredible tool. Learning Altium has value if you
         | want to work at a shop that uses Altium, but Kicad is really an
         | excellent tool that is very accessible.
         | 
         | I do robotics so I do software, mechanical design, welding and
         | fabrication, and PCB design. PCB design is by far my favorite
         | of all these fields!
        
         | _Microft wrote:
         | Here are some checklists from someone knowing his stuff (he
         | seems to be creating GBit networking stuff among other things):
         | 
         | https://github.com/azonenberg/pcb-checklist
        
           | _Microft wrote:
           | I also saw this recommended in the past for assigning
           | functions (like serving as a ground plane) to layers
           | depending on the numnber of layers that your board is going
           | to have:
           | 
           | https://web.archive.org/web/20201112034911/http://www.hottco.
           | ..
           | 
           | https://web.archive.org/web/20201224132837/http://www.hottco.
           | ..
           | 
           | ...
        
           | willis936 wrote:
           | This is nice, thanks.
           | 
           | One thing I'd add to the schematic checklist is "label every
           | net". It makes setting up net classes much easier and clearly
           | communicates the design in the layout.
        
         | magicalhippo wrote:
         | > It seems like there are a lot of design rules that are not
         | common knowledge.
         | 
         | Even worse, there ard a lot of design rules that are shared as
         | common knowledge, but that are wrong or detrimental to modern
         | designs. Rules that applied when all you had were througholes,
         | slow rise times and no emission tests to worry about.
         | 
         | Modern MCUs for example might just run at 8 or 16MHz if so
         | configured but can have rise times in nanoseconds, so emissions
         | must be considered despite the "slow speed" of the clock.
         | 
         | Another big one is having multiple capacitors one decade apart
         | for decoupling, ie 1uF, 0.1uF and 10nF or something like that.
         | With modern SMD capacitors you'll almost never want to do that.
         | Instead use multiple large ones, ideally in the smallest
         | package you can.
         | 
         | > And, is there a place, maybe a slack or discord, that would
         | review designs?
         | 
         | I've had a good time over at MicroType Engineering's
         | discord[1], got a separate room for design feedback. Also has a
         | YouTube with some helpful videos[2].
         | 
         | [1]: https://discord.gg/CwWUxqdr
         | 
         | [2]: https://www.youtube.com/@MicroTypeEngineering
        
           | 15155 wrote:
           | > Another big one is having multiple capacitors one decade
           | apart for decoupling, ie 1uF, 0.1uF and 10nF or something
           | like that. With modern SMD capacitors you'll almost never
           | want to do that. Instead use multiple large ones, ideally in
           | the smallest package you can.
           | 
           | To expand (search for "antiresonance"):
           | https://www.mouser.com/pdfDocs/c39e.pdf
        
         | mips_r4300i wrote:
         | Join the EEVBlog forums and spend some time reading feedback
         | threads on PCB design. You can ask questions about your own as
         | well.
        
       | willis936 wrote:
       | I've spent my vacation making a nixie tube clock PCB. Just the
       | last few traces left to route. I use altium at work and KiCAD at
       | home. There are things I like about both. It really is enjoyable.
        
         | iancmceachern wrote:
         | It's so cool how far KiCad had come
        
       | fnordpiglet wrote:
       | Indirectly related question, I'm thinking about starting into
       | PCBs, have downloaded KiCAD and started playing around. But I'm
       | not super psyched to etch my own boards (although I understand
       | it's gotten easier over the last 30 years), and have been
       | thinking about getting a PCB CNC. Any thoughts on best way to
       | take your designs and make them real?
        
         | AdamH12113 wrote:
         | You can get boards fabbed at places like OSH Park or JLCPCB for
         | cheap, complete with plated through holes and solder mask. I
         | don't know a good reason to try to make your own boards these
         | days.
        
           | _fizz_buzz_ wrote:
           | Yeah, PCBs - even small quantities- have become to cheap to
           | deal with making them oneself. We used to have a CNC at work
           | for PCB prototyping, but it was also a bit of work to get
           | everything set up. It didn't work like a printer. Now we just
           | order PCBs. We usually use Aisler or JLCPCB.
        
             | buescher wrote:
             | The CNC machines are still useful for testing RF designs.
             | You can iterate a PCB antenna design more quickly with one
             | than you can by sending out. And they're a low-commitment
             | (i.e. no purchase order) way to make small jigs and
             | adapters.
        
         | analognoise wrote:
         | JLCPCB.
         | 
         | It is so outrageously cheap that it isn't worth etching
         | anything yourself anymore.
        
         | dvh wrote:
         | I recently made my first pcb in kicad and ordered it at jlcpb,
         | it was $4 including shipping for 5pcs. At this price I wouldn't
         | bother with home made.
        
         | yonatan8070 wrote:
         | Etching or milling a PCB yourself can be fun if you want to
         | learn about how it's really done, but it is very time consuming
         | and the finished product will not be even remotely comparable
         | to what you can get made for 2$ at JLCPCB or similar factories
        
         | stephen_g wrote:
         | Ask yourself what you want to achieve - if you want to create
         | electronic projects, order your boards from the cheap
         | manufacturers online. If you want to become really good at the
         | process of making PCBs, then look at making your own.
         | 
         | This is the reality - unless you're only interested in the most
         | simple stuff (one or two layers but no plated holes, no vias,
         | no solder mask, etc.), you can spend years trying to develop
         | and tweak processes to try and achieve something that won't
         | match the quality and reliability of something you can have
         | delivered in less 7 days for $10. Not to say that developing
         | PCB processes isn't fun to some people, and if it is then more
         | power to you, but I'd rather spend the time on the electronics
         | than spending all of it trying to build PCBs.
        
         | dekhn wrote:
         | I will echo JLCPCB as a great solution for this. I basically
         | have gotten into a "week cycle": design some board (or improve
         | a design), send to JLC, get the resulting board in about a week
         | (I pick the faster manufacturing and shipping options), for
         | about $30. This is about 2X the speed of OSHPark and 1/2 the
         | cost.
        
       | thousandknives wrote:
       | I'm not entirely sure from the website - the lectures will be
       | recorded and posted online for everyone to access?
        
         | fischerm wrote:
         | They will be once the class starts and the lectures happen! In
         | the meantime feel free to check out the resources from last
         | year:
         | 
         | https://pcb.mit.edu/archive/IAP2023/
         | 
         | And the lectures are all on YouTube :)
         | 
         | https://youtube.com/playlist?list=PLJpsOGUzkGzKMEPmRKWAJcLpK...
        
       | SeasonalEnnui wrote:
       | KiCad is good now. That might seem like a flippant comment
       | however it is indicative of the progress that KiCad has made in
       | the last 3 years. I have moved from a firmly entrenched position
       | with a proprietary EDA (which felt like a pair of comfortable
       | shoes) to KiCad for the majority of projects.
       | 
       | To any KiCad dev reading this - thank you.
        
         | 15155 wrote:
         | Until you need to route DDR (or any other parallel bus nets.)
         | Or use any significant amount of impedance control. Or use
         | blind/buried vias. Or tent specific sides of vias.
         | 
         | Kicad is great, but there are very solid use cases that are
         | substantially more painful than other commercial EDA offerings.
        
           | mips_r4300i wrote:
           | I've watched the growth of kicad since 2013. Far more usable
           | now, though it was very poor at the beginning.
           | 
           | In its current state I could recommend it for most hobbyist
           | stuff and some simpler commercial PCBs. Far better than Eagle
           | ever got.
           | 
           | Meanwhile I will continue to use Altium for everything just
           | because I'm fast with it. When time is money and $8k is just
           | another expense it's well worth it.
        
           | MagerValp wrote:
           | What's the issue with blind vias? You had to enable them
           | manually earlier, but as of 7 I think they're always enabled.
        
             | 15155 wrote:
             | The level of UI polish and control Altium gives you over
             | the construction of HDI vias (and just in general, the
             | properties pane) is substantially greater.
        
           | SeasonalEnnui wrote:
           | Agreed! The gap is getting smaller, I can imagine feature
           | parity in another few years. Some fellow nerds doing that
           | kind of stuff in $$$-EDA say it isn't exactly smooth sailing
           | in those EDAs - regular crashes and so on.
        
         | sponaugle wrote:
         | Indeed KiCad is much improved in many different areas, and the
         | devs deserve accolades for making those things happen. The
         | self-destruction of EagleCad was certainly a good source of
         | motivation to focus efforts on making something open-source
         | better.
         | 
         | For a number of years I have been using DipTrace for personal
         | projects and it is quite easy to use. It is one of the easiest
         | and fastest tools for doing PCBs for the non-PCB engineer. I
         | have recommended it to a number of non-engineers and they were
         | quickly successful in getting a design up and running.
        
       | seventytwo wrote:
       | Very cool!
        
       | dimitrios1 wrote:
       | I haven't touched PCB design/EDA since college because it was so
       | cost prohibitive and I lost the student license to Mentor
       | Graphics, but it's something I've always wanted to return to. I
       | am excited to try this out!
        
       | fischerm wrote:
       | Howdy everyone - Fischer here, I started this course last year
       | along with my good friend Adi. Glad to see that this ended up on
       | HN, and glad that people are excited about it and seem to find
       | the content useful. The goal of putting this together was to help
       | people have fun and feel empowered to build cool stuff, and from
       | the comments here it looks like it's helping that. Yay :)
       | 
       | A quick note though: We're updating the site right now to get it
       | ready for it's second running in IAP 2024, which is in about a
       | week or two. So most of the content for this year is being built
       | out, but everything from last year is available under the archive
       | page:
       | 
       | https://pcb.mit.edu/archive/IAP2023/
       | 
       | Happy hacking!
        
         | dekhn wrote:
         | I spent part of yesterday looking over Winnie's projects and
         | was amazed. I continue to be blown away at the productivity of
         | MIT students and their ability to make fun things (I'm thinking
         | of the various high power LED projects, as I work with high
         | power LEDss). I especially enjoyed reading about designing,
         | simulating, and manufacturing a single-layer Aluminum PCB which
         | acted as the substrate for the LEDs, but was impossibly hard to
         | solder because it was a huge heat sink! And the solution to
         | pre-heat the board with a board heater worked.
         | 
         | Please continue to post the projects, especially the git repos
         | with the actual designs, as well as the reports.
        
         | buescher wrote:
         | It's really nice to see this IAP course! The lectures from last
         | year are great! You really covered a lot for a month, even for
         | MIT students. I keep finding great stuff like, oh yes, they
         | reference Ott for EMI right away in layout.
         | 
         | I particularly appreciate the slides for "Hardware's not dead".
         | 
         | It would be cool to do some advanced topics in physical
         | modeling of circuit boards - electromagnetic, thermal, and
         | mechanical/reliability.
         | 
         | Some internal links to the 2023 site are broken, and some
         | google links too. It took me a bit to find the motor lecture
         | from its mention on your technical resources page.
         | 
         | Some notes on resources:
         | 
         | If you're going to take a board to production, the Coombs
         | handbook is nice to have handy. IPC standards can be helpful
         | also, and you might access to them through your library.
         | 
         | For batteries, there really isn't a single reference as useful
         | as the Linden handbook.
         | 
         | You mention Ott for EMI/EMC in lecture 3 already.
         | 
         | For motors I have found Fitzgerald&Kingsley and the old
         | Electro-Craft handbook particularly useful. The Electro-Craft
         | handbook is one of those fun old books that has crisp control
         | theory block diagrams you can pretty much enter directly into
         | Simulink and run.
        
       | AdrianGispert wrote:
       | Courses like this is what makes me keep going, I'm pretty new to
       | EE and PCB design so the learning curve is somewhat difficult
       | since I have to look up for resources everywhere for the specific
       | things I want to make. I tried KiCad at first but ended up using
       | Flux as my main design tool because of two things: If I'm stuck
       | on something, instead of having to google the answers and
       | accommodate their context with mine, I instead ask their AI which
       | already has the context of my project. And second one is that
       | there is such a strong sense of community and collaboration, it
       | makes me feel like I never have to do anything alone. I mean the
       | whole library is made by other people (as far as I know) I know I
       | won't have to Google everything at a later point but for now it's
       | what works for me.
        
       ___________________________________________________________________
       (page generated 2023-12-30 23:02 UTC)