PCB Layouts Part 1 – Workflow

I get asked (surprisingly) often about my PCB layouts and how I do them. Flattering obviously, but also a bit strange as I don’t really consider myself an expert on PCB layout at all. However, I can share are some “workflow” tips on laying out a board in the most effective way based on my experience.

Note that the below is based on using the freeware version of Eagle, but much of it should translate to other software packages without much difference.

The first step is to draw the schematic in the schematic editor. If I start from someone else’s published schematic I’ll normally print a copy on paper and mark on that which parts sizes I expect to use. This then becomes the reference for drawing the schematic in the editor. Once the schematic is drawn in it’s basic form I’ll check it, rename the parts and then run an electrical check to verify that nothing has been missed. If I am going from a published schematic I normally stick to the part names from the original schematic (because that makes for much easier troubleshooting if something’s amiss later on), otherwise I will make up something that is logical to me, usually going from input to output.

Then it is time to switch to the board editor. Most of my PCB layouts start out with mounting holes placed in the four corners (because that’s normally where I want them) and a ground plane drawn in the top layer. If I have a specific board size in mind I’ll restrict it straight away, otherwise I will keep the full area and then reduce the size as the layout progresses. I will also load my own standard design rules and tweak the parameters (mainly clearance) if required before I start, because then I will not make something that I have to revise later when the DRC (design rule check) fails.

I generally then start the actual layout process by placing the key components as I want them. Key components usually mean:

  • Power and control devices (transistors/ICs and potentiometers/switches) that must extend over the edge of the board
  • Power devices that need an onboard heat sink (heat sink is placed as well of course)
  • Other ICs plus their associated decoupling parts as close to the IC as possible
  • Key connectors (if they need to be in a certain position I fix that, otherwise I put them on the specific board edge where I believe it makes most sense to have them).

After this, the fun (or frustration) starts. Using the schematic on one side and the “ratsnest” command in Eagle to recalculate wires I start moving first the major and then the minor parts of the circuit around and positioning them to yield as short and as neat traces as possible. This requires several iterations and usually also putting the board away and coming back to it later because I tend to “go blind” after staring at the layout for too long at a time. Other tips that I use to simplify the layout process include:

  • Every time I make a major change, I save the board as a different file version with a new revision number, because sometimes layout changes turn out to be “dead ends” and then it’s easier to return without having to do massive amounts of rework. Some of my more complex designs have 10-15 file revisions before getting to the final layout.
  • I normally do the basic layout using one trace width, generally the smallest width I expect to use in the circuit. Once I have a layout I am reasonably happy with mechanically, I can enlarge key traces without having to do a lot of fiddly rework and without risking that I miss something. In general I also stick to using a few standard trace widths which makes it easier to quality check the layout later on in the process.
  • I normally start with 45 degree trace angles for simple and consistent routing, and the in the last round of tweaks I may change some traces to be “odd” angles instead if it significantly helps the layout.

Once the layout is beginning to shape up and all traces are routed, I will start the actual layout screening process. This usually involves generating gerber files for the circuit and rendering them with circuitpeople.com and looking at each layer in isolation. For the copper layers I mainly try to look at a) whether the individual traces follow the most unbroken and logical path and b) whether the individual signals will flow through consistent trace widths. If not, i go back and make corrections accordingly. Once I start checking Gerbers, I also start adding text elements to the board because I now have a reasonable idea of where there is space for them.

I then pretty much repeat this process over and over again until I believe I can’t make any more improvements. Again, putting the board away for a day or more often helps and I often find that even a short break from something I am happy with means that when I come back I can make bigger optimisations than I though possible when I left it. Often during these breaks I also think up new features that may be worth including, such as multiple footprints for key components, additional labelling for connectors etc.

Eventually I get to a point that I am happy with the layout and then it is mainly the last checks of both the individual layers (using gerber renderings from circuitpeople) and the full board (using renderings from gerber-viewer.com, which allows displaying of multiple layers at the same time) plus the last tweaks to the silk screen. The last step is usually confirming that ERC and DRC are still error-free, and then printing off a sample of the board layout at 100% to check the final size. Seeing the board printed in actual size gives me a better impression of the size, even if I already know how big e.g. a 2” x 2” board is.

I will then place the PCB order and mark the last Gerber version with a tag in my Eagle project folder so that I can see later that this was the file version I sent off for manufacturing.

Project files: Little helpers – Ground Loop Breaker

One more little helper for you guys :) Once again, not exactly a major effort with this one, but I hope it is still useful.

What is it?
It’s a Ground Loop Breaker as described in this article by Rod Elliot on grounding/earthing of audio equipment.

