Saturday, July 20, 2024

Kicad 8--Importing Designs From Eagle

 


UPDATE 5-18-25: updated what you read below for Kicad 9.

The "ditch Eagle for Kicad" post is turning into one of my most viewed.  

There, I discussed Kicad Version 7 importing most Eagle data into a new Kicad Project but not all of it. 

Good news! With Kicad greater than V7 all the data needed for a new Kicad project can be imported from Eagle--hugely beneficial for anyone ditching Eagle for Kicad.

I felt the import steps deserved their own post, and if you find this information useful for you even better! 

However, if you have no need to import Eagle data into Kicad your time is arguably better spent watching these guys--have at it.

GETTING STARTED

For this example I imported an EFM Diode Filter from Eagle to Kicad. I decided to call it--unimaginatively--"diode filter".

With the new project name in hand I made copies of the .sch and .brd files I needed to import from Eagle; I left the original Eagle directory content as-is. This step was optional but I felt helped keep things organized.

I created a new directory in my Kicad root folder called "Diode Filter" 

....and a folder inside called "source files from Eagle".  



Then, I pasted the copies of the Eagle .sch and .brd source files into this new directory. 


In the same "Diode Filter" folder I also created a blank directory with the date--"Diode Filter 5-18-25"



LET'S IMPORT!

In Kicad 9 I opened any existing project (didn't matter which one).

file > import non-Kicad Project... > Eagle Project...

I navigated to the original Eagle .sch file and imported.

Kicad asks me for the name of the new Folder: I left clicked what the folder I had just created: "diode filter 5-18-25" then "Select Folder".



Viola, a Kicad schematic! 

Next it was time for Kicad to create a new .kicad_pcb file. Kicad 9 asked me if I wanted to match layers. I was not sure what this meant, so I said "Auto-Match Layers" and then "OK"


Viola!  A PCB!



 
Footprint assignments--needed to match the schematic's symbols to the PCB's footprints--were auto-populated by this import:

 

Finally using alt-tab on my Windows system I navigated to the new PCB and new schematic and saved them. I had all files needed:

These objects could be opened, edited, and the symbols and footprints imported into the new project could be modified and saved into custom libraries.  

So this was all really easy--but some cleanup was still needed.

EDITING SYMBOLS AND FOOTPRINTS 

Kicad's stock footprints and symbols are in a completely different format than Eagle's. But we are importing footprints and symbols--called "Devices" in Eagle, into Kicad.

As mentioned above, Kicad's developers solved this problem by creating a custom library of symbols and footprints for each imported Eagle project. 

This is clever, and works, but, unedited the footprints and to a lesser degree symbols imported from Eagle into Kicad often threw errors and warnings during the Inspection/DRC process when I used Kicad DRC with default constraints.  

Therefore I usually DRC'd the imported sch and brd Kicad Kicad then edited the imported parts:
  • Creating Courtyards.  Footprints imported from Eagle didn't have them but Kicad wants 'em as a best practice. Courtyards for imported footprints have to be created by hand, so what the heck, I edited the imported footprints and added them. Not technically necessary I figure, but, if I copied items from the imported project into new projects I figured courtyards were a good thing to have.
  • Making Eagle fonts Kicad friendly.  Kicad wants footprint fonts to be .8mm or larger.  Imported fonts from Eagle can be smaller. 
  • Easy fix: I edited the footprint with the offending text, selected the text causing DRC issues, hit the magic e key, and changed the font width and height to .8mm or greater.
  • I saved the footprint.  
  • Then, I reimported the updated footprint from its library into the PCB.
  • Silkscreen madness: Eagle allows overlaps of silks and other silkscreening oddities that its default DRC doesn't catch but Kicad's does. 
  • To ameliorate: I edited the footprint, getting rid of or relocating silkscreen artwork that was causing Kicad's DRC to throw errors and warnings. I saved the updated footprint to my custom Kicad footprint library then reimported the updated part into my design. 
  • Pin name Changes: this seems obvious but I missed it at first. 
  • For my own edification: I should never expect pin assignments from Eagle to match much of anything in Kicad. 
  • Using imported footprints and symbols in a single new imported project worked, but as soon as I used the part in a different project things often broke. 
  • Meaning: traces to cathodes went to anodes, traces to transistor emitters went to collectors, traces to a pot wiper went to something other than a wiper--all bad news.
  • Modifying symbols and devices from Eagle to work universally in Kicad required a bit of forethought and elbow grease. Diodes in Kicad needed pin 2 for anodes and pin 1 for cathodes, for example, as this seems semi-standard for Kicad. 
  • I found I needed to carefully examine imported footprints and symbols, then edit them to make them work for a given future design. No easy fix for this, I had to do this extra labor or not use an imported Eagle footprint beyond its initial project.
  • (BTW: for me--everything I think might be useful for future projects goes in my github custom footprint and symbol repos--e.g., my footprint custom library can be found on Github--here)
Following these steps created an added benefit: my Eagle "devices" folder has 20+ years of useful footprints and symbols, some I imported, others I modified and/or created, so I could continue to use them going forward.


SCHEMATIC- AND BOARD-ONLY IMPORTS

I was not just limited to importing an entire Eagle schematic and board as already described.  

If I created a new KICAD 8 project and opened the new/blank Kicad_sch file I could file > import only an Eagle .sch schematic.  

The associated symbol library came over, but the process ignored the .brd (board) data. 

From there I could assign existing Kicad footprints and create a new PCB layout as with any other Kicad project.

I could import only a BRD file in the same manner but I am not sure how helpful that would be--I'd next need to create a new schematic with its associations from scratch, which I figured might prove difficult.  

However, I then import footprints from the associated .pretty folder created from the Eagle board-only import.
 

OUTTRO

With a bit of patience and attention to detail the Eagle > Kicad import process works--GREAT.  

Kudos to the Kicad development team, they must have spent hours and hours getting this import process to work; their time and hard work has already saved me hours and hours doing schematic capture and layout "from scratch."

And this is a guess but: I figure the documentation for Eagle's API sucked, since most Eagle documentation sucks. 

I would wager the Kicad coders implementing the Eagle > Kicad import algorithms had to wade through endless reams of crap documentation and employ a fair degree of trial and error to get the imports to work....since in my experience anything touching Eagle means figuratively embracing the collective works of Kafka.  

They figured it out!  

Proving: the best things in life really are free--the exception is vintage Roland. Kicad RULES!


No comments:

Post a Comment

BNC to 3.5mm Adapter Board--Sans AI

Readers: If you'd like to build the project featured in today's post, please go to PCBWAY's Community pages--gerber file; KiCAD ...