Introduction: DIY Arduino Mega 2560 or 1280

Picture of DIY Arduino Mega 2560 or 1280

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...

Step 1: 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

Step 2: Stick It On

Picture of Stick It On

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.

Step 3: Placement

Picture of Placement

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.

Step 4: Smother in Flux

Picture of Smother in Flux

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.

Step 5: Drag the Solder

Picture of Drag the Solder
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.

Step 6: Pinouts....

Picture of Pinouts....

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!

Step 7: If You Prefer to Perfboard It...

Picture of If You Prefer to Perfboard It...

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.

Step 8: Test It Out!

Picture of Test It Out!

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....

Step 9: Finished... Confession

Picture of Finished... Confession

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.

Comments

carlos66ba (author)2013-09-03

Nicely done. But why didn't you simply change the burned part rather than toss everything out?

TSJWang (author)carlos66ba2013-09-03

Hi Carlos,

I actually tried to identify the burned part. After I replaced the resistor, something else was heating up.
I decided that it wasn't worth the hassle to replace every single part in that part of the board.
So I desoldered every part, kept them (for the future), kept the un-populated board as a memoir, and made this!

Good suggestion though. I wish I knew what was burnt!

carlos66ba (author)TSJWang2013-09-04

Thanks for the reply! Your set-up looks nice, I dread soldering surface mount components :) (too small to see!)

afridave (author)2016-10-19

any idea why the mega got hot to start with?.....I have the same problem with my uno.....will not download...gets hot when plugged into the usb....and after a while the light go really dim.... ..however the last program I loaded still runs when plugged into battery power...so I assume the chip is still functioning fine....so I figure ill diy a uno someday...

TSJWang (author)afridave2016-10-20

When there's heat that means there's a lot of energy being wasted.
That probably means there's a short in the board: either inside a component or on the traces.
I think what's happening with your Arduino is some component(s) between the USB and ATMega are broken. When you run it off battery, you bypass those components and nothing heats up.

Be careful with the heat! You might want a new Arduino to prevent breaking your computer's USB port or anything else.

afridave (author)TSJWang2016-10-20

THANKS MR WANG....already have new uno....and have recently purchases the dr robot bluno mega...would however like to salvage what I can from the fried uno....if the chip is still good its highly possible to easily rebuild.....

Nasser768 (author)2016-09-29

Can you share the circuit schematic please ?

TSJWang (author)Nasser7682016-09-29

I didn't have a schematic: it was very arbitrary.

If you look at the datasheet for the 2560, you can decide what features you want to have.

Here is the original schematic of the Arduino Mega: https://www.arduino.cc/en/uploads/Main/arduino-mega2560_R3-sch.pdf

DannyV33 (author)2016-09-02

I was curious if you were to order the chip from the manufacturer instead of desoldering it from an Arduino Mega...How would you add a Bootloader for serial communication, if that is even possible?

TSJWang (author)DannyV332016-09-02

Hi,

Towards the end of the instructable I talk about how I solder ISP programming pins. If you have an ISP programmer you can burn the bootloader that way.

Mihemine (author)2016-08-12

So XTAL 1 and XTAL 2 go straight to the pins on the crystal ? no other resistors / capacitors required ?

Great instructable !

TSJWang (author)Mihemine2016-08-13

For this I didn't bother with the capacitors.

http://embeddedelectronicsforatmegaseries.blogspot...

according to this blog, there are calculations you can do for the crystal to see what capacitor to use.

Mihemine (author)TSJWang2016-08-13

Was just making sure, because I saw 22pf caps on the mega and some other arduino pcb files

Thanks for the link !

GordonM19 made it! (author)2016-04-29

Had a half dead Mega from china ( familiar story :) ) So , rather than bin it , this article inspired me to build a brand new one. No USB to Serial . but added FTDI break out pins. This is partly based on the Mega R3 Schematic. Works nicely!

Works

JayaprakashL (author)GordonM192016-07-29

Sir can you share the PCB design please

GordonM19 (author)JayaprakashL2016-07-29

If you can get and install KiCad , I will give you the whole package... will that help you?

JayaprakashL (author)GordonM192016-07-29

Yes Sir it will , Thanks for the great help

TSJWang (author)GordonM192016-04-30

Awesome!
Did you hand print that double sided PCB?

GordonM19 (author)TSJWang2016-04-30

Hi!

Yes I did , designed in KiCad and transferred using Toner Transfer method.

Used a tinning solution to tin the board at the end. All vias are 0.6mm and hand done , all 81 of them :)

I did reverse the analog and digital ports to ease the routing.

3000eleck (author)2016-06-30

Can I use AVRISP mkii as programmer in arduino IDE to burn bootloader...

TSJWang (author)3000eleck2016-06-30

I think so, you just need to change what programmer you are using in the IDE.

