I’ve used various versions of Cadsoft’s EAGLE PCB design software for years now, mostly with the full commercial version with all the add-ons enabled. I stuck with version 6.5 for a long time, mostly because I didn’t want to jinx my space camera board by upgrading before the final rev was out to manufacture.
Anyway, I’ve been working on another project recently that has a lot of duplicated subcircuits, so I decided to drop the hammer and upgrade to version 7.2. This wasn’t a free upgrade — it cost me $550 to make the jump from 6.5, but after a few days use I’m thinking it was worth it.
The biggest differences with EAGLE 7 are the ability to create hierarchical designs. Some other PCB CAD systems have had this ability forever — I remember drawing schematics in ORCAD in the late 1980s that were hierarchical, but this is a new thing for EAGLE, and to be honest it was the one thing that always wound me up and had me longing to use something like Altium Designer instead.
So anyway. Hierarchical schematics. The basic idea here is that, rather than having a single schematic split over multiple pages with named signals connecting across them, you have the option of creating subcircuits that appear as a rectangle in the top level design that are defined by one or more separate sheets. If that’s all this meant, it wouldn’t buy you much, and you could kind of fake the same thing by drawing a rectangle and naming the signals coming out of it. However, the big win is that you can create as many copies of this subcircuit as you like — in some designs, this is an absolute lifesaver. Nothing sucks more than getting a board back and finding that one of the eight amplifiers you painstakingly drew had a wrong connection — this way, wherever possible, things are only ever drawn once regardless of how many times they are reused. To a programmer, this is pretty obvious, to the extent that flattening out a design and manually cutting and pasting would seem like a really stupid way to work, but there really are two different cultures here, so what should seem obvious isn’t necessarily.
I had an idea a while ago for a musical instrument inspired by the Hang Drum — I wanted something electronic that triggers synthesized sounds, but existing electronic hand drums (I own a couple of them, a Korg Wavedrum and a Yamaha thingy whose designation I can’t remember off hand) didn’t quite work for me. I wanted something with faster response times than usually possible via MIDI (the Wavedrum solves that), with the ability to drum with a very light touch (nothing seems to support that). The light touch thing is a requirement of getting older and suffering from arthritis — if I whack away at a djembe for a couple of hours, I typically regret it for a few days. I’d like to be able to play really softly, but otherwise keep dynamic control. I had the idea of building a drum controller that will be shaped roughly like a Hang Drum, with playing surfaces most likely made out of hardwood. The obvious approach of sticking microphones or accelerometers to the bottom of the pads doesn’t really work for me because it wouldn’t be likely to be sensitive enough, and in any case I want to be able to mute a decaying sound intuitively they way I would with a real drum, so I wanted something pressure sensitive. Strain gauges were my first thought, but they tend to be super-spendy, unrealistically so given that I’d need quite a few of them. It then occurred to me that you can get strain gauges already set up as a nicely matched set in a bridge configuration if you just buy a load cell instead. eBay has tons of extremely cheap load cells available because of the ubiquity of low cost electronic scales — though a standard scale circuit wouldn’t be effective, an amplifier with a faster response time, sampled at 2kHz or more, would do the trick quite nicely. I started sketching a circuit in EAGLE, partly because I ultimately want to build one of these things, but mostly because I wanted to throw something not completely trivial at EAGLE 7.2 before I have to use it to design something that flies for work.
At the time of writing, the design is nowhere near done, but I entered enough of it to give EAGLE a bit of a workout. I used a microcontroller with built-in ADCs (Atmel ATMEGA128), with some jellybean opamps (2 per channel) as amplifiers. I’ve not tweaked or verified the amplifiers yet, so the component values are a wild guess, but I cared more about giving EAGLE some exercise than details. The nice thing was that I only drew the load cell amplifier circuit once, then used EAGLE to duplicate it multiple times. This all just worked basically — it was surprisingly easy.
On the layout side, your design gets flattened, so the modules go away. There isn’t a way to lay out a module, then copy that layout to other instances of the same module — I suspect that this could be done in an ULP script, so we might see this added by a third partly developer relatively soon.
One weird thing was component naming. In hierarchical designs, rather than C3, you see its position in the hierarchy fully expanded, e.g., TRIGGER1:STG_AMP6:C3, meaning module TRIGGER1, submodule STG_AMP6, component C3. Though this is pretty convenient during the layout process (you can type commands like show *amp6* to highlight everything within a module, for example), it doesn’t really work if you want to put component legends on the board. There is an option to renumber parts so that each module starts on a multiple of 100, so something like the above might appear as C603. I can live with that, and I kind of like the implicit structure that this naming gives you, which would be nice when poking around with a built-up board in the lab later.
One thing I really wasn’t expecting was the improvements Cadsoft made to the autorouter. I should say, I’ve always been agnostic about autorouters. I don’t generally use them because I typically find that their results are awful compared with what I could get from doing the tracking by hand. However, having once briefly attempted to hand route an FPGA (back in the late 80s using one of the first Xilinx devices, and XC3000 series I think), I am quite aware of my limitations and do accept that there is no guarantee that a human layout will do better than that of a carefully crafted AI algorithm. I always like to have autorouters available to me, however, because they are awesome if you want to do a quick sanity check to see whether a board has routing issues or overly restrictive design rules before jumping in feet first and committing to days or weeks of work. Anyway, the short version is that EAGLE now has a topological router algorithm that does a much better job than its older autorouter. Playing around with my design, I did a quick manual placement of the parts then fired up the autorouter, expecting it to do a crappy job. I was shocked to find that not only did it produce a nice looking layout using just two layers, it managed to almost completely avoid traces on the back of the board. I manually added a power and ground plane — you still need to hand-place vias giving access, but the autorouter will pick them up and use them. With this in place, there was only a single route on the back of the board, which actually turned out to be an extra power plane-like voltage reference signal. Not only that, the routes looked pretty good on the top, much more like something a human would have made. I found a couple of minor things I’d want to change in a real board, but nothing serious. I am shocked to hear myself say this, but this is an autorouter I’d actually be prepared to use for a real design.
EAGLE still doesn’t do autoplacement. There seems to be a knee-jerk avoidance of autoplacement these days (ORCAD had it in 1987!), but experience working with simulated annealing based FPGA layout systems show that autoplacement can beat human placement by huge margins if you give it some structural hints. Maybe in EAGLE 8?
Please note: this was cross-posted from my main blog at http://www.mageofmachines.com/main/