DIY Arduino Mega 2560 or 1280

by TSJWang in Circuits > Arduino

112345 Views, 103 Favorites, 0 Comments

DIY Arduino Mega 2560 or 1280

IMAG0346.jpg
IMAG0310.jpg
So this is my first instructables.... Let's try this!

*original can be found here: http://tsjwang.blogspot.com/2013/08/diy-arduino-mega-2560.html*

Alright.
Here's the story: I was working on this frustrating Arduino project, and I decided to take a break. I went away to watch a little Star Trek and drink some water.
When I came back, my Arduino Mega was hot: really hot.

The Arduino was not responding to the IDE. The only way I could program it was by using the USBtiny ISP.
That pretty much ruins the purpose of an arduino board, so I brought out the solder pot, desoldered the whole board, salvaging as many parts as I could.
Since the ATmega 2560 was not damaged, I decided to put it back to use:
The following is the process of how to...

Make Your Own Arduino Mega

You think it's hard to solder SMD? Think again. This was my first time soldering SMD chips with 0.5mm pitch (in other words, REALLY SMALL).

Parts needed:
- ATMega1280 or 2560 Microcontroller (I recommend the ATMega1280, so you can use Arduino IDE to program)
- TQFP100, 0.5mm pitch to DIP adapter
- Momentary push button
- 6 headers (for ISP)
- lots of wires
- flux
- Perfboard
- 16 MHZ crystal (if you salvaged chip from Arduino Mega)
- OPTIONAL but recommended - double sided tape
- OPTIONAL - 330 - 470 ohm resistors *2
- OPTIONAL - two LEDS
- OPTIONAL - 5 more headers for FTDI Serial communication
- OPTIONAL - nuts and bolts

Stick It On

IMAG0330.jpg
Stick one or two pieces of square double sided tape on the breakout board. This might help keep the chip in place when soldering it.

Placement

IMAG0331.jpg
Place the chip on! Please note the index corner on the chip to align it correctly. Make sure that the leads on the chip and the board line up REALLY well. The must be aligned.

Smother in Flux

IMAG0332.jpg
IMAG0333.jpg
Time to start the soldering: apply WAY TOO MUCH flux (that means A LOT) onto the edges of the chip. You will need to use all of it, and maybe some more.

Drag the Solder

IMAG0334.jpg
IMAG0335.jpg
IMAG0336.jpg
IMAG0337.jpg
IMAG0339.jpg
I do not have pictures for this. You will want to put a nice drop of solder on your iron and just drag it across the edges of the chip. Don't worry, it's all being soldered, even if you do not think it is.
You will probably have many solder bridges (especially on a chip this small).
Thats OK, just gently drag it off with the iron tip, use a solder sucker (be careful with it, you might bend the leads), or use even more flux to remove it. This step might be the most difficult

This video:


Tells you how to do it. Instead of soldering lead by lead, I just dragged it down. It seemed to work well.


Then after that, follow the instructions on the pictures.

Pinouts....

PinMap2560sma_.png
IMAG0340.jpg
This step is mildly annoying. Print out the datasheet of the 2560 and start marking where
MOSI
MISO
SCK
TXD0
RXD0
pin#27
VCC
GND

or any pins important to you, are
Mark it all!

If You Prefer to Perfboard It...

IMAG0341.jpg
IMAG0342.jpg
IMAG0343.jpg
Start preparing your perf board. This step is very subjective to your needs and tastes. I like to have the TX and RX header so I can program this like a regular arduino.
I like to have a reset button
I like to have an LED on pin D13/ 27 of the chip
After all, it is a development board.

Test It Out!

fff.JPG
IMAG0344.jpg
IMAG0345.jpg
Hopefully you have an AVR programmer that uses the 6 pin ISP.
Plug it in, type in

avrdude -c PROGRAMMER -p m2560 OR 1280 DEPENDING ON WHAT YOU HAVE 

Does it recognize?

If so, BRAVO
if not... check your wires. 

After you get it working, check your serial communication (This only applies to people who desoldered the m2560 from their old Arduino Mega. For people who are ordering the chip straight out of the factory, there is no bootloader inside of the chip that supports serial programming.)

**
After I plugged in my board to the FTDI converter, the m2560 started spitting out strings from the last program that I was running on it.

Good times....

Finished... Confession

IMAG0347.jpg
IMAG0348.jpg
So, if you were working with the ATMega 1280, you can just plug it in and burn the bootloader to it.
That would be "Arduino Mega"

If you were using the ATMega 2560... Uh oh...
You see the Arduino Mega 2560 board has an ATMega 8 or 16 as the UART. In this instructables I was using an FTDI converter.

I would have continued to make some board support for this DIY Mega, however.... it burnt out.


When soldering in the oscillator crystal, make sure it DOES NOT SHORT THE LEADS. Note that it has a metal casing, so it should either be masked with electrical tape or place in another area.


That ended up shorting XTAL 1 and 2, Vcc, and GND all together. The chip smoked and I wasted a lot of effort.

As long as you follow all of these instructions, however, you will be able to accomplish what I would have if I have not made that mistake!


In other words

I shorted something by accident. If all of you out there remember not to short anything, your mega will work. If you do what I did, by putting the crystal in the wrong place and shorting it, it will not work.