[Eagle vs KiCad part 2]

Okay, so it’s time to start on the road of deciding whether I want to design PCBs in Eagle or KiCad. I’ve already talked about this a little, but here’s where I’m at.

My natural inclination is towards KiCad. It’s open and it has none of the restrictions of the free version of Eagle (and because this is a hobby I’ll never justify the cost of a paid version of Eagle).

You might think that would be enough, but there are counter arguments. First, while the free Eagle is limited (board size, number of layers, number of schematic files etc) it’s quite possible that I’ll never find myself restricted by those because my ambitions are modest. And at a first glance, Eagle seems to have better support in terms of things like libraries (SparkFun, Adafruit, Farnell et al) and fab houses (design rules). So I’m still on the fence.

Bear in mind that I’m an absolute beginner here, so this is a genuine voyage of discovery. If you’re in the same position as me, I hope this will help a little.

The project

I learn by doing, so I’m going to design a PCB for a project, first in Eagle and then in KiCad. And I’m going to take this as far as getting the boards fabbed. If I’m still a little undecided at the end of this process, I have a second project in mind.

I call the HexMonitor, mainly because I have to call it something. It’s a board with 24 input lines – eight for a data bus and 16 for an address bus. Another input line decides which bus will be selected. These lines are monitored by an Atmel ATMEGA328P microprocessor that will display the value of the chosen bus on a 4-digit 7-segment display. I have the breadboard prototype working. Currently I have a simple ON-ON slider switch for selecting between buses and DIP switches for setting values on those buses. Here’s a photo for those of you who like pictures of wires.

The microcontroller reads the bus lines via 74HC165 parallel-to-serial shift registers (one for the data bus, two cascaded for the address bus). It talks to the display via a 74HC595 serial-to-parallel shift register that sinks the cathodes for the segments on the displays. The four anodes for the 7-seg digits are powered from four ATMEGA328P pins via current-limiting resistors. Individual control of the anodes is necessary because the software cycles through the digits setting the value of each in turn (via the shift register) – and hopefully doing this fast enough that you don’t notice any flicker.

I’m planning to add another input line that can be used to enable/disable the display. That hasn’t been implemented in the prototype.

I’m also toying with the idea of having serial port (UART) connectors for the microcontroller because … well, why not?

The board will link to the outside world via a 64-pin DIN 41612 connector. Perhaps best known as the Eurocard or VMEbus connector, DIN 41612 is a very common design, capable of supporting a variety of pin numbers. In my case I’ve plumped the for the 64P version that has two rows of 32 pins with 2.54mm (0.1in) spacing within the rows and 5.08mm spacing between the rows (the rows in use are labelled A and C).

So why do I need a 64-pin connector for something with only 26 connections (not including power and the possible serial port)? Well, it’s because my plan is to use this board on a 6502-based computer that I’ve told myself I’m building. This will be a backplane design and 64 just seemed like a good number.

I have a couple of reasons for selecting this project with which to learn Eagle. The first is that I actually want this board. The second is that I’m planning to use a couple of components (ie, the connector) that may require creating parts from scratch in the software. Having played with Eagle a little and watched videos about KiCad, I suspect that how easy it is to do this may be a significant factor in my choice.

Oh, and there’s a third reason – it’s a fairly simple board for which I already have a working prototype.

So let’s get started with Eagle.

Getting installed

I’m not going to go through the whole installation process. For one thing, it’s not difficult; and for another, there are plenty of guides online already. And neither is this going to be a step-by-step tutorial for the software. The aim here is to discover how easy (or otherwise) it is to use.

When I started writing this post I was on Eagle 8.4.1 but upgraded to 8.5.1 before I’d finished.

To get acquainted with the software I’m using Simon Monk’s book ‘Make Your Own PCBs with Eagle’. I like Monk’s style and it’s a very easy book to follow. He suggests installing the SparkFun and Adafruit Eagle libraries plus the SparkFun design rules, which I’ve done.

I’ve also configured the directory settings in eagle so that stuff like projects and libraries are in a Dropbox folder, so that I can keep them synced between my laptops and desktop machines. Creating my own libraries folder led to some slight confusion, but I’ll deal with that, and libraries, in the next post.

User interface

Eagle is a cross-platform application, available on Windows, macOS and Linux (I’m running it on my Macs). And it’s what I think of as the ‘cheap’ kind of cross-platform application – that is, none of the versions is fully native. It’s based on the Qt platform, which means it looks and acts weird on pretty much any machine (save for some flavours of Linux, perhaps).

I mention this because it’s a fairly complex program with lots of features, but you can’t rely on familiarity with your preferred OS user interface to find your way around. And, as we’ll see, Eagle does sometimes go out of its way to be unintuitive. You’re just going to have to learn the Eagle way of doing things.

There is an annoyance before you get that far. Since Eagle was acquired by Autodesk you’ve needed to open a free account to get your hands on the software. When you run the software you’re asked if you want to log in. You can work offline, but I suspect that certain features might not be available (such as installing or updating libraries). So that means remembering and typing in your password (it didn’t work with even the desktop version of LastPass). There’s a box to tick if you want to stay signed in but it didn’t seem to work reliably and I had to log in again after upgrading the software. Irritating.

