Any KiCAD users out there?

Started by R O Tiree, February 18, 2018, 07:56:18 AM

Previous topic - Next topic

R O Tiree

I've just started exploring KiCAD and it occurs to me that there are lots of "gotchas" that aren't very well documented.

For example, I was able to design a PCB footprint for a 3PDT switch very quickly.  Clicked on the button in the top row that said "Create new library and save current footprint".  All was well and good, I thought, because the file was duly created in the new directory on my hard drive that I had specified.  I could see it, right there, in File Explorer!  Could I find it later, when I flipped back to PCBnew?  Could I hell... So, back to the manual... about 4 pages after it tells you how to save your shiny new footprint in your own library, it only then mentions that there's a library manager that requires you to provide paths to your own libraries for KiCAD to be able look things up so you can use them.  It also doesn't tell you in that chapter that access to its own, native, footprints directory is prohibited, by design, so you can't "cheat" and save them in there - that's implicitly stated elsewhere in the manual (a long way away).  How much simpler would it have been to include a note (in bold?) in the manual, such as, "NB - You won't be able to see or use your new footprints until you enter the correct path(s) and library name(s) into Footprint Libraries Manager - see section 12.11"

Several of these "gotchas" have made me hit walls of varying thickness and material.  Some have been like a small pile of pillows, easy to resolve.  Some, like this one above, have been made of fairly solid brick and had me stumped for a good few hours.

Another one was the "POWER_FLAG" requirement in the EeSchema section of this suite.  I'm still not absolutely sure exactly what I did to get a clean ERC run.  I guess I'll find that out when I capture a new schem?

Another one from PCBnew was when I had a 2-sided board and decided to move a component 100-thou to the right, so that an IC pin had a more "solid" thermal connection to the GND plane.  This left 2 neat little holes in said GND plane, which was not what I really wanted to achieve.  Firstly, I tried deleting it... That's when I found that, when deleting something, hold down Shift+Ctrl and then draw a box around it with your mouse that completely encloses the item you're trying to delete.  It's important that you un-click everything other than "Filled zones", otherwise you'll end up deleting some or all of your components off the board... oops.  Ctrl+Z FTW, there.  Then you have to remember to re-click other classes when you want to get rid of something other than filled zones...  "There must be some way of filling in those holes without deleting and re-drawing the entire plane again?" thinks I... Again, it took a fair while to realise that if I hovered the mouse pointer over the hatchmarks at the edge of the plane, then I could hit "B" to "Fill/Re-fill Zone".  This is completely different to the way that a lot of graphics programs like PaintShopPro behave - with that program, you select "fill" and then stick your pointer in the middle of the area you're trying to flood, then click.  Once you understand that this suite doesn't behave like a lot of programs you might have used in the past, then it becomes quite easy, once you get the knack of it.

I'm sure that members who are well-used to working with "grown-up" CAD packages are thinking that, actually, KiCAD is quite "normal" in the behaviours I've mentioned above and, don't get me wrong, I'm really enjoying the "wins" when I figure things out and my work-rate increases, but it strikes me that I gave up on Eagle because the learning curve was very steep and step-by-step instructions were hard to come by.

So, if members are interested in documenting their own experiences of their own "walls" that they hit while learning this package and its vagaries, maybe they could post them here, so that KiCAD noobs don't end up wasting many hours podging buttons in the hope that SOMETHING... ANYTHING... finally gets the desired results.  Similarly, if people have questions that have not already been answered, then experienced users can provide step-by-step instructions on how to resolve the issues.  Maybe if there's enough interest, we can ask for this to be made a sticky thread, or maybe create a new section for PCB design programs?  As I said, Eagle was just as impenetrable at first blush when I tried to start using it some years ago and I'm sure that DipTrace, ORCAD, etc have their own oddities to contend with, so a new section of the forum might be called for, over time, perhaps?
...you fritter and waste the hours in an off-hand way...

287m

errr, for KICAD guy, we must call the man, Fender3D

Fender3D

You're too polite with me Febri.
Mike I'm happy you solved those quirks with KiCad.

If you copy the "share" folder (under Kicad directory) in another location on your HDisk together with your Kicad projects, then in EEschema go "preferences > Library" and add your custom path in "Current search path list".
You must add 3 folders:
..\share\library
..\share\library\doc
..\share\template