How big is the board?
The board measures 2.0″ x 2.0″ (app. 51 x 51 mm.) This is my new semi-official standard for modular circuits like this and will allow stacking of boards :)

What is the status of the boards?
The board is version 1.1 as I had to replace the original bridge rectifier with a different footprint.

Does it use any special/expensive/hard-to-find parts?

Anything else I need to know?

  • Read the article and follow the recommendations on connections.
  • The rectifier bridge should be in a so-called GBPC-W package with wire leads. The rating should be 25A or higher and both the bridge and the capacitor should be rated for at least the mains voltage where you live (so 250VAC/400VDC in 230V countries)
  • The connections on the “ground” side (input) are either via the screw clamp or a couple of FAST-ON tabs. Connections on the “earth” (output) side are either via FAST-ON tabs to a dedicated ground screw or a plated-through hole that can be used to make the chassis connection. The board mounting holes are isolated. Use cables that are as short and thick as possible for all connections.

Download design files here

Related information:
Note: Always read the “intro post” for additional important information about my designs.

Be careful with working with any mains wiring and be sure to ask questions if you are not sure about anything, either in an online forum or to a local electrician (preferred).

Project files: Little helpers – Capacitor boards

Another post in my “little helpers” project series consists of a couple of capacitor boards for mounting input/output capacitors that will not otherwise fit on an amplifier board.

What is it?
Universal boards for (input) capacitor mouting, either for testing purposes or for designs where there is no space to mount a decent-sized capacitor on the main PCB. I made the small board to supplement my P3A clone where adding a large input capacitor would have increased the overall board size quite a bit, so using an off board input cap gives more flexibility. The background for the ridiculously large “MegaMKP”-version you can read in my previous post.

How big are the boards?
This big :)

  • The “normal” board measures 2.0″ x 2.0″ (app. 51 x 51 mm.)
  • The “MegaMKP” board measures 3.95″ x 0.625″ (app. 100 x 16 mm.)

What is the status of the boards?
Both boards are in v1.0, meaning they have been tested and are working.

Does it use any special/expensive/hard-to-find parts?
Well, there’s really nothing on these boards except the capacitors :D

Anything else I need to know?

  • The small board has capacitor mounting for small caps on the top and for larger caps. Max dimensions are approximately:
    • Bottom side mounting: 25 x 38mm axial capacitor (with holes for 33mm long caps as well).
    • Top side mounting: 27mm lead spacing x 15mm thick box cap or app. 20 x 28 mm. axial capacitor.
  • If using the bottom side mounting points, either mount the board upside down on standoffs or don’t use the footprint for the terminal block but solder wires to the board instead.
  • The large board has holes for a various combinations of 2/3/4 large caps. There are screw holes that can be used to mount the boards to the chassis via standoffs so you can use caps as big as you like.

Download design files here

Related information:
Note: Always read the “intro post” for additional important information about my designs.

Audiophile or Idiot?

Some say there is a fine line in DIY audio between rational overengineering and then “audiophile overkill”. This is then on the next line out, between “audiophile overkill” and “plain stupidity” :D

More of less since I started building amplifiers I have been hearing that electrolytic capacitors in the signal path are bad and they sound bad – yet many successful (and great-sounding) amplifiers including the original JLH, the Zen v4, the J-Mo buffer and so on have electrolytics in the signal path, so what is up?

During my recent trip to Japan I found a way to perhaps try and clear up some of this “myth” – in the form of a good offer on some gigantic polypropylene capacitors that I had to jump on. “Cheap” is obviously a wonderfully relative term, but suffice to say that I did not pay anything like what I have seen similar sized caps advertised for elsewhere.

Obviously using these caps present some practical challenges – they are huge! Instead of trying to design a PCB for them, I designed a small PCB to use as the terminals and then mounted the PCB and the caps on an aluminium back plane. With a few different holes the terminal boards will support several different combinations of caps so although I don’t expect to need any more, it does make for a more versatile design.

The caps alone measure app. 63×115 mm (standard 330ml can for comparison below) and when assembled, each module is roughly 190x180x70mm high. This actually means that with these modules as the output caps, the amplifier circuit itself will have to be fairly compact in order to fit everything into a standard 2U chassis… :) The total capacitance per side is 990uF/250V meaning they should be suitable as output caps for headphone amps down to a load of app. 32 ohms.

Any good suggestions on what these should be used for? :D

Project files: GP-PSUs v2

