AVR pcb pain

Submitted by Ed_B on Tue, 10/06/2009 - 17:05

Printer-friendly versionPrinter-friendly version

I've been working on this for a while. It's an ArtBus board that can run Arduino code. The first ArtBus board is based on a PIC16F690 chip. It can be "factory" programmed to do either 8-lines of digital i/o OR to do 8 analog inputs, but not both.

The second board Is based on an AVR ATMEGA168 chip. This chip can use the arduino libraries to make the firmware in the chip fast to design. The first ArtBus board is programmed in C using the CCS compiler. It's closed-source and there are restrictions on publishing example code that uases their libraries. Open source is better.

People seem to like the "hand-feel" of the first board, so I'm keeping that as a design premise for the AVR board. I've been asked more than once to do a full through-hole version so people can stuff them easily by hand. I initially wanted to do a hybrid board that has the MCU, the RS485 translator and the protection circuit in SMT and do everything else in a way that would be kittable. I also wanted to use the SMT version of the chip because I could lay the board out with the idea of using a base infrastructure of power and comms parts as fixtures, then run the analog input lines around the chip to do the analog version of the board. I fought with it for a long time before realizing that it just wasn't gonna happen. Being constrained by board dimensions, minimum trace widths, and the imperitive to keep a ground plane under the analog lines were too many competeing rules.

So. I cried a bit, and decided to do a digital-only board which was incompatible with the analog version. The Surface mount version of the AVR chip has two extra analog input lines over the through-hole version. With no analog functionality to worry about, this created the opportunity do do an all thru hole board. so. there we go.

The bummer of this is that we've put so much effort into getting set up nicely to do surface mount, that it's a shame not to be using the capability. Oh well, next board.


The first effort at a board got this far. The red and green lines are routed traces, and the white rubber-band lines are unrouted traces. You can see how far I got before realing I was going down the wrong path:


Getting rid of the need to make an analog compatible layout helped. The big 28-pin through-hole chip causes its own set of problems. As trite as it may sound, I design for reusability when I can. This board stared out as a modified version of the PIC board.


It take HOURS to do this kind of layout if your schematic and your board are evolving together. This isn't the way it's supposed to happen, but there you go.