In pcbnew go "Preferences > Library" and add in "User defined search paths":
..\share\modules
..\share\packages3d

then add the same strings in "Current search path list".

This should be enough to work in your "custom" mode.
Then, Kicad has continuous updates, go to your Kicad\share\template folder, open "kicad.pro" with a text editor ( I use ConText, but notepad will work), scroll to "[pcbnew/libraries]" and add your custom path(s) deleting the default existing paths, then scroll until you find "[eeschema/libraries]" and do the same.

Save file and keep a copy in a safe place.
This will make sure your new projects will start with your defaults
When a Kicad update occurs, simply replace the paths in the new "kicad.pro" file and the suite is ready for your new projects with your libraries and such.

This is my actual kicad.pro file for reference:
version=1
last_client=eeschema
[general]
version=1
RootSch=
BoardNm=
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetDir=
LibDir=
NetType=0
[cvpcb/libraries]
EquName1=devcms
[pcbnew]
version=1
PadDrlX=320
PadDimH=600
PadDimV=600
PadForm=1
PadMask=14745599
ViaDiam=450
ViaDril=250
Isol=60
Countlayer=2
Lpiste=170
RouteTo=15
RouteBo=0
TypeVia=3
Segm45=1
Racc45=1
Unite=0
SegFill=1
SegAffG=0
NewAffG=1
PadFill=1
PadAffG=1
PadSNum=1
ModAffC=0
ModAffT=0
PcbAffT=0
SgPcb45=1
TxtPcbV=800
TxtPcbH=600
TxtModV=600
TxtModH=600
TxtModW=120
HPGLnum=1
HPGdiam=15
HPGLSpd=20
HPGLrec=2
HPGLorg=0
GERBmin=15
VEgarde=100
DrawLar=150
EdgeLar=150
TxtLar=120
MSegLar=150
ForPlot=1
WpenSer=10
UserGrX=0,01
UserGrY=0,01
UserGrU=1
DivGrPc=1
TimeOut=600
MaxLnkS=3
ShowRat=0
ShowMRa=1
[pcbnew/libraries]
LibDir=../share/modules;../share/modules/packages3d
LibName1=E:/Kicad Projects/share/modules/fede
LibName2=E:/Kicad Projects/share/modules/connect
LibName3=E:/Kicad Projects/share/modules/discret
LibName4=E:/Kicad Projects/share/modules/pin_array
LibName5=E:/Kicad Projects/share/modules/divers
LibName6=E:/Kicad Projects/share/modules/libcms
LibName7=E:/Kicad Projects/share/modules/display
LibName8=E:/Kicad Projects/share/modules/valves
LibName9=E:/Kicad Projects/share/modules/led
LibName10=E:/Kicad Projects/share/modules/dip_sockets
[eeschema]
version=1
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
RptD_X=0
RptD_Y=100
RptLab=1
SimCmd=
UseNetN=0
LabSize=60
[eeschema/libraries]
LibName1=E:/Kicad Projects/share/library/power
LibName2=E:/Kicad Projects/share/library/device
LibName3=E:/Kicad Projects/share/library/transistors
LibName4=E:/Kicad Projects/share/library/conn
LibName5=E:/Kicad Projects/share/library/linear
LibName6=E:/Kicad Projects/share/library/regul
LibName7=E:/Kicad Projects/share/library/74xx
LibName8=E:/Kicad Projects/share/library/cmos4000
LibName9=E:/Kicad Projects/share/library/adc-dac
LibName10=E:/Kicad Projects/share/library/memory
LibName11=E:/Kicad Projects/share/library/fede
LibName12=E:/Kicad Projects/share/library/special
LibName13=E:/Kicad Projects/share/library/microcontrollers
LibName14=E:/Kicad Projects/share/library/dsp
LibName15=E:/Kicad Projects/share/library/microchip
LibName16=E:/Kicad Projects/share/library/analog_switches
LibName17=E:/Kicad Projects/share/library/motorola
LibName18=E:/Kicad Projects/share/library/texas
LibName19=E:/Kicad Projects/share/library/intel
LibName20=E:/Kicad Projects/share/library/audio
LibName21=E:/Kicad Projects/share/library/interface
LibName22=E:/Kicad Projects/share/library/digital-audio
LibName23=E:/Kicad Projects/share/library/philips
LibName24=E:/Kicad Projects/share/library/display
LibName25=E:/Kicad Projects/share/library/faudio
LibName26=E:/Kicad Projects/share/library/BBD
LibName27=E:/Kicad Projects/share/library/opto
LibName28=E:/Kicad Projects/share/library/atmel
LibName29=E:/Kicad Projects/share/library/contrib
LibName30=E:/Kicad Projects/share/library/valves
"NOT FLAMMABLE" is not a challenge

