Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

71%
+3 −0
Q&A What is a good PCB-layout?

I have also designed and ordered a PCB It seems rather pointless to ask after you've already ordered the board. only uses THT-components That's just plain silly. This is the kind of thing that ...

posted 1y ago by Olin Lathrop‭  ·  edited 1y ago by Olin Lathrop‭

Answer
#2: Post edited by user avatar Olin Lathrop‭ · 2023-04-04T11:59:25Z (over 1 year ago)
  • <blockquote>I have also designed and ordered a PCB</blockquote>
  • It seems rather pointless to ask <i>after</i> you've already ordered the board.
  • <blockquote>only uses THT-components</blockquote>
  • That's just plain silly. This is the kind of thing that you might see from a clueless hobbyist, but is totally unacceptable from an electrical engineering student. Thru-hole components can still be useful for those plug-in breadboards, but don't design a PCB for them.
  • SMD components are smaller, more available, provide wider part selection, cheaper, easier to route boards for, and easier to physically work with. An SMD board also has the advantage of not making you look like a clueless weenie when showing it to others that know anything about EE.
  • <blockquote>Where is it a good place to start with the PCB-design?</blockquote>
  • Answering this really requires a whole book, so I'll just give a few pointers.
  • I usually start with placing mounting holes in the corners at least. Then place external connections on the edges close to those mounting holes. The external connections will get physically abused, so you want them to be as solidly held as possible.
  • Roughly locate those connections according to how they will be used. If the user will frequently connect/disconnect some signals, place their connectors at the front of the board. The programming and debugging header can go in the back so that it's out of the way during normal operation. Consider the flow. Input signals at left and output signals at right can make sense, for example.
  • After placing the parts that will cause mechanical stress, you may want to add mounting holes.
  • Decide how many layers the board will have. For a simple board that you can make large enough, two layers is often good enough. With the components on top, you can try to leave the bottom layer to be mostly a ground plane. Most of the interconnects will be on the top with occasional short "jumpers" in the bottom layer because it's impossible to route a circuit in a single layer in the general case.
  • If there are sensitive signals or reliability and signal integrity is more important that build cost, use four layers and reserve one for a board-wide ground plane. This would normally be layer 2, since most of the signals will be in layer 1.
  • Ultimately you want good routing so that signals are reasonably direct, power supply feeds low impedance, etc. However, good routing starts with good placement.
  • Start with critical components with lots of interconnects. In your case, that would be the opamps. I'd probably place one opamp temporarily somewhere in the middle, then incrementally place its closely-connected components around it to make the connections as short and easy as possible. Place the bypass caps first, then the remaining immediate components around the opamp.
  • This results in one clump of components around an opamp. Now you can move that whole clump around as needed. You can create several independent clumps like that, then place the clumps relative to each other according to how they are interconnected. Note that clumps can be placed off the board initially, then moved onto the board as a single unit later.
  • Think about the grounds and the return currents thru the ground carefully. The bypass cap connections should be direct and not go across the ground plane. Connect the ground of each chip to the master ground plane in a single point.
  • In your case, you don't really need a ground plane for radiation reasons. You don't have high speed signals, but you do have very low level signals. Make sure that power supply return currents don't cause offsets in the signals. This can be a reason to use four layers instead of two so that you have a solid plane for the ground.
  • I think your circuit can be routed in two layers, but if this were a professional project I'd use four layers unless it is a high-volume low-cost product. I can't imagine an EKG being that, though. There is so much expense in any medical product, that trying to cut cost by using two layers instead of four in a small internal board is ridiculous. A little lower noise and overall robustness is far more important that saving a dollar on a board in a $5,000 medical product that will only ever have 3000 made. The extra engineering time would probably exceed the savings anyway.
  • In your case in a learning environment, two layers may make sense. You don't really have a space constraint, it will be easier to edit the board during debugging, and slightly more noise isn't a big deal since you're presumably not creating a real medical device.
  • <blockquote>I have also designed and ordered a PCB</blockquote>
  • It seems rather pointless to ask <i>after</i> you've already ordered the board.
  • <blockquote>only uses THT-components</blockquote>
  • That's just plain silly. This is the kind of thing that you might see from a clueless hobbyist, but is totally unacceptable from an electrical engineering student. Thru-hole components can still be useful for those plug-in breadboards, but don't design a PCB for them.
  • SMD components are smaller, more available, provide wider part selection, cheaper, easier to route boards for, and easier to physically work with. An SMD board also has the advantage of not making you look like a clueless weenie when showing it to others that know anything about EE.
  • <blockquote>Where is it a good place to start with the PCB-design?</blockquote>
  • Answering this really requires a whole book, so I'll just give a few pointers.
  • I usually start with placing mounting holes in the corners at least. Then place external connections on the edges close to those mounting holes. The external connections will get physically abused, so you want them to be as solidly held as possible.
  • Roughly locate those connections according to how they will be used. If the user will frequently connect/disconnect some signals, place their connectors at the front of the board. The programming and debugging header can go in the back so that it's out of the way during normal operation. Consider the flow. Input signals at left and output signals at right can make sense, for example.
  • After placing the parts that will cause mechanical stress, you may want to add mounting holes.
  • Decide how many layers the board will have. For a simple board that you can make large enough, two layers is often good enough. With the components on top, you can try to leave the bottom layer to be mostly a ground plane. Most of the interconnects will be on the top with occasional short "jumpers" in the bottom layer because it's impossible to route a circuit in a single layer in the general case.
  • If there are sensitive signals or reliability and signal integrity is more important that build cost, use four layers and reserve one for a board-wide ground plane. This would normally be layer 2, since most of the signals will be in layer 1.
  • Ultimately you want good routing so that signals are reasonably direct, power supply feeds low impedance, etc. However, good routing starts with good placement.
  • Start with critical components with lots of interconnects. In your case, that would be the opamps. I'd probably place one opamp temporarily somewhere in the middle, then incrementally place its closely-connected components around it to make the connections as short and easy as possible. Place the bypass caps first, then the remaining immediate components around the opamp.
  • This results in one clump of components around an opamp. Now you can move that whole clump around as needed. You can create several independent clumps like that, then place the clumps relative to each other according to how they are interconnected. Note that clumps can be placed off the board initially, then moved onto the board as a single unit later.
  • Think about the grounds and the return currents thru the ground carefully. The bypass cap connections should be direct and not go across the ground plane. Connect the ground of each chip to the master ground plane in a single point.
  • In your case, you don't really need a ground plane for radiation reasons. You don't have high speed signals, but you do have very low level signals. Make sure that power supply return currents don't cause offsets in the signals. This can be a reason to use four layers instead of two so that you have a solid plane for the ground.
  • I think your circuit can be routed in two layers, but if this were a professional project I'd use four layers unless it is a high-volume low-cost product. I can't imagine an EKG being that, though. There is so much expense in any medical product, that trying to cut cost by using two layers instead of four in a small internal board is ridiculous. A little lower noise and overall robustness is far more important that saving a dollar on a board in a $5,000 medical product that will only ever have 3000 made. The extra engineering time would probably exceed the savings anyway.
  • In your case in a learning environment, two layers may make sense. You don't really have a space constraint, it will be easier to edit the board during debugging, and slightly more noise isn't a big deal since you're presumably not creating a real medical device.
  • <hr>
  • Someone wrote in a comment:
  • <blockquote> Through-hole is the only sensible choice if you have zero experience with soldering.</blockquote>
  • I totally disagree. SMD is <i>easier</i> to solder than thru hole. The thru hole procedure is:<ol>
  • <li>Insert the leads thru the holes.
  • <li>Bend the leads a little on the bottom so that the part doesn't fall out when the board is flipped.
  • <li>Repeat steps 1-2 a few more times so that several parts are now sticking thru the board.
  • <li>Flip the board over and solder the leads.
  • <li>Clip off the unused parts of the leads.
  • </ol>
  • SMD is easier:<ol>
  • <li>Flow a little solder on one of the pads.
  • <li>With tweezers, hold the part in place.
  • <li>Melt the existing solder from step 1 to solder down that pad.
  • <li>With the part now reasonably held by the first pad, go around the part and solder the remaining pads.
  • <li>Go back and check the first pad. Maybe add a little solder.
  • </ol>
  • Notice that SMD doesn't require flipping the board over, and lets you work on each part sequentially to completion. You can do the latter with thru hole too, but the process is less efficient than inserting several parts, then soldering in batches.
  • I have done plenty of soldering both ways. Not only is SMD easier to build a board to start with, but it's also way easier to change parts later.