What is it?
Two boards for general-purpose LM317/LM337 power supplies with two rails, useable for many low-power applications (preamps, buffers, filters etc.). There are two versions, one where the +/- voltage is derived from a single AC-voltage via a voltage-doubler and one where it comes from a traditional dual-AC, two-bridge rectifier circuit.
These boards are effectively an update on the old GP-PSUs and they are based on the triple-PSUs I posted a while ago. In fact they are just the three-rail designs with the third rail removed :D

How big are the boards?
Both board versions measure 3.925″ x 1.8″ (app. 100 x 46 mm.) and they are mechanically interchangeable.

What is the status of the boards?
Both boards are in v1.0. I haven’t actually prototyped these in this format yet, but since they are the same as the three-rail version (which I have tested) I don’t mind publishing them.

Does it use any special/expensive/hard-to-find parts?
Nothing, really. As always with these circuits, you can use standard LM317/337 regulators or splash out on more expensive (low-dropout) types like the LT/LM/LD108x-series. My experiences with the latter parts aren’t the greatest though (instability), so unless your applications require the low-drop capability I’d just as well stick to standard 317/337-types from a reputable source. If your application requires a higher performance PSU than this, you are probably better off looking at entirely different circuits and regulators anyway.

Anything else I need to know?
Yes, pretty much a repeat of what was mentioned for the three-rail circuits:

  • The diameter of the main filter capacitors is 18mm, but the dual footprint means that anything between 10mm and 18mm should be fine.
  • The DIP rectifier bridges exist in versions up to 2A rated current although anything more than 1A can be a bit difficult to find. Realistically though, if you plan on drawing more than 1A from either supply the SK104-type heat sinks are probably going to be a limiting factor anyway.
  • Mounting the regulators and heat sinks is a bit of a faff because there is not much space, especially if the heat sinks are 38mm or taller. My suggestion (as always) is something like this:
    • 1) Loosely assemble the regulator, the isolation components and the heatsink.
    • 2) Mount the combination on the PCB and solder the heatsink in place.
    • 3) Tighten the screw holding the regulator to the heatsink.
    • 4) Solder the regulator in place.

Download design files here

Related information:
Even though the regulators used here are generic types made by many manufacturers, there can be small differences in recommended parts values etc. I suggest you always consult the regulator data sheets from the specific manufacturer.

Note: Always read the “intro post” for additional important information about my designs.

Project files: The J-Mo Headphone Buffer

What is it?
The project files for my version of Richard Murdey’s  J-Mo mk. 2 buffer with gain.

How big are the boards?

  • Amp: 2.45” x 1.975” (app. 62 x 50 mm.)
  • PSU: 2.35” x 1.975” (app. 60 x 50 mm.)

What is the status of the boards?
Both boards are version 1.0, meaning I have prototyped them and they work. However, I am still waiting for some mechanical parts for my own build so this isn’t final yet which means I have only done very basic tests.

Does it use any special/expensive/hard-to-find parts?
Well, the J-FETs are getting harder and harder to find but it isn’t impossible yet.

Anything else I need to know?

  • Can’t really think of anything. Be sure to read through the article on Richards website though, that contains most of what you need to know.

Download design files here

Related information:
See the original post for some more information and links. There is also a big discussion thread on diyaudio that may be of help.

Note: Always read the “intro post” for additional important information about my designs.

Tiny teaser…

Just a short “teaser” for one of my work-in-progress ideas, a (sort of) universal audio controller based on the ATtiny85 microcontroller (hence the slightly saucy headline…) and the Arduino IDE. It’s not ready yet, but some progress has been made.

The idea was to make something much smaller than the Ampduino and then make a few versions for different purposes. So far the “pipeline” consists of the following:

  • Universal motorpot controller, partly inspired by the controller I did for the Ampduino project.
  • Universal model with all pins broken out, to be used as the “brain” of a preamp or also (in the longer term) to control soft start circuits, clipping indicators, speaker protection circuits etc.
  • RX/TX version for remote control, although the RX-version may end up being something bigger based on a “full-on” ATmega328P like the Ampduino (and the normal Arduino boards).
  • Matching linear PSU if there is no other power supply required for a given circuit (or if a suitable aux-voltage isn’t available).

Current status is that I have hardware prototypes for most of these already (only the Rx remote receiver is missing) but as usual when there’s software involved that takes a bit longer for me to get around to and so I haven’t really tested anything yet. I have bought a couple of development boards for the ATtiny which seem to work well for testing and optimising code (which will be a definite requirement with the ATtiny-chips as they have fewer I/O pins and less memory than the ATmega-series) but I still need to get started on coding in earnest.

As usual there is no real timeframe for finishing these boards, but right now the Scandinavian summer is definitely working in my favour by nearly constantly bringing weather that makes you want to sit inside and code instead of being out and about :D


