Dangerous Prototypes

In development => Project logs => Topic started by: schazamp on July 12, 2011, 04:14:28 am

Title: ATmega328 / 644 dual project board
Post by: schazamp on July 12, 2011, 04:14:28 am
I have a handful of ATmega328s and 644s kicking around, and I want to make some general-purpose PCBs that I can use to make the projects more permanent (so I don't leave them on a breadboard forever, but I don't want to design a board for each project).

I like this AVR business card development board by the folks at Evil Mad Scientist: http://www.evilmadscientist.com/article.php/card (http://www.evilmadscientist.com/article.php/card), and I wanted to do something similar, but with a few more features:
* support for basic 7805 power supply
* support for ISP (for non-arduino) and FTDI (for arduino) headers for programming
* support for reset button

That's all no problem.  The main "compelling" feature that I'm after, though, is somewhat trickier.  I am aiming to make this board so that it supports either the ATmega328 (your standard arduino-compatible thing) and the ATmega 644 (your standard sanguino-compatible thing).  I *also* was hoping to design the board such that all of the support circuitry for either the 328 or the 644 would be available as a single-sided design, one on each side.  That way, if someone (say, me) needed a 328 version, it would be pretty easy to make just that side of the board using toner transfer (or whatever).  Likewise for the 644 version.

The trouble I'm running into is in routing the traces on both sides of the board.  I want, for example, all the traces in the power-supply subcircuit to be routed both on the top and bottom layers, in duplicate, so that either side of the board could be used for a complete circuit (I made a special footprint for the 2.1mm jack that could accommodate both sides, and I have solder jumpers on all the common lines so pins wouldn't be cross-connected).  However, once the traces are routed on one side (say, the bottom), I can't figure out a good, easy way to duplicate them on the other layer (the top) and have all the names and connections right.

Does anyone have any tips on how I might be able to do this?  Or is there some reason that this is not such a great idea?  I spent a lot of time routing things so that I'd have plenty of room for some prototyping space, and I'd really like the circuits on top and bottom to overlay as much as possible.
[attachment=0]
Title: Re: ATmega328 / 644 dual project board
Post by: Sjaak on July 12, 2011, 02:37:59 pm
in layers turn off all but the layer you want to copy, use the tool to select the whole area you want to copy, select copy, and paste the thing somewhere. use the selection tool to select the new area, use the change tool to change the layer of this to the other (it should disappear because this layer is not selected), select the other layer, select the fresh layer and move it to the final position.

(i typed it from the top of my head, with no eagle at hand, but it shoudl give you the basic idea). If you don't succeed I could write a better more thorough way tonight with eagle at my side.
Title: Re: ATmega328 / 644 dual project board
Post by: schazamp on July 12, 2011, 02:47:45 pm
I tried something like that, but I had trouble changing the layer all at once (it would work a trace at a time).  Maybe I'll try it again.

The other problem I had was the signal names of the traces were (automatically) renamed to be different from the original (e.g., GND -> GND1), so I get all kinds of overlap errors when I move the traces back.  Is there a way to copy them while retaining the signal names?

Edit: one tip I found while doing this is that reducing the grid resolution drastically (e.g., 0.1") makes it really easy to move the copied layer back into exactly the right place.
Title: Re: ATmega328 / 644 dual project board
Post by: Sjaak on July 12, 2011, 03:12:25 pm
Perhaps I should mention it won't work with the schematic open :) I don't know a way to keep the netnames the same, except to rename them by hand.. Perhaps if you change the layer to a silkscreen layer (thus the signalnames are lost) anf then to a copper layer. This will give inconsistancy errors between the sch and brd.

If you only have the bottom and top layer active you could easily trace the bottom (or top) layer. One other tip is only to display the layers that are interesting at that moment :)
Title: Re: ATmega328 / 644 dual project board
Post by: schazamp on July 12, 2011, 03:50:38 pm
Ah, thanks, I didn't suspect having the schematic open would make a difference.

I tried tracing, but I found it kind of hard to feel like I was making everything connected properly without the airwires guiding me.  Is there a way to duplicate or re-enable the airwires?
Title: Re: ATmega328 / 644 dual project board
Post by: ian on July 13, 2011, 11:05:25 am
I would approach this by making both circuits on the schematic, and then routing the whole thing. Once it it detached from the schematic you lose a lot of the handy tools and you can't make a correction later.

The part names need to be different, but you could say R1a and R1b instead and get kind of the same effect.
Title: Re: ATmega328 / 644 dual project board
Post by: schazamp on July 13, 2011, 02:26:15 pm
I hadn't thought of that.  It sounds like it would be a nice way to maintain separation between the two different (but partially overlapping) circuits. 

Is there a better way to deal with all the design rule problems (overlaps, etc.) than just hitting "approve"?  I was hoping to use Seeed for the fab for these, but I am not sure what to expect when submitting files that don't meet all the design rules (even if the violations are what I would expect).
Title: Re: ATmega328 / 644 dual project board
Post by: ian on July 13, 2011, 02:38:36 pm
If you submit gerbers the Eagle errors won't be in them. The gerbers have a different check for separation, etc..
Title: Re: ATmega328 / 644 dual project board
Post by: schazamp on July 13, 2011, 03:26:47 pm
Ok, that makes sense.  I usually use the DorkbotPDX service by Laen, and he will accept Eagle .brd files, so I haven't messed around with gerbers before.
Title: Re: ATmega328 / 644 dual project board
Post by: ricros on July 26, 2011, 05:04:36 pm
I dont know if it is suposed to be like that but the microcontrollers aren't "pin compatible", the ISP pins are in diferent sides, the reset pin on the 328 is the 1st pin, on the 644 is in the 9th, even the VCC and GND aren't correctly connected

I think it's easy to make 2 boards, one for each mcu
Title: Re: ATmega328 / 644 dual project board
Post by: schazamp on July 26, 2011, 05:19:04 pm
Right, that's why I have solder jumpers to connect, depending on which side (MCU) you want to use.  That way, the pins won't be connected unintentionally.

I've been making two separate circuits, one for each side, and am planning just to overlay them.  I think that will work.  My main goal here is to have a single board I can use for two different MCUs, depending on which I have lying around.
Title: Re: ATmega328 / 644 dual project board
Post by: ricros on July 26, 2011, 05:37:03 pm
oh those yellow things are jumpers! I thought they were 0805 components :D

It might work that way

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01092074072session_write_close ( )...(null):0
20.01132205648ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01132206424Database_MySQL->query( ).../DatabaseHandler.php:119
40.05382345144Database_MySQL->error( ).../Db-mysql.class.php:273