#1: Initial revision by user avatar Olin Lathrop‭ · 2023-03-31T17:39:12Z (over 1 year ago)
<blockquote>I have also designed and ordered a PCB</blockquote>

It seems rather pointless to ask <i>after</i> you've already ordered the board.

<blockquote>only uses THT-components</blockquote>

That's just plain silly.  This is the kind of thing that you might see from a clueless hobbyist, but is totally unacceptable from an electrical engineering student.  Thru-hole components can still be useful for those plug-in breadboards, but don't design a PCB for them.  

SMD components are smaller, more available, provide wider part selection, cheaper, easier to route boards for, and easier to physically work with.  An SMD board also has the advantage of not making you look like a clueless weenie when showing it to others that know anything about EE.

<blockquote>Where is it a good place to start with the PCB-design?</blockquote>

Answering this really requires a whole book, so I'll just give a few pointers.

I usually start with placing mounting holes in the corners at least.  Then place external connections on the edges close to those mounting holes.  The external connections will get physically abused, so you want them to be as solidly held as possible.

Roughly locate those connections according to how they will be used.  If the user will frequently connect/disconnect some signals, place their connectors at the front of the board.  The programming and debugging header can go in the back so that it's out of the way during normal operation.  Consider the flow.  Input signals at left and output signals at right can make sense, for example.

