KiCAD PCB design tutorial

Anything not related to a specific project.

KiCAD PCB design tutorial

Postby brian » Wed Mar 09, 2011 7:49 pm

I know a lot of folks use Eagle here including Ian I think, but hope some of you will give KiCAD a try.

It is a bit different than Eagle, but I like several things it does more than how Eagle works. More over there are no limits on how many schematic sheets you can have or how big the board can be. There is an autorouter that is web based that gives very nice results, and most SMD parts have footprints (modules) already so you mostly just need to give labels to parts.

When I was learning KiCAD I didn't really like the tutorials I found, so I wrote one... I don't know how much better it is than the existing ones but here it is:

http://teholabs.com/knowledge/kicad.html

Open hardware should ideally use open tools to be created, so that there are no restrictions on the source files.
Last edited by brian on Wed Mar 09, 2011 9:12 pm, edited 1 time in total.
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby arhi » Wed Mar 09, 2011 8:48 pm

Simple design flow in my case goes like this:

1. draw schematic
2. click on button and schematic net is sent to pcb capture program
3. draw pcb
4. make changes while drawing pcb (for e.g. switch some pins)
5. click on a button to send this changes from pcb to schematic capture
6. continue working on pcb
7. add something to schematic
8. click on a button to send changes to pcb
9. continue working on pcb
10. export pcb as excellon and send to manufacturer

now, if there is a way for kicad to do the step 2, step 5 and step 8 without me having to redo the whole work manually, please explain how and I might try it again, but last time I tested it I decided that "if it was not free, no one would ever use it".

One other question, does it still offer 150pin packages when you have a 2pin device?
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2105
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Re: KiCAD PCB design tutorial

Postby brian » Wed Mar 09, 2011 9:02 pm

You can easily change the schematic and have the PCB update. You just change anything you want and save the netlist then use the read net dialog to update the parts. Of course if you change the symbols you have to go to PCBCV to assign footprints.

Making changes that violate the netlist in the layout and making that into a netlist is not possible, as far as I know (5). Supporting this could easily lead to wiring error becoming schematic errors, I think this is a conscious choice from the designers.

You can wire the PCB however you want of course and place things that aren't in the schematic if you like, but I don't know how to back import that into the schematic. Really there is no reason to do it like that. If you want to add a part or rewire a module you just do it in the schematic. I tend to place standoffs in the PCB as floating modules but that is about it.

For your last question I assume you mean in PCBCV? That it offers you all the footprints? Yes if you have it list all, if you make your part so that it is limited in associations then list becomes short. For instance a resistor will just return SMD805, SMD1206, etc. in filtered mode. Is that what you were asking? If you want your symbol to be filtered you just need to look in the library file to see how to code that.

Eagle isn't as nice because you have to make a part for everything, the freedom to associate modules independently of symbols is very useful, as I show in the tutorial, there is no need to make a new symbol for every flavor of header, just a footprint (module).
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby arhi » Wed Mar 09, 2011 10:07 pm

don't get me wrong, I'd really like to use open source program for my electronics work... especially one that does not require me to run wine nor virtual box as all my computers at home are running linux ..

but .. the "will violate" is the part I don't like. For e.g. you have a simple schematic
- connector1 (vin, gnd)
- capacitor1 (vin, gnd)
- 7805 (vin, gnd, vout)
- capacitor2 (vout, gnd)
- capactiro3 (vout, gnd)
- connector2 (vout, gnd)

you push that to pcb (now take into account that eagle and any other app here require single click, kicad require you to execute few really not intuitive actions) and you design your pcb...

All up to this point works with kicad. Maybe not as fast and not as intuitive as with other packages but it "almost works". But..

now, you decide you want to use BA05T instead of 7805 because you heard it has lower drop then 7805, you go to schematic editor, you remove 7805 and instead you place BA05T.

From this point I expect few clicks (eagle, protel, pcad, altium, proteus and every other "for money" system handles this with a single click) to make this change on the PCB. Of course I do not expect pcb to automatically place the new IC where the old was but I expect it to be available for positioning and to be correctly linked to vin, gnd and vout.

Again, I mentioned few times, the package is very un-intuitive .. maybe this task can be done "fairly easy" but I was unable to do it. Can you add this to your manual as this is the no1 thing I want from any schematic+pcb capture software. The pcb->sch is not that important (while it is VERY useful, as it is much easier to change on the PCB layout if you want NETx to be connected to U1A-input and NETy to be connected to U1B-input, and not other way around as it was designed on the schematic because it will make your routing much easier - and since you are doing the routing it is normal to do it in the PCB capture app and back annotate to SCH capture from it). I tried both kicad and gschem, pcb and everything else that comes with linux and has to do with electronics, and it's just tooooooooooooooo slow, requires too many clicks and too much typing to get basic tasks done. They are all together below the level where PCAD was 15-20 years ago. I find TANGO for DOS better then all linux geda packages combined .. and I will be incredibly happy if someone can prove me wrong and show me how I can use native, free, open source application on linux and not lose my nerves every time I want to rotate a resistor.
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2105
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Re: KiCAD PCB design tutorial

