Laying out my first board (with KiCAD)

What a royal mess!

I just got the netlist imported and all the parts moved into something like functional groups.

I’ve played with a couple silly little demos, so I decided I’d try to do something real.

1 Like

I printed the top copper layer to compare with the real parts to see if I have anything like the right footprints selected.

It looks like you are using the legacy canvas, i suggest you the opengl canvas, it is
lot better for routing the board, you have access for the opengl canvas clicking F11
in your keyboard.

It looks to me like you’re off to a reasonable start. You’re entering the realm where your task becomes more art than science. (Of course, the intersection of art and science is known as engineering.)

If I was in your shoes I’d go to the “Edge Cuts” layer and mark out the tentative outline. Sometimes the outline is rigidly defined before layout begins, and in many cases it has at least one not-to-exceed dimension. Locations of connectors, switches and controls are sometimes specified even if the outline dimensions aren’t. Even if there are no particular size constraints I set down an outline that I think is a reasonable size. Having the outline in place helps my spatial perception of how things are related to each other.

You know that those white (or light gray) lines are called the “ratsnest” and represent the electrical connections that need to be made. Even a very simple, straightforward circuit can look very formidable and intimidating at this stage of the process. You’re doing well to sort components into functional groups. Try pulling those groups off by themselves and look for a reasonable physical arrangement within the group. This means rotating the components and shoving them around (up, down, right, and left) to minimize the number of places where white lines cross each other within the group. It’ll be difficult to train your eyes to ignore the white lines flying all over the display to other groups, but that’s what you need to do. Don’t worry too much about packing the parts into their final relative positions - observations such as “it looks like this resistor wants to be placed on the collector side of the transistor package” are what you’re after. You’ll also discover some synergies, such as “if I place the capacitor near this corner of the IC, I can route the output circuit between the capacitor legs.”. A well-drawn schematic diagram, and the manufacturer’s data sheet for your major components, are sometimes very helpful for discovering efficient parts placements.

As each group falls into a reasonably good arrangement, bring the next group near to it, work out a usable component placement, and then work on the connections between the groups. Shift, rotate, and mirror the groups until you find arrangements that look good. At this point I sometimes place components in their (hopefully) final locations relative to each other and move the whole group to a tentative location within the board outline. I seldom lay down traces on a board before I’ve worked out what looks like a reasonable parts placement for the whole board.

Keep us updated on your progress!

Dale

1 Like

I’ve been using “FreePCB” for years to lay out some pretty complex boards. Decided it was time to learn to use KiCad like a big boy.

Haven’t worried about the “rat lines” except as a rough check that everything is connected. I had a couple things that LOOKED connected in the schematic but found myself wondering “Why is there no connection to Q2’s drain?”

My thought is to get the parts arranged somewhat orderly then draw a box around them. Yes, sometimes I have had a fixed board shape to work from.

Just checked my print against the real parts and the footprints all seem to be correct. Well, I didn’t check ALL the SOT-23’s against all the SOT-23 parts – one should suffice.

Hmm. I think I like the “Legacy” canvas better. Seems easier to navigate. Perhaps I’ll play with the 3, Default, OpenGL and Chairo and decide what they’re good for.

Formidable? It really looked like a mess when all the parts were piled on top of each other. With the schematic open on one monitor and layout on another, I just pressed “M” and picked the first part. Clever how the schematic moves to show you the part you’ve selected. Then said, “This goes in the high-voltage section,” and dragged it over there. (High-voltage in this board is 15v.) Much clicking and dragging and I had the rough design. Working on tidying up the design of the high-voltage section now. Ratlines help see what kind of mess this will become when I start routing.

I WAS going to home-etch this project, but I think it’s too complex for a 1 layer board.

Wonder if I can put some more space around those DPAK FETs to serve as more heat sink.

Oops. This can’t be right. The solder pad is supposed to connect to the drain, not the source of these tiny SOT-23 fets…

Yeah, check the footprint pin order vs the symbol.
And once you got tired of doing that for every device in your design join the atomic parts club with your own custom libs.
:wink:

2 Likes

Yes, carefully check things like SOT-23, as not all map the same.
SO-8 etc tend to be more predictable…

Keep in mind that some vital features like the shove router, are not available in the Legacy.

Same goes the other way around… block select and move are not available in OpenGL.
It’s a mixed bag currently.

[quote=“Torby, post:5, topic:3885, full:true”]
I’ve been using “FreePCB” for years to lay out some pretty complex boards. . . . [/quote] I didn’t mean to fill you with a bunch of information you already knew, but your first post sounded like somebody who was quite new to the task of PCB layout.