More JLHs…

Yeah I know, I should probably stop making these at some point :)

We’ll do this one quickly then: Standard JLH1969 Ebay-board with upgraded components and better transistors (MJ15003). Fan-cooled heat sink with temperature control (we’ll see how well that works…). Industrial-grade 10A switching PSU per channel. Monoblock configuration in Modushop GX288 chassis.

The PSUs (Artesyn NLP250) are overkill for this application but they were cheap (surplus items). And besides, more is better – right? Not necessarily here though, because some of these industrial-grade PSUs have a reputation for being extremely noisy at low power output. As a class A amp, the max. current consumption of the JLH should be twice its quiescent current (so app. 2.6A) and each PSU will deliver four times that before the limiter kicks in. Whether this is a real problem here or not I don’t know yet, but there are no audible artifacts at all so I am not overly concerned right now.

The heat sinks were also surplus items and I am not sure exactly what their rating is. At full speed the fans are a bit too noisy for my liking (the heat sinks add some flow noise as well) but if the fan speed is lowered a little I don’t think it would be really noticeable once the amps are seated in a rack. For the time being I have installed some small temperature speed control boards for the fans (hence the somewhat messy wiring) but depending on how well that works and how hot the amplifiers get, I may go back to fixed resistors. The PSU already has a dedicated 12V fan output so the resistor doesn’t need to drop a lot of power.

The heat sinks had a cutout in the side that was just too narrow for the angle brackets to fit into. The best solution would have been to mill the ends of the brackets to fit the cutout so there is only one contact surface. Unfortunately I don’t have access to a mill anymore so I had to find another solution: A copper “heat slug” to fill the gap. Just a piece of copper bar in the right thickness cut to size and with thermal grease on both sides and that should provide the best possible thermal transfer under the circumstances.

So, will I stop building these amps? Erm, no! :D I am out of the ebay-boards but I do however still have my own version of the 1969 JLH that isn’t cased up yet. This build has given me some inspiration for how I can build that into small monoblocks so while it might take a while to do at least I know what parts to keep my eye out for :)

Cloning a classic…

I have been looking at class AB amp designs for a while, trying to find a “compromise” between my low-power (but very large) class A and high-power (and compact) class D builds. For some reason very few among the class AB designs managed to “stand out” to me with the right combination of simplicity, compactness and reputation. It’s not that I really had anything specific in mind, I just kept looking at stuff and thinking “naah, that’s not what I want” :)

However, one design that did keep cropping up was Rod Elliot’s “Project 3A” (or just “P3A” for short). This is a discrete amplifier with a reasonable power level for normal use and a very simple design. There’s plenty of evidence out there to support that the performance is good and even a way threads to evolve the design (search the “solid state” forum on diyaudio.com)

Rod sells PCBs for the P3A and that would of course have been the easy route, but because I had a specific form factor in mind I decided to “roll my own” :) The end result is app. 70mm square (flat mounting on a 75mm heatsink were one of the key design criteria) and quite compact. My only concession over the original is that I removed the input capacitor. Well, I didn’t actually remove it on this version since there is space for a bipolar electrolytic from Muse or Blackgate, but the main version is intended for having the input cap off-board.

As I wanted a matching power supply I “recycled” the last Gainclone PSU I did but added a second capacitor bank (which just fit on a board that is still constrained by me using the free version of Eagle). Since the P3A runs on 35V rails it is possible to use 50V capacitors and then a reasonable capacitance is still feasible with this PSU footprint – especially in a dual-mono setup. Of course the board has space for normal 35mm snap-in caps as well, but that’s so boring :D

I have only done this test version of the amp so far and confirmed that it works and that it plays music. (This is also the reason for the transistor pins not being trimmed properly – bias adjustment). That said, I do have a couple of case ideas in mind for this one where the lower heat of a class AB amp will be welcome (or should I say “required”) :D

Back from Japan…

I am now back again (physically at least) from two weeks in Japan. As the trip was a holiday and I could set the pace myself there was plenty of time to explore audio-related stuff :)

My credit card statement tells me I have managed to take full advantage of the fact that there is a good selection of DIY parts shops in both Tokyo and Osaka – and while domestic prices in Japan tend to be lower than where I am that’s easily fixed by simply buying more stuff :D

Special thanks to Pete Millett for providing a useful page of links for where to go shopping. Although I found most of these places on my last trip to Tokyo, Pete’s page has been very useful to me both in Tokyo and Taipei so definitely worth a mention here.

As was the case last year, this year’s expensive souvenir was also a pair of expensive Japanese-made headphones, namely these:



Get every new post delivered to your Inbox.

Join 39 other followers