Random musings on PCB design

265 views
Skip to first unread message

Richard Lewis

unread,
Aug 2, 2019, 2:10:29 AM8/2/19
to retro-comp
I first tried EasyEDA, Eagle (which is no longer completely free) and Fritzing (which seems to be dead) but found KiCad to be better (because it's open source and vibrant). Yeah, I've become a KiCad addict. 

I'm about 4 months in and some things I've learned: 
  1. Don't need to inter-connect every pin on every IC in the schematic with wires. Wire labels or busses are much easier. 
  2. Designing PCBs for analog circuits is way harder than I thought
  3. Recently discovered (mostly from examining Steve's boards) that the best way to route a 2 sided board is to use vertical (or horizontal) traces only on one layer and the opposite on the other layer. When I started out I thought that via's were bad so I would end up creating a spaghetti maze of routing on the top layer. 
  4. PCBs make excellent heat sources if the power traces are too thin so I've learned to respect the KiCad PCB calculator and not make every trace 6 mils.  
  5. When doing SMD only boards, 4 layers are more expensive but result in much tidier routing and solve issues I was having with ground planes. Learned this from a EEVblog video. 
  6. Spend a lot of time going over the Gerbers before sending off to JLCPCB (or other similar cheap fab houses). They claim to do post electrical checking of the boards but I've found otherwise with missing traces and shorts (which were my own fault really since I didn't run the DRC) 
  7. Don't need to agonize over exact placement of traces, via's and ground plane stitching since most synchronous digital circuits < 50 Mhz seem not to care. Pretty sure I will regret this statement in the near future
In total about half of my projects end up being sent to JLCPCB or OSH Park. The "never-ending projects" are a Z80 SBC based on Grant's original design and a MAX7000S CPLD as the glue (on a single RC2014 compatible card) and a clone of Steve's Z180 SC126 both using only SMDs. I've gone off on lots of tangents, mostly creating breakout boards for testing the various components. In homage to JFK and Apollo 11 I hope to get these finished before the decade is out. 

All my stuff is here: https://github.com/hyiger?tab=repositories

So far the projects that have been sent to a fab house and actually work:
  • RC2014 Monitor: my very first project. A hybrid of THT and SMT, based heavily on Dr Baker's monitor with bits of Steve Ciarcia's original Z80. Uses the power-hungry TIL311 hex display. Turned me off forever on using THT parts. Found I was running out of board space too quickly and didn't understand the merits of using a grid-based trace layout.   
  • ram_rom_brd: a SRAM and EEPROM expansion card for the DeltaBrd  MaxV PCB I found on eBay. This was my first "all SMD" board that actually didn't blow up in my face. 
  • ATtiny1614: a breakout board for testing. This is the coolest microcontroller in my opinion. I use it for interfacing between the Z80 bus and I2C peripherals. I probably could just "bitbang" the I2C stuff with Z80 assembler code but using a microcontroller and C++ with a i2c library seems a lot easier. 
  • max_breakout: a breadboard friendly MAX7000 CPLD 5V TTL compatible breakout board that I use for testing glue logic for the various Z80 peripherals. Key takeaway: "Now I know what the Z80 WAIT pin is used for..." and "It's really important to pay attention to timing diagrams..."
  • power_share: test board for the $11 ltc4350 power share/current load balancer chip. Expensive chip but cool nonetheless. Made me realize that designing PCBs for analog circuits is really, really hard as in 2-3 levels above digital hard. 
Software related:
  • rc2014_fpga: an emulation of the RC2014 ecosystem written entirely in VHDL. I was inspired greatly by Grant's Multicomp but averted my head and wrote my own

Anyway, still have quite a bit to learn. '

Richard

Steve Cousins

unread,
Aug 2, 2019, 8:16:52 AM8/2/19
to retro-comp
I had only designed a couple of PCBs before taking up retro homebrew computers. I've now designed about 30 boards.

I have watched a couple of online videos about PCB design from people who really seem to know what they are doing. I also have some ancient knowledge of the PCB production process. From this and what 30 boards worth of experience has shown me, I'd make the following comments.

I don't use auto-routing. I tried it on my first recent board but didn't like the results. I prefer manual routing to get a better quality result but also to make the design more interesting. I find it quite rewarding fiddling about with the layout. It's an art form :)

Via holes are a weak link. If you go for really small hole diameters, which seems to be the default these days, they are tricky to plate well. Think about how it works. A small hole is drilled which leaves about 1.6mm of insulating material which needs plating over. With a small hole, access, even for a liquid, is pretty restricted. Beats me how they get plated at all. Spending time to move tracks about and reduce the number of via holes is a good idea, but running tracks all around the houses to avoid a via is also bad news. Surprisingly I've not yet seen any evidence with my boards that vias have failed.

More recently I've been experimenting with larger via holes to further reduce risk of failure. The problem here is the pads around the vias also get bigger which quickly impacts the amount of space used by a group of tracks.

I rarely use tracks narrower than 10 mil. Using unnecessarily narrow tracks also creates weak links. A tiny bit too much etching and the track can be eaten away. Also, a wider track is mechanically stronger (and more likely to survive when that screwdriver slips!). Using wider tracks than electrically necessary also reduces resistance and heating effects, which is no bad thing. Using wide tracks does also mean they can end up with less space between them, which can be bad. I set the DRC minimum spacing to a value higher than the defaults to ensure I leave good size spaces. So in summary, I don't push my luck on any of the claimed production capabilities.

Another thing I've recently been trying to do is reduce the number of tracks on the solder side that go between IC pins. I do this to avoid the potential fear an inexperienced maker may have when space around a solder joint has tracks in it. For the same reason, I also set the copper fill rules to leave more space around the solder side pads. This may be a silly idea, but it does make the solder side look and feel less cluttered, and I think reduces the change of solder shorts, etc.

I'm careful to ensure good placement of decoupling (bypass) capacitors. I try to have the power feed go to the capacitor and from there only to the chip pin. On the return path, I manually route a track to the ground pin to ensure a short route and then allow the copper fill to further improve the ground.

I think PCB design is a simple process when only very low-frequency signals are involved. It gets more difficult as the frequencies increase, so I'll stick to relatively slow retro tech.

Learning is a never-ending process and I fully expect to be experimenting with board design for some time to come.

Steve

Richard Lewis

unread,
Aug 2, 2019, 1:51:49 PM8/2/19
to retro...@googlegroups.com
A long time ago Popular and Radio Electronics used to publish PCB "foil patterns." For the single sided boards I could go to Radio Shack, buy a copper clad board, etch resist decals and a bottle of ferric chloride solution. Then I would then laboriously transfer the decals to the board, etch the copper and the attempt to drill out the holes with a hand drill breaking a ton of 1/16" drill bits in the process. A better way was to go to the library and photocopy the board pattern onto an acetate transparency, place it over a light sensitive board, expose to a bright lamp then etch. Needless to say I only made 2-3 boards this way before switching back to point-to-point or strip board. Fast forward to the present: Being able to use an EDA tool to design the schematic, layout the board then push a button to have multi-layer board made which arrives 1 week later is amazing. 

I used auto-routing in the very beginning but didn't like the results and find that manual routing is superior (until the AI overlords surpass us). 

With regards to via sizes I've run across various "expert" opinions that generally vary amongst: 
  1. Via hole diameter should be >= the trace width
  2. Via hole perimeter should be >= trace width
  3. Via hole size should be specifically calculated to control impedance and can handle the current load 
  4. Via hole size for low frequency stuff doesn't matter
What I have generally settled on is to take the fab house's minimum size, double it and then ensure that the via hole diameter is at minimum the same as the trace width and that the copper ring is at least twice the diameter of the hole. I do the same for traces. JLCPCB claim they can do 3 mil traces which I take with a massive grain of salt and double it to 6 mils as an absolute min but generally stick to 10-12 mils if I can and larger 16-20 mils for the power traces (depending of course on the power requirements). However for fine pitch SMD stuff, 10 mil traces tend to be on large side for routing purposes. I haven't graduated to BGA yet and probably never will so I don't need to use super thin traces. 

As you pointed out I have run into issues where if the traces are too thin that it's easy to accidentally scratch off the solder mask and possibly cause a short. However since these boards are for my own edification and not for sale on Tindie I don't really think about it much. I would say my soldering skills are probably above average (I've hand-soldered 0402 parts under a microscope) but recently I've been using my own home-built reflow oven and have mastered (more or less) the manual application of solder paste on the boards. So the chances of scraping off solder mask by pushing a soldering tip across the board isn't much of an issue (unless I have to hand adjust an accidental solder bridge). Also, unless doing boards in quantity (which I have no need to do) I find stencils to be a PITA. Of course this really only applies to SMDs. Recently I've found that soldering TH parts is "weird" in that I somehow find it more laborious. 

My experience so far (I don't claim to be an expert) with bypass caps is that low speed digital can handle placement in various orientations as long as it's not too far away from the power pin. I do try to ensure that the power trace goes to the cap first then to the power pin but (so far) I don't seem to need to be religious about it and that 100nF is fine in almost all situations. Also, don't need to put a bypass cap on every chip (although it doesn't hurt). I suppose it depends on the type of chip and how much switching occurs within it. I do know for the higher frequencies you can't just drop in a 100nF cap and need to consider the frequency response by placing several caps of values between 10nf - 100uF in parallel with the larger value caps on the "outside" so the smaller caps can dampen out current rushes before it reaches the power pin. For low frequency retro stuff again I guess it doesn't really matter but as a disclaimer I still consider myself to be a rank amateur. I'm sure an electrical engineer would look at some of my statements and think: "this guy is full of it..." :-) 

As an interesting aside, I've built an all transistor/diode digital clock kit where the "bypass" caps on the transistor flip-flops became very important even though I was operating at 60hz from the power mains going into a divide by 60 counter. Not adding the caps caused the flip-flops to go metastable and adding too many also caused metastability issues. It was a very informative exercise in how bypass caps function in an electronic circuit. 

Anyway, I've been finding myself going back to my first designs and "improving" them as I learn. I also just realized that I seem to supply an over-abundance of parenthetical phrases when I write... 

Richard

Sergey Kiselev

unread,
Aug 2, 2019, 2:56:26 PM8/2/19
to retro-comp
Good thing you had stencils :-) In Soviet Russia I had to steal mom's nail polish and use it to draw traces on the PCB...
Later on I've got access to a copy machine (a controlled technology in the USSR!), and was using so called "the clothes iron method". It works as follows: you make a mirror copy of the PCB traces on a sheet of paper, secure that sheet up side down it on the top of the PCB, set the iron to the highest temperature, and iron the paper and the PCB thoroughly. The polymer in the toner melts and toner gets transferred to the PCB. Then you etch it using ferric chloride...

Another common method was designing the layout using rectangular (right angle mostly) traces, and then cutting the copper between traces with a scoring knife (in practice we were using modified hacksaw blades).

Point to point soldering is fun! I've used it to build prototypes for both my Xi 8088 and Zeta SBC designs, and then to test various improvements to these boards.

As far as PCB design goes:
- I agree that auto-routing, at least in KiCad using FreeRouting, are not perfect, and frequently simply ugly. I route my PCBs manually... that takes a lot of time!
- Doubling fab specs for hole/via diameters, trace widths, clearances, etc. makes sense to me. I normally use KiCad defaults, or slightly wider traces, e.g. 10 mil (0.25 mm ) to 14 mil (0.35 mm) for signals and wider 0.6 mm - 1 mm traces for power supply.
- Bypass capacitors - 100 nF works fine for ~10 MHz stuff. I try to put bypass capacitors on each IC, or multiple bypass capacitors if the IC has multiple power inputs. Ideally the capacitors should be located as close as possible to the power pins to reduce resistance/impedance in PCB traces. Also it is a good idea to put a 47 uF - 100 uF capacitor for every 10-20 ICs, distributed evenly on the board, and also one close to the power connector on the board. TTL ICs are particularly sensitive to noise. While ago (late 90's) I was designing a digital clock using TTL, and the circuit was extremely unstable without bypass capacitors. 

-SK

Mark T

unread,
Aug 2, 2019, 2:59:30 PM8/2/19
to retro-comp
Larger value multilayer ceramic caps have inductance so the lower value caps Are better at higher frequencies. At higher frequencies the caps are tuned LC notch filters. 27-33pF for 900MHz, 7.5-10pF at 1800 to 1900MHz, depending on length of trace to ground, just in case anyone has problems with interference from mobile phones.

I seem to be spending a lot of time checking timing specs recently, working on a single cycle stepper using wait but aiming to allow 20MHz clock on the Z80, worst case only allows 2.5ns gate delay from MREQ to WAIT. It would be easier if the data sheets included minimum propagation delays instead of just max and typical.

I use similar pcb design rules to Steve, 10 mil trace, 8mil space, but using the minimum via spec for jlcpcb, 0.3mm drill, 0.6mm pad.

I’ve tried kicad a couple of times, but really didn’t like the work flow. Also tried easyeda but didn’t give it much chance, due to needing internet always connected. Even the downloadable version doesn’t run entirely local. I still prefer eagle, using 7.6 still as it wanted me to register when i attempted an upgrade. I like the way eagle updates layout from schematic on the fly, so with dual monitor, schematic and layout both visible can help when optimizing schematic to simplify layout for gate and pin selection.

Using a python script intended to panelize brd files to shift the .brd layout relative to the origin, to allow 102mm x 102mm using the free version of eagle.

Mark

Bill Shen

unread,
Aug 2, 2019, 3:28:26 PM8/2/19
to retro-comp
My design rule is 7 mil trace, 7 mil clearance.  Drill is 16 mil (so I can solder a 30ga wire wrap wire if needed) and 30 mil pad.  Power trace is 18 mil with 22 mil drill and 40 mil pad.  My thru-hole pads are 50 mil pad, 28 mil drill for IC's or 65 mil pad 35 mil drill for wirewrap headers.  I seldom do copper ground fill, but added a power & ground rings of 25-mil traces around the board instead.  Almost never manual route, use autorouter 95% of the time.  The autorouter is Specctra router (Cooper & Chyan) which is still in use today by major EDA toolmakers.  My pc board tools are very old--WinDraft and WinBoard by IVEX bought in late 1990's.  Haven't updated it for about 20 years.  I know most of the bugs and how to work around them.  I've designed a few hundred boards with it.  It is not great, but does work.  I would not be surprised at all to learn that I'm the only person in the world still using WinBoard & WinDraft. 
  Bill

Bill Shen

unread,
Nov 1, 2019, 7:31:58 AM11/1/19
to retro-comp
Sent off 10 pc board designs to JLCPCB this week in two separate lots.  A couple of them are re-order; 3 are minor revisions, and 5 of them are new designs.  The pc board cost is $40 for 70 pc boards total, the two separate DHL shipping are $24.78 and $18.75.   I even received a email from JLCPCB tech support about one of the board has solder mask errors and whether I want to cancel that order.  I told her the errors are not important and go ahead with the production.  She said she'll fix it and did.  The first batch of boards are done and should be on its way back to me.  Having done this for 2 years now, still can't get over how amazing this process is. 
  Bill


Bill Shen

unread,
Dec 30, 2019, 4:26:13 PM12/30/19
to retro-comp
All my pcb orders this year were with JLCPCB except one.  JLCPCB kept track of my pc board orders so I entered them into a spreadsheet before they disappeared.  Here is year-end tally of my pc board orders with JLCPCB:  in 2019 I sent out 14 orders for 56 board designs totaling 445 pc boards at a cost (including shipping) of $535.  The pc board cost were $230, while DHL charged $305 for shipping them.  I think JLCPCB is in the wrong business!
  Bill

Marten Feldtmann

unread,
Dec 31, 2019, 3:34:29 AM12/31/19
to retro-comp
Actually it is very sad to see, that some businesses are vanishing ... the US still has some of them, but for me it seems, that there is no PCB business in Germany for prices somewhere around the JLCPCB. Even in Europe I do not know of any possile solutions. The solutions I know of are soooo expensive, that something like the RC2014 can not happen.

If I order a PCB (5 pieces 100mm x 100mm, 2 layer) I pay around €6 at JLCPCB, in Germany a producer would start at €99 for one piece. The shipping costs can be reduced to really a fraction if using traditional mail delivery ... though I have to wait 4 weeks for them. And none of them have the WebSite-services like JLCPCB - but perhaps I simply have not found them yet.

Does anyone knows of any producer in the EU ???

Marten

Bill Shen

unread,
Dec 31, 2019, 8:25:01 AM12/31/19
to retro-comp
You can get on-line quote from pcbshopper.com  The cheapest quotes are from China, but there are few from USA, Australia, and Europe.  When shipping and tax are considered, the difference is not quite that huge, but still significant.  When I was working professionally and had significant staffs and operating overhead, the cost of pc board is of little concerns.  The people really impacted are hobbyists and small electronic shops.

Shenzhen is known as "China's Silicon Valley", except it is just a large city in population but small in physical area.  This means the entire supply chain is within walking distance.  The time from idea to product is probably measured in days and weeks.  RC2014Pro from China probably can be sold for $20-$30.
  Bill

Karl Albert Brokstad

unread,
Dec 31, 2019, 9:27:56 AM12/31/19
to retro-comp

Shenzhen is known as "China's Silicon Valley", except it is just a large city in population but small in physical area.  This means the entire supply chain is within walking distance.  The time from idea to product is probably measured in days and weeks.  RC2014Pro from China probably can be sold for $20-$30.
  Bill

And they would still make a profit :) 

Bill Shen

unread,
Dec 31, 2019, 10:05:05 AM12/31/19
to retro-comp
I'm reasonably confident that my SBC based on Z84C1516 can be built in China and sold with nice profit at $10, especially if I replace the expensive DOM with CF disk.  A full-featured Z80 with CP/M for $10 is probably a viable product.
  Bill

TonyD

unread,
Dec 31, 2019, 10:27:52 AM12/31/19
to retro-comp
I've not calculated a total for the year but I'm guessing my PCB tally for the year is something similar to Bens with DHL shipping and VAT+Duty costing more than the cost of PCB's.

It's not just stuff from China or shipping by DHL which adds significantly costs. I've just bought an eval board from Parallax and postage via USPS (to UK) was $52 and Handling Cost+VAT+duties came to £44. So for a extra cost which totals to over $100, almost as much as the eval board :-(

Yes, its very hard to find a low cost PCB manufacturer in Europe. Most western (and not just European) manufacturers are just not set up to handle lots of small orders, their order / setup processes, times and costs do not scale well. As someone who works in the electronics industry the best advice I can give is find your local PCB house and ask if they have a PCB prototyping service or can do you a special rate. They will never be able to match the prices from the likes of JLCPCB but the ones I use in the UK will offer an entire panel (approx. 48" sq) for our companies designs for around £200. We can normally get them to include 2 or 3 different PCB designs on the large panel before they start to complain. They have the advantage of doing each PCB design as a sub-panel, each with n-circuits stepped and repeated and turn around is normally 5-days and no DHL-tax or country duty. If you can get two or three other local makers it might be a cheaper way (but not the cheapest way) to get PCB's board done locally and quickly.

Tony

Tom Szolyga

unread,
Dec 31, 2019, 12:45:05 PM12/31/19
to retro-comp


On Tuesday, December 31, 2019 at 7:05:05 AM UTC-8, Bill Shen wrote:
I'm reasonably confident that my SBC based on Z84C1516 can be built in China and sold with nice profit at $10, especially if I replace the expensive DOM with CF disk.  A full-featured Z80 with CP/M for $10 is probably a viable product.
  Bill

Include a plastic case and I will buy it.

Tom 
Reply all
Reply to author
Forward
0 new messages