Arduino MEGA on another PCB

Hi,

I'm trying to make a PCB for my robot, and am using an Arduino MEGA to interface with sensors. To mount my MEGA onto the PCB, what I want to do is get the corresponding male pin layout for the MEGA on my PCB, and then stick the MEGA on my PCB upside down. I don't really want to measure it all out and draw it myself in EAGLE... is there some way I can use the existing MEGA EAGLE files to create the corresponding male pins?

I tried looking for this problem on the existing forums but couldn't find it (I didn't really know what words to use to search for it). I'm pretty sure, though, that this is not an uncommon problem...

Do you really need so much input/outputs? If not, you can use ATmega328 in DIL package. It is much simpler to integrate on PCB and you can use for example Arduino Uno as a programmer. If you don't want to go in stand alone version, you can use Arduino Nano. It is small enough and you can found Eagle scheme for it on Arduino page.

Google 'Sparkfun Eagle Library', its on github and the outline and pin positions of a mega are in that library.

Edit: GitHub - sparkfun/SparkFun-Eagle-Libraries: SparkFun's Public Eagle PCB Footprints

Hey Tom,

Yeah, I actually have the Sparkfun library, and it includes the Arduino MEGA on it. However, I don't think that's quite what I want (or if is, then I'm still confused as to how to use it). I'll attach a picture to show you what I mean.

Hey guys,

Thanks for the quick replies. Luxy, I think I do need the I/O, mostly for serial, actually. Analog and digital could have been handled by an Uno, but I need all three Tx/Rx.

The outline has the pin headers on it aswell, correct?

If so, place it on the board, and then use the MIRROR command to flip it onto the bottom layer. This will simulate the mega board being upside down. As the pin headers are through hole, you can simply mount the header on the top of the board.

you could try to use a bit of vero board

im not sure about the mega but the uno wont fit very well because the distance between the single way headers isnt 2.54mm pitch

but worth a try, better still learn to lay out a pcb and make your own

You can take the mega schematic file, strip off all but the headers and use the layout that is left.
View it as plugging onto the mega board from above. Components on the bottom will be the parts you see when you flip it over and plug it onto the Mega. Components on the top will be the parts you won't see because they are between the boards.
Be sure to keep the ICSP header in place if you plan to do any bootloading without having to pry them apart. Having all 86 pins plugged in makes for a pretty solid assembly.
The first picture here is an example of board that started out per the above.
http://www.crossroadsfencing.com/BobuinoRev17/

CrossRoads, that's exactly what I'm looking for! The only difference is that I want male pins, but the layout is the same. I'm getting an error trying to use the MIRROR command; it's telling me that it can't do it because "some objects extend outside the the allowed board area", and EAGLE Light won't do it for me.

Also, how do you separate the pads layer from the rest of the layers? I've done a couple of searches, but I don't even think I know how to ask my question properly.

Ok, yeah, thats one of the annoying things about eagle.

There is a way around it though. If you select the mega footprint with the move tool, then while it is following the mouse, there is a button on the toolbar at the top which looks like a grid of 4 squares, the two on the left are shaded and there is a line down the middle. If you click that it will mirror the footprint and you can then place it down within the board outline.

That board has male pins - they stick out the bottom to plug onto the Mega/Due.
You don't have to use female headers - you can use straight pins.
Doing it this way, with your components on the side shown (the top) you will be able to see your compenents for trouble shooting.
Otherwise, with components on the bottom, they will be inside the board sandwich and not accessible.

I wouldn't mirror anything. Take the Mega design, leave the header holes in place, and strip out the rest.

All right guys, thanks very much for your help. I think I've got it figured out now.

One last question: how does one 'strip away other layers'?

Viewing them, or actually deleting them?
Viewing, Edit:View & deselect them.
Deleting, deselect all but the one you want, use the X button (Edit:Delete) and start clicking away.

Or just start from this

Arduino_MEGA_2560_headers.brd (69.4 KB)

Arduino_MEGA_2560_headers.sch (112 KB)

Crossroads,

Thanks for the files. I'm actually getting a 503 error on them, but that's okay. I want to learn to do this myself; this is probably something I'll need to use again in the future.

Thanks all for all your help. I think (I hope...) I can take it from here. :slight_smile:

The 503 error is the forum - none of us can download attachments for the last few days.
PM me with e-mail, I'll send you the files if you want.
Key is getting headers all spaced & placed correctly.