Postby brian » Wed Mar 09, 2011 11:01 pm

Maybe when you last used KiCAD it was a lot different. I had more trouble with Eagle making parts than KiCAD.

I don't loose my nerves hitting 'r' to rotate a part. That doesn't seem unintuitive to me nor complex. What doesn't have a shortcut key like that is always in the right click menu.

Placing parts is super easy:
'a' 'c' enter gives you a cap left click to place it...


You can to change 7805 to another LDO once done your board once?

No problem: hover and hit delete, hit 'a' browse for the one you want place and wire for the new pinout, save and reimport. Only that one module will appear on the PCB and you just move it.

I really don't see anything unintuitive. Maybe it was worse in the past when you used it. I tried to use gschem also once, but found it horrifically bad, and written in such a way that only a GNU programmer could love it...

KiCAD took me less time to learn than Eagle did, and was set up more logically. Having to choose a footprint in the schematic is very annoying, because you might want to use the same schematic for both a PHY and a SMD version for parts that come in both ways. Maybe I never became an Eagle super user and that is easy to fix but the disconnect though pcbCV between symbols and footprints is really nice for designs that source different comp. To make the schematic all you need is the logical data for what the parts should be like.
Last edited by brian on Wed Mar 09, 2011 11:21 pm, edited 1 time in total.
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby brian » Wed Mar 09, 2011 11:18 pm

Explicitly to change a part say swap an LDO for another.

If the LDO is the same pinout/footprint, do nothing but change the label for the symbol in the schematic. To do this hit 'e' or right click and go to edit to change the symbol text fields.

If the LDO has a different pinout:
Delete the old LDO
place the new one: 'a', browse for the symbol, place the part
wire it correctly
hit the annotation button to assign the label (U1 etc, or add it yourself with the same label the old one had)
save the netlist

assign a footprint using pcbCV (3 clicks)
save netlist

read netlist in PCBnew
move part
layout traces for it however you like (airline will show for current routing trace and pins have the net names in them)

That might look like a lot of steps but I would say it takes under 60s to perform. The only thing extra here is the export/import between each sub program... I don't find the 4 extra clicks all that annoying frankly.

Also if you are more visual you can see this basically here:
http://store.curiousinventor.com/guides ... hange_part

I cover making parts and symbols more than that tutorial though as I think that is an essential skill.
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby ian » Thu Mar 10, 2011 3:02 am

now, if there is a way for kicad to do the step 2, step 5 and step 8 without me having to redo the whole work manually, please explain how and I might try it again, but last time I tested it I decided that "if it was not free, no one would ever use it".


I would also prefer to use kicad, and this is an interesting and important topic to me. Honestly I agree with arhi though, I feel like it doesn't fit my workflow.

I tried the old kicad years ago for a long narrow PCB that wouldn't fit in eagle. It was quite difficult for me to use.

I tried the new one recently because I need to view a schematic in it. It was _much_ nicer, but I don't like it because of the non-fluid workflow.

I have been told (several times) that the proper way to do a board is to complete the schematic, build the net list, route the board. Kicad, at least when I last used it, enforces this workflow. Well, I don't wanna do it proper, and I'm a spatial thinker and need to see how parts relate before I assign pins :) Especially on flexible devices like PICs with PPS, FPGAs, and CPLDs, but also every device. I make changes late in the game, and I like to set values and part numbers on either the PCB or CCT and have it back-annotated.

Edit: making changes to existing designs is a point of open source, and I feel like that is not intuitive for a complete novice in kicad.

In my opinion, none of these are particularly difficult features to add programatically. You already have a parser for both formats, just find the part and update it in both files. Not that I'm volunteering my time :)

I really want to use kicad, and have flirted with it several times, but I feel stuck with eagle for now. Hopefully that will change, and I'd be willing to get behind it in hopes of improving it, but only if the super annoying stuff is fixed first :) For hobby it might be passable, but for semi-pro it needs to be better before I'd adopt it here and force our workshop to use it.
User avatar
ian
Crew
Crew
 
Posts: 10499
Joined: Mon Jul 06, 2009 6:14 am

Re: KiCAD PCB design tutorial

Postby brian » Thu Mar 10, 2011 4:11 am

I agree it isn't perfect Ian. I kind of feel like if Eagle becomes the choice of the open hardware people they won't spend time developing KiCAD, if on the other hand there are lots of software people who dabble in hardware and KiCAD is the goto choice then they will be able to improve KiCAD. I am a hardware person who dabbles in software not the other way around so I can't really fix the workflow types of things in KiCAD...

The way I design the workflow isn't a big deal... I don't know.

I get your point on CPLDs for having the back import feature, I can see the use there, for regular fixed function parts I don't see the need.

What I do which might make my schematics less clean is make the symbols look like the parts. That is I don't lump port A which might be on all 4 sides of LQFP into sequential order, that way I can see all that pin stuff on the schematic, then I use labels over wires extensively to keep it from being messy. So in the end my schematics are a bit harder to read and look more like the board I guess.

I honestly didn't find KiCAD much harder to learn than Eagle. I learned them 3 months apart roughly. I did only 2 projects in Eagle before moving on.

I am not an open source zealot even, I just think Eagle isn't that good a tool and people will run into 2 layer and board size limits and be stuck. If I commit too much time to Eagle then when I want to do a 4-layer board I will be faced with a bad choice.

I don't know how much you have tried it Ian but if it isn't a lot maybe try doing a full version of BusPirate in it once or twice, and see if it is just not what you are used to... Or not. It is okay if I am the only KiCAD user in the world :-) But if anyone wants to learn it I am happy to help out.
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby ian » Thu Mar 10, 2011 4:31 am

I totally agree, and i would prefer to use it. I have in the past tried to hire programmers to implement the features we'd need to use it. It is very hard to find serious programmers who can jump into an existing project like that at a price we can afford :)
User avatar
ian
Crew
Crew
 
Posts: 10499
Joined: Mon Jul 06, 2009 6:14 am

Re: KiCAD PCB design tutorial

Postby brian » Thu Mar 10, 2011 4:51 am

Probably some university (undergrads) would be the people to get, there are a ton of programing wizards that put me to shame. I may almost have my PhD but it isn't in software...
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby arhi » Thu Mar 10, 2011 6:53 am

brian, I'm not 100% sure why you compare it to Eagle (I don't use Eagle if I don't have to as it is almost as bad as KiCad, feel free to compare it to applications that are 20 years old like protel or pcad or tango and that had proper - fluid work flow 20 years ago, or compare it to currently available altium designer, proteus ..) but the whole "proper" thing is the major hassle with KiCad (and other eda tools on linux). It's not only fpga, it's also cpld and dspic and if you say "yeah but those are only small portion of .." a simple 74hct14 has six invertors. I don't know during schematic capture if it is better to use first or third module from 74hct14 - this I want to be able to easily swap on pcb and then back annotate to schematic. Same with dual or quad op-amps, darlington packs (think ULN2003) etc etc ... saying the "proper" way to do is to think about it in advance and properly link it in schematic is something that can only drive ppl away from the package. Also making parts look like packages in schematic makes the whole schematic capture useless ?! Then you can draw your circuit in the pcb capture program directly, why you bother with schematic at all ?

I will give kicad another chance .. I'm just starting another project and I'll try to do it in kicad, it uses only standard parts so no part making should be necessary ... let's see if it got any better .. 2010-05-09 BZR 2366-stable is the version I have .. if there's anything "newer" lemme know.
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2105
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Re: KiCAD PCB design tutorial

Postby brian » Thu Mar 10, 2011 7:27 am

The reason I compare it to Eagle is I am poor and I can't pay 5000 dollars for Altium. Protel, pcad etc don't exist anymore. Cadence and Mentor graphic solutions aren't cheap enough either.

Making symbols look more like parts doesn't make schematic capture useless, because you can still have blocks right? That is you can build a bit that does power regulation all the pins face as they would on the actual part. So schematic capture isn't worthless with that approach. I was just suggesting it if you really need to see the layout for some reason. If you don't by all means make the parts look more logically oriented. But if you are going to make an FPGA there is no reason not to have the pins in the chip order really since as pointed out they are mostly configurable.

I now use 2010-12-06 2368 on one machine but I think that is the version on my other box. I am sure it doesn't hold a candle to Protel/Altium, but if you can't pay 5000 dollars and you want more than 2 layers and want to sell something it is the only sane choice I know of at the moment.

BTW I don't want to fight over KiCAD. I just think there is merit to using it and your initial comment that basically: don't waste your time is sucks wasn't very helpful for users who don't have money to spend on Altium. They have a choice between Eagle, KiCAD and gEDA really. Of those my opinion that the least bad all things considered is KiCAD.