R O Tiree

Thanks for the tips, Fender3D - most kind.

I take it, then, that as soon as you copy the default libraries and provide the correct paths to the new (duplicate) locations (deleting the old paths?) then you have total access to those categories and can add/subtract/modify to your heart's content?
...you fritter and waste the hours in an off-hand way...

R O Tiree

Is it just me or is the new OpenGL version a bit frustrating?  I have to keep flicking back to the Legacy version of PCBnew to make things work...
...you fritter and waste the hours in an off-hand way...

Fender3D

Quote from: R O Tiree on February 19, 2018, 02:14:17 PM
Thanks for the tips, Fender3D - most kind.

I take it, then, that as soon as you copy the default libraries and provide the correct paths to the new (duplicate) locations (deleting the old paths?) then you have total access to those categories and can add/subtract/modify to your heart's content?
Yes,
it's not mandatory to delete the old paths, it is useful when you have custom and stock libraries with the same names:
the first occurring in the "Preferences > Library > footprint library files" list will be the module placed in your design... and usually you'll never know what module you're using or need to modify...
Again this is a must, especially when you install a new update and don't wanna re-set all your old projects in order to match your modules.
"NOT FLAMMABLE" is not a challenge

R O Tiree

OK, thanks for the clarification of the hierarchy - I hadn't appreciated that bit.

I'm not too impressed by the "stock" footprints, really.  They're a bit bland and ambiguous (tantalum cap, for example) or completely in-yer-face and distracting (electro caps), for me anyway.  I've either designed my own that do the job, including the 3PDT and PCB-mounted 16mm alpha pots (dual and single), or completely re-worked the ones I want to work with most often - resistors (flat and vertical), caps (metal film thin and fat, ceramic 0.1" pitch, AL and Tant, various sizes and pitches), diodes (flat and vertical), trannies, LEDs, etc.  I've transferred all the item descriptions from the F.Fab layer to Eco1 and then hide it by default.  If I click on it, then I can read the status bar at the bottom to find out precisely what footprint it is - I don't need that (or Val**) cluttering things up.

There also needs to be a gubmint health warning on multi-pin devices... We tend to talk about transistors like 2N3904 as "CBE", looking at them top to bottom, flat face to the right, pins away from you, because that's the way we think of them on a schematic... but datasheets tend to number the pins 1, 2, 3 reading from left to right.  That means pin 3 is Collector, etc.  Oops.  But then some of the pots I found in the library had the pins labelled 1, 2, 3, reading right to left, whereas we tend to think of them as "1" (very quiet, CCW), "2" (wiper), "3" (FULLY LOUD, CW), so the other way around.  That's not confusing, is it?

Bottom line, I may dip into the main library for the odd weird component from time to time, but it strikes me that, by the time I've trawled through the footprint library looking for something similar, I could have just as quickly slapped down a few pads on a 100-mil grid, numbered them and drawn an outline on F.Silk then saved it.  I went through exactly that exercise a few nights ago, looking for a suitable footprint for an RGB LED.  None of the examples were precisely what I was looking for, so I very quickly loaded up my own, basic LED footprint, copied and placed 2 more round pads, moved the square pad to position 2, re-numbered, placed a little bit of F.Silk text to say "RCBG" (pin2 = common cathode and "G" and "B" are the "wrong" way around on this one) and saved it.  2 minutes work, compared with about 8 or 9, maybe, searching the library before that.  That said, it's a matter of personal taste and whether one has the willingness to expend the time and/or the inclination to make it "pretty". (See what I did there?)
...you fritter and waste the hours in an off-hand way...