[quote] . . . . Haven’t worried about the “rat lines” except as a rough check that everything is connected. I had a couple things that LOOKED connected in the schematic but found myself wondering “Why is there no connection to Q2’s drain?” . . . [/quote] I have had the same experience. In both Eeschema and PCBNew, the “snap to” behavior isn’t as robust as other graphic-oriented applications I have used. In fact, I just spent most of a day locating a place where I had run a track end-to-end across a pad but it was a mil or two off-center and PCBNew did NOT see the track and pad as connected.

[quote] . . . . Well, I didn’t check ALL the SOT-23’s against all the SOT-23 parts – one should suffice . . . . [/quote] A few incarnations ago I learned (the hard way) that there is no standard way to map the elements of a BJT (E, B, C) to the 3 pins of a TO-92 package. I don’t know if SOT-23’s also have that problem, but I always check regardless.

I can usually lay down neater tracks in “OpenGL”, but I spend most of my time in “Legacy”. Too many capabilities (such as using the scroll bars, the ability to “drag” a segment without changing its angular orientation, etc) aren’t available in OpenGL, and it’s annoying to be constantly switching back and forth.

[quote] . . . Formidable? It really looked like a mess when all the parts were piled on top of each other. . . . Much clicking and dragging and I had the rough design. [/quote] There’s a very useful feature for un-globbing the pile of components that results from a newly-imported netlist. Unfortunately, I can never remember where to find it so I end up searching this Forum or the Help files for it.

From the screen-shot I can’t tell how complex your circuit is, but it looks like a single-sided board may be practical.

Look at the DPAK footprint I posted at Pad Holes Under SMT for Heat Sinking and other questions . By creating a copper pour that contacts this footprint (and has the same net-name as the DPAK’s thermal tab) you can make a heatsink region with any regular or irregular shape that’s convenient.

Dale

1 Like

Use Mode:Footprint and then rightclick at empty space to get context menu up…

And now I know the difference between the Q_NMOS_GDS and Q_NMOS_GSD parts

Thanks, Sparky Joan. I’ll try that next time.

Things looking a little better. I think I like the arrangement of parts.

I think I’ll look at dchisholm’s dpack footprint next.

I drew a tentative outline on the Edge.Cuts layer, then moved some things around. How do I get rid of the non unneeded part to the left?

You can manually edit each line segment. I always edit these by endpoint coordinates, to get an exact board size. Also it is important that the outline is exactly complete

…means, the outline needs to connect point to point exactly, not just there about.
Use a larger grid setting to draw the outline segments than you use for placement of the devices… like 0.5 or 1 mm grid.
Then the endpoints will be easy to align over each other.

PS: there is no cut-line tool in case you were wondering… :wink:

I wasn’t getting the drawing object when I right clicked, so I didn’t see the delete and edit functions. Still don’t get them reliably. I have to try a couple times before I manage to right-click the drawing object. In FreePCB, I could start one corner of the board at 0,0. Then I could specify the corners by typing to be (50.0, 0.0) (50.0, 50.0) and (0.0,50.0) and know I’d get 5cm square board. (Also in Inches as we’re afflicted with the measurements of barleycorns here.) Then I could say, put a 3mm mounting hole at xmm, ymm and so on. Can you specify where on the page is the origin, or do you just have to note the location of a corner and add?

I put the bottom left corner at 4.6, 5.0 and figured from there.

Next trick:

There is a relative readout at the bottom of the screen (after startup it’s origin is the same as the absolute coordinate system of kicad).
If you move your mouse pointer where you want to have the relative coordinate system origin and hit [SPACE] it will be ‘reset’ to 0,0 at that point and you get a means to do what you want.

The problem with KiCAD (still)?
There is no way you can put in relative coordinates into position properties for placing devices or drawing elements - they always and only take absolute coordinates. :scream:
And it’s always so that the Y coordinate increases when going down on the screen which for most people is not intuitive. :cry:

How do you specify different trace widths? I only have .250mm in the drop list. For the “High Current” parts, I’d like more like 2 or 3mm. Especially if I’m going to home etch this thing.

(I use “toner transfer” method. Hoping I can reverse print this at 100% to do toner transfer, but that’s a bridge to burn anothr day.)

Time for bed now. Good night

On the top menu bar, click on “Design Rules”. In the box that appears, select the “Global Design Rules” tab. In the bottom half of that window are two tables of values. Fill them in with the trace widths, and via sizes, that you expect to use in your design.

Under the “File” drop-down menu, select “Plot”. Some of the formats (Gerber, PDF, DXF, etc) let you select “Negative Print”.

Dale

p.s. - Yeah, it certainly seems like this kind of thing belongs in a menu called “Setup” or “Configuration” or “Tool Preferences” rather than “Design Rules”.