Sunday, September 24, 2023

Kicad: Making the Switch

Bad news (for me). 

Autodesk's Eagle is the schematic capture/PCB layout application--"Electronics Design Automation" or "EDA"--I've been using forever.  

But starting in 2026 Autodesk wants $749 USD a year for a Fusion 360 integrated version--and I confirmed with their sales team: my existing $100/year Eagle/Fusion 360 license is going away.

Time to say goodbye to Eagle. 

Say Hello to KiCad.


The guys in my geeky synth meetup group have been telling me to use Kicad for years. Now, everyone will be be happy?  

This post captures notes written during my initial exposure to KiCAD 7. 

As usual this blog post is my own trail of breadcrumbs.  If you are thinking of switching to Kicad from another EDA, or are a Kicad newbie like me, the post may be of some use. 

Otherwise, you may want to skip this one.

GET KICAD

$749?  nope. KiCAD is free. Download it here.  

I got the Windows version--not sure how transparent going between OS's will be, cross platform compatibility was poorly implemented in Eagle. Kicad docs say it's transparent; no reason to doubt them. I will try opening PC created projects on Linux and Mac down the road. I had no problem installing it on a few Windows 10 systems.

PROJECTS

Eagle and Kicad allow me to create a "project"; I never used projects in Eagle. Instead, I created a folder using my OS and put Eagle schematics and boards in there--as many schematics and PCB files in a single folder as I wanted; it was easy to have many schematic revisions in a single folder as long as each had a unique filename and the correct file extension....it all worked.

KiCAD is different; it is designed around a single project/single schematic/single board paradigm. However, a single schematic can have "subsheets" (details here--I have not tried subsheets yet).

Creating a new Kicad project creates new helper files and folders, so if I want to create a revised PCB for a given project, or create an additional board (a "revision 2.0" for example) I have to:

  • Use Windows Explorer to create a new folder
  • Copy the original project (.pro), schematic (.sch), and PCB (.pcb) files into the new folder 
  • Rename the project, PCB, and schematic files to a matching filename (with their original .kicad* extensions intact) 
Automating these steps should be easy using something like Python and Powershell. I will look around for a script or macro for this. I'd be surprised if someone hasn't already created a utility for spinning off versions of Kicad projects, but so far I can't find it.

KICAD LIBRARIES: SYMBOLS AND FOOTPRINTS 

Eagle has a devilishly confusing "device/symbol/footprint" paradigm that makes you pick a symbol and footprint while choosing a component for your schematic. Eagle "device libraries" contain all the necessary elements--the symbol, the footprint, and how the two interconnect.

After using Eagle EDA for over 20 years I still find creating and managing custom or modified devices confusing, frustrating, and teeth-gnashingly counterintuitive.

KiCAD is a HUGE improvement--symbols and footprints have their own libraries and each is managed separately. The user has to make sure pins and pads are laid out correctly, but that's the case in Eagle as well. 

For a good primer on Kicad symbol creation the video here; footprint creation here. The same ideas are used to modify existing objects as creating new ones. It's easy!

Elton from OtterMods, the resident KiCAD expert in my synth MeetUp group, suggested creating a custom personal library composed of symbols and footprints to be used over and over. Some are made "from scratch", some are brought in from snapEDA, some from obscure libraries found on the Internet, some are existing KiCAD library objects with minor modifications.

Following Elton's lead, I created, and will maintain, custom Kicad symbol and footprint repos. I have posted that on github; go here and here.

SCHEMATIC CAPTURE

After only using Kicad for a few hours, I found its schematic capture ability (well documented here) to be really easy!  