I just wrote the tutorial because I felt the tutorial I read to learn KiCAD was insanely condescending in how it was written. I also felt it covered the basics in an awkward way and didn't cover important parts like making a footprint in the main text. There are more than a few KiCAD tutorials out there already.
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby arhi » Thu Mar 10, 2011 9:20 am

wrt $5000 price tag on the commercial packages, proteus without simulation packages is 650$ (autorouter included, no autoplacer, 2000 pin netlist capacity (or 250$ with 500pin netlist capacity) .. the thousands you pay for integrated analog and digital simulation... same with altium ..

wrt "Making symbols look more like parts doesn't make schematic capture useless", sorry, I was not precise enough, it is completely useless in my opinion for the way my process from project in my head to pcb in my hand works.

wrt "doesn't hold candle" - it's not the 1:1 comparison really, it is expected for package that exist for decades (like protel/altium - as altium purchased bunch of small companies, tango, pcad, protel ..) to have database of "almost all parts in existence" and gui that is super polished after decades of user feedback .. what I compare is actually a work flow. If you look at all these "systems" that exist for so many decades they all have pretty much same work flow. They used the feedback and integrated all the good parts of all the programs they integrated and "it really works" - it is smooth and intuitive and when you turn on altium or proteus or any other big "system" without a day of training you start working.... now KiCad, gEDA and (co) decided to introduce "new" flow, they one normal to "them" .. forcing user to follow work flow they think is best ?!?! The only real problem I have with kicad is flow. I will make all the parts I use, no problem .. but the flow ..

I am not the only one who thinks like this ... some 15-16 months ago I tried with some friends (huge local forum, some 10 countries worth of ppl speaking same/similar language, some ~2000 electronics users) to find a viable alternative for stolen software. I'm constantly nag ppl how downloading torrents is stealing and that if they really need some software they should pay for it and that there are open source alternatives that are good enough for hobby use. I also really wanted to stop using DOS version of schematic/pcb capture application and move to something that will work natively on Linux. We made a "action team" of 20 ppl and we tested bunch of applications that are free and that are cheap. Amongst them eagle, kicad, geda .. Finally all of them (including eagle) were declared useless. The limitations you get from Eagle requires you purchase licence. For the same amount Eagle sells you licence you can purchase Proteus that is many times better. The best free system was declared to be http://www.designspark.com/pcb ... I have not tried it myself as it is widows application but ppl said it is really "best free system out there", it can also import eagle projects, I'm not sure if it can export them too ... now it was over a year ago .. both geda and kicad improved in the meantime..

Of course, it all has nothing to do with you, you just wrote a great tutorial and shared it with the World. That is GREAT, and I thank you for it... I will use it to go trough kicad again and see if some of the major problems are solved.. ... You didn't design that work flow nor you are the one that can change it .. I'm just letting off some steam .. don't take it personally... I just feel so freaking frustrated that I have usable replacement for every single task I do except for my hobby - electronics - where a DOS box is better suited then a ncore terabyte ung bung machine with linux :( .. and I see great developers inventing hot water with kicad and geda :(
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2105
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Re: KiCAD PCB design tutorial

Postby brian » Thu Mar 10, 2011 10:07 am

Oh I don't know about proteus... Altium designer is 5000 dollars though :-(

Dave at eevBlog mentioned designspark and I don't mind windows tools but when I looked at the website there wasn't enough documentation to make me want to download/register it.

I mean on some level I agree with you that KiCAD isn't intuitive. If it were I wouldn't feel the need to write a tutorial, I guess I just feel it is the least sucky of sucky unintuitive software and I refuse to steal any software. :-)

I appreciate your comments and wasn't offended don't worry! :-) I don't always write clearly though. Some people say I write really terse things that sound like I am angry but I pretty much never am.
brian
Sr. Member
Sr. Member
 
Posts: 445
Joined: Sun Nov 14, 2010 12:27 am

Re: KiCAD PCB design tutorial

Postby arhi » Thu Mar 10, 2011 10:24 am

If I remember correctly Altium also have "options" - you can chose to get some pieces and not to get some other. Proteus is also 5000 when you get all options. Don't forget that altium also have some simulation stuff, fpga development stuff etc etc .. all that is expensive and lot of ppl don't need it.

Anyhow .. the designspark - donno, I have not tried it out, I really have no stomach for windows, but I hear many good words about it .. so you can try it out and spend few hours with it then decide to throw it away or stick with it. It is free but note that it is not open source!
User avatar
arhi
Hero Member
Hero Member
 
Posts: 2105
Joined: Thu Jun 24, 2010 11:41 am
Location: Belgrade, Serbia

Next

Return to General discussion