After placing the parts that will cause mechanical stress, you may want to add mounting holes.

Decide how many layers the board will have.  For a simple board that you can make large enough, two layers is often good enough.  With the components on top, you can try to leave the bottom layer to be mostly a ground plane.  Most of the interconnects will be on the top with occasional short "jumpers" in the bottom layer because it's impossible to route a circuit in a single layer in the general case.

If there are sensitive signals or reliability and signal integrity is more important that build cost, use four layers and reserve one for a board-wide ground plane.  This would normally be layer 2, since most of the signals will be in layer 1.

Ultimately you want good routing so that signals are reasonably direct, power supply feeds low impedance, etc.  However, good routing starts with good placement.

Start with critical components with lots of interconnects.  In your case, that would be the opamps.  I'd probably place one opamp temporarily somewhere in the middle, then incrementally place its closely-connected components around it to make the connections as short and easy as possible.  Place the bypass caps first, then the remaining immediate components around the opamp.

This results in one clump of components around an opamp.  Now you can move that whole clump around as needed.  You can create several independent clumps like that, then place the clumps relative to each other according to how they are interconnected.  Note that clumps can be placed off the board initially, then moved onto the board as a single unit later.

Think about the grounds and the return currents thru the ground carefully.  The bypass cap connections should be direct and not go across the ground plane.  Connect the ground of each chip to the master ground plane in a single point.

In your case, you don't really need a ground plane for radiation reasons.  You don't have high speed signals, but you do have very low level signals.  Make sure that power supply return currents don't cause offsets in the signals.  This can be a reason to use four layers instead of two so that you have a solid plane for the ground.

I think your circuit can be routed in two layers, but if this were a professional project I'd use four layers unless it is a high-volume low-cost product.  I can't imagine an EKG being that, though.  There is so much expense in any medical product, that trying to cut cost by using two layers instead of four in a small internal board is ridiculous.  A little lower noise and overall robustness is far more important that saving a dollar on a board in a $5,000 medical product that will only ever have 3000 made.  The extra engineering time would probably exceed the savings anyway.

In your case in a learning environment, two layers may make sense.  You don't really have a space constraint, it will be easier to edit the board during debugging, and slightly more noise isn't a big deal since you're presumably not creating a real medical device.