A few shortcuts proved helpful:

  • A for adding new symbols; basics like resistors and capacitors are in the folder called "devices".  Shortcut: type "C" for a generic cap symbol and "R" for a generic resistor symbol.
  • M for move 
  • D for drag.  This is the same as "moving" in Eagle--you can move a part and the wires won't break.
  • R, X or Y for rotating and mirroring
  • W for wiring; / (slash) changes if you want to allow 90 degree bends in your wiring, 45 degrees, etc.
  • E for modifying a symbol's properties....tap this and a dialog pops up when you can change things like values, display characteristics, fonts, and whatnot--this "E" behavior seems universal to many objects in Kicad. You also see options for changing symbols for your entire schematic through the "E" shortcut.

Right click > change symbol brings up a dialog to replace one symbol with another. This is the same as right click > replace in Eagle.

Synchronizing modified or updated "devices" in Eagle into my design was always cumbersome and confusing. Thank goodness it's much easier in Kicad--edit a custom symbol using the "symbol editor", save, open the schematic, then issue Tools -->update symbols from library. This brings up a dialog where you can find and replace symbols found in the entire schematic or a subset. This synch process has to be done manually; fine with me.

Tools > assign footprints brings up the dialog where you can assign footprints for your symbols. Again I found this pretty straightforward with one space oddity: to make your choices "stick" you have to click the "Apply, Save Schematic and Continue" button after making your edits--just clicking OK won't do it.



Another Kicad feature: You can modify a PCB and have the changes brought back into the schematic.  Tools > update schematic from PCB.  Eagle can't do this.

There are a lot more options and features of course. Thankfully Kicad's documentation is really good--find it here.

LAYING OUT PCB's

Eagle automatically creates a PCB from your schematic; with Kicad, you have to start up the PCB editor then issue the command tools > update schematic from PCB to see footprints.

The PCB creation documentation (here) has a lot of detail, but I found the basics to be pretty easy once I learned some shortcuts:

  • D  drag a part, moving its traces along with it. If a trace turns green during the attempt it means it conflicts with your relocated footprint--edit the conflicting trace and try again. Otherwise--if you don't remember to hit D--the footprint will move but not its traces and you are left with a mess. Is there a way to make D the default behavior?
  • X turns on the "trace route" tool
  • Page up/page down toggles between layers (front and rear copper for instance)
  • V places a Via
  • Alt + 3 shows a 3D view of the PCB (cool!!!)
  • There are many more shortcuts documented here.

right click -- drag from bottom to top selects everything; right click -- drag top to bottom selects only items fully enclosed. Useful! Video here.

To change trace width, it's easy with Eagle--type in "change width 10 mil" or whatever in the uppermost text box then click on a trace that you want to fatten.

A few more steps with Kicad, but still not hard:

In the PCB editor, choose Track: use netclass width > edit predefined sizes.


Next, hit the + below then add some sizes to the dialog. (By the way: 40mm-75mm are really big trace sizes--I was messing around with DRC--you probably want smaller traces...)




Hit OK, now you can dial in the track width you want from the same "Track: use netclass width" when creating traces.




IMPORTING FROM EAGLE

Is it too easy? Just digging into this, but so far:

  • Create a new Kicad project 
  • File > import non-Kicad 
  • Import your Eagle file (project or schematic)
  • Auto match layers in bottom left.

I have done this twice and it appears to work better than expected. However if I went to the imported PCB in Kicad and clicked "update PCB from Schematic" I ended up with a second set of components for the same PCB--so, the import seemed best for importing schematics, choosing footprints, and then doing the PCB layout over again. 

Footprints from the imported Eagle brd are put into a new Kicad footprint library with the Eagle Project as the library name--nice! This makes it easy to grab Eagle symbols to use in Kicad. I found I had to edit the imported footprints sometimes--changing a pad name from "a" to "1", so the design rules checker didn't throw an error but I quickly got the hang of it.

Overall the import from Eagle isn't perfect, but all of this seemed much better than starting from scratch.