PiotrG7 (author)2016-05-01

Can you tell me, which one pins and wires do you connect in step 7? I can't see anything on photos, and don't have to burn the atmega ;D

TSJWang (author)PiotrG72016-05-01

That's a difficult one.
If you look at the pinout in step 6 that might help.
Basically you want to wire up the following things
- XTAL oscillator clock crystal
- ISP Programming port
- Reset button to reset
- LED on pin 13
- TX RX and other UART pins to the UART header
- idiot lamp

EirikB1 (author)2016-01-26

When you came to the part with flux, at first it looked like you had totally melted the chip XD

liqinliqin (author)2014-05-30

Hi,
I have developed the <a href="http://www.iot.fm"> iot system</a>and the open hardware
http://www.smartarduino.com where you can buy arduino and PI kit.
I want to cooperation with you,and how i can do next step?

liqinliqin (author)2014-05-30

Hi,
I have developed the iot system http://www.iot.fm and the open hardware
http://www.smartarduino.com where you can buy arduino and PI kit.
I want to cooperation with you,and how i can do next step?

Rocker517 (author)2014-05-25

A few more questions. What are the six pins that you said you couldn't use. And could you explain the wiring. And also why couldn't you use the Arduino IDE for the 2560 chip. And if I use the 1280, do I need to use AVR Studio, or can I use the official IDE instead?

TSJWang (author)Rocker5172014-05-25

I'm not sure what you mean by the six pins, but there are six pin ISP cables for programming if that is what you are asking about.

I couldn't use the Arduino IDE because I probably burnt out the UART part of the Arduino. This means that I could not program it through the USB port anymore, and I could only program it with the ISP.

You can use the official IDE for the 1280. I think there is an option in the Boards menu for that.

Thanks for your questions!

Rocker517 (author)TSJWang2014-05-26

Could you go into more detail for the wiring to the perf board?

Thanks

TSJWang (author)Rocker5172014-05-26

Sure,

Like I said it was only if you prefer it. You can use the breakout of the chip as it is and wire it to a breadboard or something, but that will be time consuming.

I put it on a perfboard so I could have the convenience of an Arduino again.

I connected the six ISP pins from the bottom of the breakout to the six headers on the breadboard.

I connected the crystal oscillator to XTAL 1 and 2 on the breakout (soldered from the bottom again).

A dummy LED was added from Vcc to GND (with a resistor) so I would know if the circuit was powered on or off (and to notify me of shorts).

An LED and resistor were added to the "Pin 13" of the ATmega, just like an Arduino (Digital pin 13 would be pin 26 on the schematic).

I added a button from the RESET pin on the breakout to GND

And of course, I wired all the all the Vcc on the perfboard and breakout to a common Vcc and all the GND to a common ground.

So now, doing all that I have the same properties of an Arduino (minus USB programming and a voltage regulator)

- ISP

- LED on pin 13

- reset button

- power LED

If you want, you could add an FTDI circuit to the perfboard, and 5v and 3v3 voltage regulators to the board.

Rocker517 (author)2014-05-23

Can the mega get power while not connected to the computer? Like with a 9v or 12v battery?

TSJWang (author)Rocker5172014-05-23

Yep, all you need to do is connect ground to ground and whatever voltage to Vin.

I wouldn't use any voltages higher than 12v however.

TSJWang (author)TSJWang2014-05-25

By the way, I was meaning this for the Arduino Mega. You need to use 3.3-5v on the chip itself.

Rocker517 (author)2014-05-25

Could I use this board instead?

http://www.schmartboard.com/index.asp?page=product...

And if so, what would I do with all the extra holes on the side?

TSJWang (author)Rocker5172014-05-25

Yep,

It's QFP, 0.5 mm pitch, 100 pin. That sounds right.

I guess for the extra holes you can just leave them alone; you don't need headers on them.

Rocker517 (author)2014-05-25

A few more questions. What are the six pins that you said you couldn't use. And could you explain the wiring. And also why couldn't you use the Arduino IDE for the 2560 chip. And if I use the 1280, do I need to use AVR Studio, or can I use the official IDE instead?

rpotts2 (author)2013-11-16

OMG! Thank you! I didnt think it could be done!

TSJWang (author)rpotts22013-11-16

:D

Raphango (author)2013-09-11

Great idea! You can always salvage something! ;D

TSJWang (author)2013-09-05

So, Now I am going to attempt to make another Arduino with the ATMega 8 chip on that burnt out Arduino Mega 2560.
Wish me luck in soldering QFN chips!

About This Instructable

86,195views

90favorites

License:

Bio: These instructables are mostly about electronics. I hope you find them helpful!
More by TSJWang:Game of Life With Nokia 5110 LCDLED Audio Waveform Display (100% Code Free!!1)DIY Apple Clock
Add instructable to: