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"--that 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, schematic, and 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".  
  • 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 get several 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.

I found synchronizing modified or updated "devices" in Eagle into my design cumbersome and confusing. Thank goodness it's much easier in Kicad--edit the 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. The 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 be fatter.

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 any outstanding issues importing from Eagle. Eagle projects, PCB's, schematics, symbols, and footprints now are imported into Kicad 8 without issue. In the Kicad folder crafted for your imported project a "dot pretty" folder and "dot sym" file containing Kicad versions of the Eagle "devices" appear. From here you can copy the footprints and symbols into custom libraries, match footprints to existing 3D images, and all the rest. Fantastic!

"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 and rotate 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 

Copying items from one project to another: it took me a few weeks to realize I could have multiple Kicad projects open and once and copy things between them. Open Kicad a second time; open source schematic or board; lasso items to copy; control + C to copy. Now, click on the target board or schematic and use control + v.  1-1-24

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 as in "boy" 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

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.

No, 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....  


Monday, September 11, 2023

ARP 2600 Voltage Processor The Final Chapter: ARP Electronic Switch: the Workalike Works

 Readers: If you want to build the module featured in this post, please go to PCBWAY's Community pages--a gerber ready to download and fabricate is here

Also please visit PCBWAY's site using the link here--it will help this blog. Thanks.

===========

Hello again! Finishing up ARP 2600 voltage processor clones and workalike modules, this might be the last of the series, which is not a bad thing?  

The ARP2600's unique voltage processor has a click- and pop-free clock-driven analog electronic switch for AC and DC signals. 

You can find the original design on page 29 of the ARP 2600 service manual here.

The 70's era subcircuit used discrete components for its toggle flip-flop and employed LS4392 FETS for heavy lifting.

Best of all: a working Electronic switch completes my ARP2600 voltage processor series. Are we home yet?

Finished ARP2600 Electronic Switch workalike

I decided to use a DG401 IC instead of the FETS--post where I initially experimented with that IC is here with more here.

In short: The DG401 works great--think of a rail to rail version of the venerable 4051 analog CMOS switch; both are useful chips for a lot of what we do.

I laid out PCB's for the workalike and sent them to the blog's patient sponsor, PCBWAY, to create a 5HP Euro prototype.

Let's see if what I designed works....

Happiness is new PCB's from PCBWAY....

The build uses about 2/3rd's SMD components, many of which I don't have in the junk box. I bought the parts from Digikey and posted the BOM on the PCBWAY community page (here).

Unpopulated main board--I am getting more comfortable with1206 SMD components--large enough that I don't need a microscope for a lot of the work. 


Front panel....






Testing....




Did it "work first time"?  

Kinda. 

The switch switched somewhat randomly unless I used a square or pulse wave. During the breadboard stage, triangles and some ramps switched same as a square wave, but in this layout, not as much.

Not sure why....on the bench (breadboarded) here's what I used to buffer the incoming clock signal:

But for this post's Euro module triangle and ramp incoming signals created switching "warbles". 

Not intended, but not a bad thing?  I could have spent days chasing this down--for instance, setting up the breadboard and expermenter's board for the DG401 and double checking my work--redesigned the buffer using an MCU to turn whatever input to a pulse wave--using an op amp with a diode in its negative feedback path--something has to work, right? 

But, naaaaaah. 

Too many other things to do.  

Instead I replaced the .1µF cap with a 1K resistor. That's surprising quick and easy with 1206 SMD parts: heat up both sides of the .1µF capacitor with a soldering iron in quick succession; use tweezers to remove the cap, then solder in a 1206 1K SMD resistor.  

Done.

With that modification square and pulse waves work great to make the DG401 switch.  

Good enough....the workalike switches cleanly, no delays, no clicks, no pops, same to my ears as the ARP2600.   

And! The "any waveform to clock" apparently isn't implemented on the original gazillion dollar collectable 2600 my friend owns....so I could argue that the design flaw makes this workalike more akin to the original.

Uh huh. Righto. Not a feature--a bug. 

Time to move on!  

Next time--no idea. How about this: I'm ditching Eagle for Kicad since Autodesk is raising my annual subscription price 700 percent. So I may do a few less posts in the next few weeks while I learn this new program. Go A's

Anything to Clock Subcircuit

Readers:  If you want to build the project featured in today's post, please go to  PCBWAY's  Community pages --a gerber ready to dow...