Update: 2-25-24; Kicad Version 8 addresses the outstanding issues importing from Eagle. Eagle projects, PCB's, schematics, symbols, and footprints now are imported into Kicad 8 without issue. To use this cool feature, choose file > "import Non-Kicad project" in Kicad, choose "EAGLE project", and open an Eagle schematic. Kicad will create a new folder for your imported Eagle project with a "dot pretty" folder and "dot sym" file containing Kicad versions of the Eagle devices along with an imported schematic, board, and Kicad project file. From here you can copy the footprints and symbols into custom libraries, match footprints to existing 3D images, edit and update your layouts, and all the rest. As someone with a butt-ton of Eagle files that I want to be able to continue access after the 2026 Eagle license increase: this functionality is extremely welcomed. It all works GREAT--i.e., fantastic!

Update 7-20-24  I am indeed doing a ton of Eagle > Kicad imports, so, I created a dedicated post further detailing Kicad 8 imports from Eagle. That post is here.

"LIVE AND LEARN"

....solutions to things I had to figure out, not immediately obvious to me

Changing footprint descriptions; matching a footprint to its 3D image Surprisingly--neither are available via the "e" shortcut. With the footprint open and ready to edit: file > footprint properties. The "General" tab allows you to change the description; "3D Models" lets you select then position 3D images for the footprint. 11-20-23

Changing "drawing sheet" size (the border with title block etc): open schem or PCB > file > page settings. 11-25-23 
 
Creating ground pours: I always forget how to do this...we will start with the front layer:
  • open your PCB 
  • click on this icon:


  • Select F.Cu and GND in the dialog that appears:



  • Draw a rectangle around your entire PCB, doesn't matter where, but make it bigger than your edge cuts
  • Hint: when closing your rectangle right click + "close outline" to complete the rectangle
  • Click B on your keyboard to fill.
  • Run Inspect > Design Rules Checker to make sure the pour is OK.
Repeat the process for the B.cu (bottom layer). 

Cool, but how to turn the damn things off when you want to edit your PCB?
The "toggle your pours on and off" icons are on the left side of the PCB edit screen:




 Good video for this is here2-9-24

Making imported eagle .mod footprints work with Kicad symbols: This is an obvious one that I missed for a few weeks.

Eagle allows you to name footprint pins--for example, "Tip", "Ground", and "Sleeve" for a 3.5mm jack, for instance. 

But! Corresponding Kicad symbols' pins may have numbers, not names; or, pin numbers from Kicad may not match those imported from Eagle. 

Obviously! When importing Eagle devices into Kicad make sure pin numbering corresponds to Kicad's. If it doesn't, edit the imported Eagle footprint so it does.

Kicad symbols often follow a pattern: for instance, for diodes, it's usually 2-anode 1-cathode.  This may not be the case in a footprint you imported from Eagle.   

If there is any doubt open a "factory" symbol in Kicad and note its pin numbers, then, if necessary, edit your eagle imported footprints' pins to match before saving it into your custom footprint library. 5-26-24
 
Constraining lines to H/V/45 degrees: when drawing silkscreen lines for boards for instance, right click as you are drawing and choose "H/V/45".  This constrains the line to Horizontal, Vertical, and 45 degrees. Nice! To undo, right click again and deselect this feature. 5-31-24

Placement Contraint: This assumes Preferences > Preferences >  Schematic Editor (or) Footprint Editor > Grid Display >Snap to Grid is set to "Always" or "when grid is shown":


Use the UI element boxed in red below to constrain line endpoints, parts placements, text locations, etc. 

This setting does not impact the density and frequency of visible cross hatches/dots/lines as you zoom in and out; instead, it determines where by default you can place things.  


Holding down "control" while placing an object overrides this setting.  9-1-24

Importing 3D models into Kicad: Save your 3D file in "STEP", "STP". or ".WRL" format--most 3D software can do this. Then: open the footprint editor in Kicad, choose the footprint that needs a 3D model, then file > footprint preferences > 3D tab. Click the folder icon at the top of the dialog and choose your WRL or STP file you just saved; use the various +/- buttons to scale and position your model. When you're happy, click OK. Good video for this is here 9-14-24

