PCB layout - JHarvey

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: PCB layout

Post by jharvey »

8InchesFlacid wrote:1) Does anyone know how to edit footprints in KiCAD? I want to make a new one for this OEM connector
So some notes about footprints. First read a bit in the help file see pcbnew --> 10 and 11 modedit.

You use modedit to create, modify, and manipulate footprints. I show some I've done in the above thread and they are included in the released KICAD files under the PCBmodules folder. You can either export them or create a new library, I recommend exporting them. This is more portable, and plays nicer with sharing files. I also don't modify the prepackaged files, but I do use them for starting points.

Symbol and footprint editing is not as user friendly as the rest of KICAD. This seems true for most any EDA package out there. I don't know why they like it that way, but they do. So be prepared to have to fumble and experiment with it a bit.
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: PCB layout

Post by AbeFM »

Thanks! I've been putting my editing questions in all the wrong places.

An aside: OMG, that was hell! I made the footprint for the OEM drawing, there was just no good way to do it in under a couple hours. I would alter the grid sizing and move things around, only, the numbers (in metric) aren't very accurate, my guess is it's thinking in english units.

Still, I got something. I don't know (yet) how to combine it with a schematic symbol, which I also have to make.
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: PCB layout

Post by jharvey »

Most of the connecting the symbol and footprint is done in the symbol. The big thing you need to keep in mind at the footprint is the pin naming.

You have several pins, I'd recommend you start the pins in mod edit, the go open the files with your favorite text editor. Much easier to copy paste, and change numbers that way. Once you've finished, you can then re-open the file and it will update your copy in KICAD ram.

When you do the symbol, you can add a footprint field, that will automatically select the footprint when you bring in the netlist. That is how I've linked them so far. There is thing cmp file thing I have to learn about some time.

I haven't found a good way to get it to do metric and nice grid spacing either. I'm sure it can be done, just doesn't jump out to me.

I've added the hall sensor op-amp buffer / filter circuit. I'm looking at the board layout now.
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: PCB layout

Post by AbeFM »

Checking it in a spreadsheet worked, there's a lot you can do with sensible sorting. Since the OEM has one connector, divided into 3 parts, with strange lables 1A, 1B, 1C, 1D....1V, 2A, 2B...-2P or something and 3A-3Z...

Anyway, I had two 3V and no 3Z so at least I caught that, and was able to verify all the pin pairs were alligned. Now I just need to replace the 3 seperate connectors I used in my schematic with one I'm making from this footprint. I'll reread your post and see what I can do. Thanks again for all the help, I know this particular board I'm working on diverges from freeems a bit, but I'm hoping if I can get profficient with this software I can be more help. I guess you already recreated that schematic?

If 13k ohm proves hard to find or expensive, I've been running 12k ohms in my car and it works fine, just pushes the hysterises a bit further (I worked it out once)

BTW: To get a metric layout, I would think you might be able to do it in american units to get whole numbers, then edit the output to reflect it's in metric? I would worry about the hole sizes then,but I guess you could make a script to sort that out. Kinda a pain though.
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: PCB layout

Post by AbeFM »

OMG that was hell hell hell hell hell. Somehow, something got corrupted, to it moved pins 1E & 1F over a little bit.
It moved 1G-1V over some other amount
It moved All the 2's over some amount that seemed suspiciously like mirroring the position of the 2a, but all the others followed it by a displacement, not a mirroring. And there was a tinsy offset

And all the pins were off by 0.0001", no idea why.

So in and out of excel a hundred times. Or rather OO spreadsheet. Things that you may one day find useful:

Save (and import) as space delimited text, with ' (single apostrophy) as the text delimeter, otherwise you have a hell of a time (though it's possible) getting all the quotes back where they go and missing where they don't. Also, don't save "as shown" just in case. Then just remove all the ' with a text editor search&replace or whatever, and you're good to go.

Sure would be nice if there was a "move typed distance". You can set up the grid to to some of that, by box selecting and moving a certain number of steps, too.

Now, back to making a schematic drawing for it or whatever I was supposed to be doing 4 hours ago. After I get some water or something, I haven't stopped this whole time.

[/rant]
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: PCB layout

Post by jharvey »

Wow that sucks. I haven't tried it with a spread sheet yet. I did finally break down and install OO on a box, but I'm not familiar with it yet. I still don't know the extreme basics with it. I've done all my edits with emacs.

Any how, I'm back to laying out a draft of the PCB. I haven't done a PCB layout with KICAD yet, so I might have to ping you about some of the details.
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: PCB layout

Post by AbeFM »

I'd certainly be able to share where I can.

Opening them in excel is kinda a pain, it's not a spreadsheet friendly format. What I've been doing is adding a colom, numbering it, and then I can pretty easily figure out by sorting (lines begining with Po give Position)... Using several steps of undo can bring that back and forth, though a macro would work as well.

I should write something which is like modulus 5 and copies the pin number onto a colom on each section but if I'm too lazy to learn to spell I'm far too lazy for that.
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: PCB layout

Post by jharvey »

Does anyone know of a fairly easy way to pattern a collection of footprints in KICAD? I've layed out the ignition, now I would like to find a way to copy it 6 times changing resistor values as I copy. I don't know how to do this easily.
Any thoughts?

I did a something like this on the schemtic end by making template files, and writing a quick script to copy the template files to the sub pages off of the main page. There has to be a way.
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: PCB layout

Post by AbeFM »

You mean while doing a layout, you laid out one circuit and want to use it again? Er, I thought you could block select and copy, but if not then I think you're right - doing it in excel or with a script might be your fastest answer. I'll mess with it.
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: PCB layout

Post by AbeFM »

It's official, at least, with my install, if going from windows to linux, you need to delete the third line of any sheet, they are of the form:

$Sheet
S number number number number
U number
F0 number number....


Anyway, the U line, like a componant? used throughout with the form:
U 1 1 number

just needs to be removed when loading in linux. It's easy to find since it's the line after whatever one kicad bitches about when you try to load it.. Then everything works fine.
Post Reply