The project

When you start Eagle, the window that appears is the Control Panel – the home page of the app, if you like. It contains a palette with a hierarchical list of projects, libraries and other stuff. So far, so normal.

You use New -> Project to start a project. The next step is to create a schematic. Right-click on the project name and select New -> Schematic to do this. A separate window opens up for the schematic editor. In Eagle, you need to get used to the idea of having multiple windows open – it becomes important later as there are windows that need to keep in sync with each other and will do this only if they are open at the same time. I find this multiple window apporach untidy but bearable.

Then it’s time to add some components. There’s a not very obvious icon in the left-hand palette of the schematic editor to do this. Clicking this brings up a dialogue box containing more components than you can comfortably conceive. Wading your way through the nested lists is a slow job. Thank heavens there a search facility, right?

Well, um, yes. But the truth is the search facility sucks. There’s no predictive searching – you type a search term and have to press enter each time before it searches. Also, there’s no automatic wildcarding; the program searches only on whole words although you can specify wildcards yourself. So if you want a list of the ATMEGA chips in the library, you’ll need to search with ATMEGA*. This is searching 1980s style.

My first step, naturally, was to add the Atmel microprocessor. But a search for ATMEGA328* turned up nothing. Ah well, try ATMEGA168*, which is pin-compatible. Zilch. Damn, I really didn’t think I was going to be creating my own component this early. A bit of Googling later and I find suggestions that the MEGA-8P option (but not the MEGA-8 versions, as they are for surface-mount components) will do the job. But putting in the wrong component just feels bad. You can find libraries online, and fortunately Element 14 has an Atmel library that came to the rescue. But I really was surprised to find myself having to scrabble so hard to find a such a popular and well-known component this early in the process.

A note about placing components: when you’ve clicked to drop the component on the schematic, the cursor remains ‘loaded’ with the same component. Click again and you’ll drop another one. This is not necessarily intuitive but it is sensible – there are often times when you want to drop multiple copies of a component on a design and this makes it fast and easy.

To get out of this mode, you hit Escape. You’d think that would be that, but oh no. On hitting Escape you’re dropped back into the component selection dialogue where you have to click Cancel to get out of the component placing mode altogether. Again, I can see an argument for this, but it does feel clumsy.

Similarly, if you do accidentally drop unwanted components into the design, you need to click on the Delete icon (a rubbish bin) to enter delete mode. Everything you click on will be deleted until you again hit Escape.

Moving is a similar business – click the Move icon then use the cursor to pick up items to move them around. But you can’t click anywhere within the component – you have to hit the tiny cross in the centre.

This definitely feels like software from a pre-GUI era when the term ‘UX’ was still unknown.

More components

Adding the shift registers was easy enough. The 4-digit 7-segment display might have been harder except that Monk provides downloadable files to go with his book and these happen to include a compatible device. So that was lucky.

The last time I played (briefly) with Eagle, Monk recommended using the RESISTORPTH-1/4W item for normal 0.25W axial (ie, through-hole) resistors. But searching for that in the newer version of Eagle turned up nothing.

Through-hole resistors are normally coded according to their width, length and space between the mounting holes. This is expressed (in millimetres and with leading zeroes where needed) in the form wwll/ss where w=width, l=length and s=spacing. In my box of assorted resistors, the components appear to be about 2.5mm wide, at the thickest point, so let’s call that 3mm, 7mm long and 10mm would be comfortable spacing for the holes. This would be 0307/10 in the scheme I just mentioned. But under ‘resistor’ and ‘R-EU_’ (for European symbols) there’s no such thing. I suspect what I actually have are 0207/10 but I could choose 0309/10 or even 0309/12 to be really sure I’m not trying to crowd anything. I went for the last one.

My point in going into all this is to illustrate how beginner-unfriendly all this is. Old hands will roll their eyes and think “you should know that your resistors are 0309/12”. And with experience, finding components in Eagle no doubt becomes easier. But for a beginner it can be bewildering and slow, requiring much Googling and scouring of data sheets.

Strangely, I found an existing item for the connector – who’d a thought it. Thanks to a Google search, I took a look in the ‘con-vg’ library – and there indeed is ECB64. But the labelling of the pins isn’t what I want, so I’m still going to have to copy and modify this part. That’ll be the subject of the next post.

Summary

I’m at the stage where I have all the components on the schematic. I still need to link them together. But before I do that, I need to edit that part.

To be honest, getting this far wasn’t that hard. Eagle has lots of quirks and it feels old-fashioned and a tad clumsy. Things like pin and pad names are somewhat fuzzy on the Mac’s Retina display. And the overall look and feel is definitely from another era. Hell, it’s practically retro.

But the idiosyncrasies I’ve encountered so far are easy enough to learn, even if they make Eagle less than intuitive.

» See all Eagle vs KiCad posts »