Importing .lib symbol libraries into Kicad: seems Kicad 5.0 (?) used ".lib" as an acceptable extension for a symbol library. If you are importing from the outside world (e.g. the useful library here) you might find 2 files: .dcm and .lib.  Leave .dcm alone but rename the extension of the .lib file to .kicad_sym; open symbol editor in Kicad 7/Kicad 8 > import the library > find the .kicad_sym file > OK  9-30-24

Importing symbols into Kicad: You can't overwrite the symbol libraries that shipped with Kicad, so you'll need to save imported symbols into your own symbol (*.kicad_sym) file. So: create a custom library if you don't already have one or, get my custom symbol library from Github here and add your cool symbols to it.

Then, to import your new symbol: 
  • Extract the contents of the downloaded *.zip file if needed.
  • In KiCad, go to Preferences.
  • Click on Manage Symbol Libraries.
  • On the Global Libraries tab, click on Browse Libraries (the small folder icon)
  • Select the .kicad_sym file, then click Open.
  • The library will appear, click OK.
  • Click on Symbol Editor.
  • Type on the filter search field, and navigate to the symbol you imported.
  • Double-click it to open the file.
  • Edit the symbol if needed 
  • File > symbol properties > footprint and assign the symbol a default footprint
  • File > save copy as  
  • Save the new symbol into your custom symbol library.   10-28-24

OUTRO: GERBERS n' PCBWAY 

In case you haven't noticed by now, Kicad kicks Eagle's butt. Small wonder Autodesk is moving on.

After a few evenings with Kicad, I feel I know enough to create a baptism-by-fire schematic and PCB. Probably a retread of something I made in Eagle? Why not....coming soon.  

HA!!--it works--"KicADSR".  My first Euro module created with Kicad. Post is here.

Not that kinda gerber....

....I checked out a Kicad gerber creation how-to on my sponsor PCBWAY's site--here.  

Check that! Shout out to Serene at PCBWAY, she told me I could get PCBWAY's add-on for Kicad--for uploading designs to PCBWAY for fabrication using a single click. 

Instructions for setting up the plug-in are here.  

A useful video going over other cool Kicad add-ons is here.

After installation the plug-in made uploading files to PCBWAY a breeze: I logged into the PCBWAY website, ran Kicad, opened the test PCB, the in Kicad went to tools > plug-in > "PCBWAY Plug-in for Kicad".   

This gerber-ized my file and everything looked to be good to go.

Finally I picked which color PCB I wanted, how many I wanted fabricated, any a few other options; then hit "add to cart".....

Enough for now, this is getting to be long post. Much more KiCAD on the way. Don't breathe the fumes....  


4 comments:

  1. I have just started on the same journey from easyEda to Kicad 7. So far it has been easier than I expected, though I found selecting a via with V a little frustrating until I got the sequence right. EasyEda was a simple tap of the spacebar. For versioning, I am using git version control, which avoids multiple folders and copies. You can also push your work to the cloud as well on github or gitlab. I use gitlab. Here are some short tutorials https://www.youtube.com/watch?v=YCKeqBlQyJQ&list=PLn6004q9oeqEwmWBugy04WfmDpkLn4PIn

    ReplyDelete
    Replies
    1. Looks like version 8 has git support built in. Cool!

      Delete
  2. I think it might of been pulled from the release as I can't see it. It was shown at the Fosdem presentation, but now it is gone.

    ReplyDelete
    Replies
    1. Here's a plugin for Kicad GIT. Haven't tried it yet. https://github.com/adamws/kicad-git

      Delete

Rotary Encoder Expermenter's Board: Improving the Hardware

Quick one this time....I have posted a few projects lately that incorporated a Raspberry Pi Pico, rotary encoder, and .96" OLED:  here ...