Computers, Development Boards & Shields
Educational & Robotics Kits
Electronic Sensors
Motors & Controllers
Communication & Display
Electronic Components
Soldering & Lab Tools

Bring your dead Uno/Mega back to life! How to fix ATMEGAXXU2 issues

The Problem:

If you are reading this, chances are you are like most folks that have picked up an Arduino Uno or Mega recently and discovered that on occasion they will just stop working. When it happened to us the first time we thought it was a fluke, when it happened to us a second time we thought we had broken something, and when it happened to us the third time we just got flat out angry.

Up until this point we had decided not to carry any of the newer devices because of the device occasionally just ceasing to function. It may be catchy but without a way to cure it you just have to go out and buy another Uno or Mega and wait fearfully for it to happen again. Granted it appears that the most susceptible to this problem are those tinker a bit more than the usual hobbyist, but being part of that elite group of nerds who break stuff we decided to figure out how to fix the problem and share it so that no one has to go through the amount of pain it took to get to this point.

At first, we thought we had blown the AMEGA328 chip, but changing the ATMEGA328P-PU never seemed to fix the problem. The driver kept reading as an “unknown driver present” or “problems with the current device”. This caused no connectivity with the Uno, and though it blinked away there was nothing we could do to actually use it.

After many painful hours of digging what we found was that Since the change from the old product line to the new, Arduino made a transition from a dedicated USB to Serial FTDI based communication chip to the new ATMEGA8U2 and ATMEGA16U2. Now for a while, we have been skeptical about these chips ( due to the two Uno boards that died within the first week we got them). So we took the liberty to find out the cause and solution to this problem. Hopefully with these instructions, you too can bring your dead Uno/Mega back to life!

The Solution:

Now you may ask yourself how on earth do I fix an SMD part if it is corrupted? Well, Atmel was kind enough to provide an answer to this, FLIP (Windows) or DFU Programmer (Mac OS X and Linux). FLIP can be downloaded from here http://www.atmel.com/tools/FLIP.aspx . For DFU Programmer use the following.

Mac: Install MacPorts following these instructions: http://www.macports.org/install.php#pkg

Once MacPorts is installed, in a Terminal window, type sudo port install dfu-programmer

NOTE: If you’ve never used sudo before, it will ask for your password. Use the password you login to your Mac with. sudo allows you to run commands as the administrator of the computer

 

Linux: from a command line type

sudo apt-get install dfu-programme

or

sudo aptitude install dfu-programmer

depending on your distribution

 

(Steps can be found for Mac and Linux on the following Arduino page for installing hex files http://arduino.cc/en/Hacking/DFUProgramming8U2 . Credit goes to Arduino for Mac and Linux programming portions )

These little nifty programs allowed connection to the chip from the USB, provided getting into DFU mode (Depends on which version, look at following picture to determine which version Uno you own).

The area circled red shows the version Uno you have, If it’s version One or SMD, no indication will show. Version two is shown with a R2, version 3 shown with R3

After the device is plugged in via USB, the two red circles at the top need to be shorted for a second to enter into DFU mode, this step is required for all versions. If you have version one, then the following step needs to be done prior to removing the short.

For the Arduino Mega 2560

arduino_mega_2560_dfu_jumpers

For version One only

This version requires a little bit extra. The two pads located on the back in the red circle need to be shorted after the reset pin on the front is shorted to ground. Once these are shorted, remove the short for the reset on the front. The device should come up as DFU (see image below to determine if in DFU). Once in DFU, you can remove the short on the pads on the back

Once you have DFU activated, the device manager will show the new connection. This connection called Arduino Uno DFU needs a drive for installation. The driver can be found inside the FLIP program download. (Follow images for clearer instructions on finding the driver).

Click on devices and printers menu under the Windows start program. Image shows that you have entered into DFU mode but no driver is installed.

Right click on DFU and click properties. Click properties at the bottom right of the window that popped up. The next window may/may not need the Change settings button click, depending on your version of Windows (found in the lower left corner). Once done, click the Update Driver button.

Browse for the driver located wherever you saved the Atmel FLIP file. (Found in the AtmelFlip 3.4.5usb) Click next to begin install of the driver.

 

A warning message from Windows Security may pop up, depending on version of Windows. This is normal (some drivers do not have a signature file for Windows, hence the warning). Click the install this driver software anyway to continue with the install

Driver is installed and shows a new device, AT90USB82. Even thought the chipset is not the Atmega8u2, this driver will work for programming multiple different types of chipsets.

Once the driver is installed, you will be able to use the FLIP program to reinstall the HEX files. The following pictures show the process for installing the original HEX file back into the Atmega8u2 chip. The process for updating the Atmega chip is the same up to this point; the only change is the HEX file.

Open the FLIP program, this program should look something like the image above. First we want to load the HEX file located in the Arduino program download. Make sure to select the correct HEX file, there are multiple files and if the wrong one is selected, either the chip will not work the way intended or will not load the new HEX. (Atmega HEX is much bigger for the R3 Uno, so cannot load onto the 8u chip. This is why the 16u replaced the chip.)

Once the HEX has been selected, click the image that looks like an IC chip (arrow pointing up). Locate the correct device that Windows installed, in this case the AT90USB82 driver was installed. There is an Atmega8u2 device in the list, but cannot connect to the USB device due to no driver being found.

Next connect to the device by clicking the USB cord and clicking USB (many of other ways to connect, have not explore other ways at the moment). A window with Open, Close, and Cancel will pop up. Click Open and the device should connect to the Uno.

If connected correctly, a lot of the grayed out sections should be active now. The selection on the screen should show the HEX file selected   and other selections, along with information on the current device. The only buttons needed should be the Run button (To install the HEX file) and the Start Application button (to restart the device after install).

After you finish the upload of the new HEX, restart the Uno by unplugging it and replug the device back in. If you have drives for the Uno already installed, you should be good to go. If not, find the drivers for the Uno located inside the Arduino program folder to install the Uno driver. Hope this guide helped with your problems and happy programming.

As always, feel free to email us or comment if any questions come up throughout the process and we will help in any way we can.

Still can’t get yours working?

Don’t worry we sell a variety of Arduino boards, and cover them with a 90 day warranty on top of the manufacturers warranty (which is serviced in Italy).

34 Responses to “Bring your dead Uno/Mega back to life! How to fix ATMEGAXXU2 issues”

  1. Will this fix the chipset permanently or is this just a reoccurring process? That is Arduino dies and you re-load the hex.

    • We are still exploring the exact cause of this problem, but so far I can assure you that there is a possibility of having to perform this operation again.

      In general with light to moderate usage we have found this to be a rare requirement, but in cases where the device is used regularly this seems to be much more commonplace.

  2. What if the Arduino refuses to got to dfu mode? I’ve got an Arduino Uno R3.

    • You left it plugged into the USB while you touched the pins right? I haven’t seen it not work yet, but obviously if you actually “fried” your ATMEGAxxU2 then it won’t much matter how hard you try to get it into DFU mode.

      Respectfully,
      Joseph Dattilo

  3. Great tutorial for reviving the board! But I have a problem, when I shortcircuit the two pins closest to the USB conector, nothing happens! But when I press the reset button I do get the blinking.. Is there something even more wrong with my board?

    • That would certainly be a possibility, what version of the Arduino are you using?

      • I’m using the UNO R3 which front view changes a little for the pins sticking out next to the usb connector

        • Based on some work with others who have had similar issues it looks like there is a possibility that the USB Chip on the Uno R3 (or other Arduino device that uses an equivalent) can become permanently damaged. The primary symptom for that is that shunting the pins does not cause it to go into USB mode.

          I hope that helps, and please let me know if you happened to have got it working.

          Respectfully,
          Joseph Dattilo

  4. Hi,
    I’ve got an Arduino UNO R3 just bought yesterday, connected a DC motor to pin 13 an now the computer won’t recognize it at all (no sound, no nothing), it is still running the sketch I uploaded to it (dough it requires a serial connection from the PC) but won’t enter DFU…
    What can you suggest me?
    http://www.instructables.com/id/Tweet-a-Pot-Twitter-Enabled-Coffee-Pot/step5/The-Code-Arduino-Side/

  5. Thank you very much for this, it brought my Uno back to life, the Arduino scene is brilliant for beginners like me and you are a good example of the help and support available, you made my day!!

  6. ” First we want to load the HEX file located in the Arduino program download.” How can I locate the proper .HEX file.. where it is located exactly……… plz help me…

    • Okay, so the .Hex file you need depends on the Arduino type you are trying to repair. The easiest way to figure out the right bootloader is to look at the boards.txt in the hardware/arduino folder of the IDE.

      Once you know the .hex file you need you should be able to find it in the hardware/arduino/bootloaders folder of the IDE.

      Hopefully that helps,
      Joseph Dattilo
      Founder Virtuabotix LLC

  7. It’s really awesome it works great for me…. you saved Rs.1350/- of my valuable money….. thank you very much…..

  8. Hi, my Arduino Mega2560 r3 stopped working. Yesterday I was using it with ramps 1.4 to control a 3d printer but I flashed a new firmware (repetierhost), while it waas still connected to repetier host so it showed up some errors in arduino IDE, that had happened before but nothing serious happened until yesterday. I disconnected the usb cable of the board from the computer then I plugged it in and a yellow led keeps blinking, I used flip, I can erase the memory, but not program it, the program icon in flip is red. Other thing curious is I dont have to short the board to connect flip to it. In device manager it appears as an atmel device.
    does it has to say DFU even when flip driver is installed?

    • That is interesting, have you been doing this inside your printer, or has it been removed so that it can be programmed separately? The fact that the Mega is showing up in DFU mode without you shunting anything is probably not a good sign, but let me know if you are able to get it working when you remove all connections to the printer from the board.

  9. Hi, recently I can’t upload programs to my Arduino Uno R3, I’ve tried several recommendations and then I stumbled into this blog. I could connect to the Arduino with the FlIP software. The driver installed in Windows 7 was the ATmega16U2. Then I looked up the hex file in the boards.txt file and found that for the Arduino UNO the file is named: optiboot_atmega328.hex. I found this under in arduino/hardware/bootloaders/optiboot, but when I try to select it a message appears “Address is out of range”. I also tried uploading other files, like the one in the images: Arduino-usbserial-uno.hex but without solving my problem.

    Are you aware of any solution regarding this issue? I’d appreciate your help a lot and thanks in advance.

    • If you have successfully re-installed the arduino-usbserial-uno.hex file and your board is still not working then you can pick up a replacement ATMEGA328 with the Arduino Uno Optiboot Bootloader on it here.

      As for the problem loading the optiboot_atmega328.hex file, you can only do that to an ATMEGA328P-PU like the one we sell bootloaded already. The reason you got the error was because the Atmega16u2 has much less memory, and is wired differently than the core ATMEGA328 that runs your board.

  10. Thanks for the great tutorial! I was sure this was going to fix my board – a uno r3 which is running it’s current sketch fine, but not responding to upload requests. Unfortunately it looks like my 16U2 must be damaged beyond hope of repair – It won’t go into DFU mode at all. I see a few other people have reported the same problem, but have not given any next step ideas.

    Could you advise whether there is any other way to upload sketches to the board, without going through the 16U2, or am I going to have to give up and buy a new board?

    Thanks,
    James

  11. how do I get into DFU on a mega 2560 R3 with CH340Q chip? there are no header pins on it.

Trackbacks/Pingbacks

  1. Revivendo arduinos | Repositório da Automação – Turma de 2013 - December 20, 2013

    […] reinstalação do firmware do seu conversor serial através do software Atmel Flip (disponível em: https://www.virtuabotix.com/how-to-cure-sudden-uno-death-syndrome/), cuja interface pode-se analisar na figura […]

  2. My Homepage - January 14, 2014

    … [Trackback]

    […] Read More: virtuabotix.com/how-to-cure-sudden-uno-death-syndrome/ […]

  3. Oživenie Arduino UNO R3, ktoré sa nezobrazovalo v správcovi zariadení | Sitepoint mikroelektronika - November 23, 2014

    […] Druhý krát sa odporúčalo z nezistenej príčiny, prestalo sa hlásiť vo Windowse, žiaden virtuálny COM port, nič. Reštart, iný USB port, iný kábel, nič. Zelená LED svietila, ale to bolo všetko. Pomeral som napätia na MEGA238P aj na MEGA16U2, všetko hralo. Skúšobne som išiel nahrať nejaký program cez FTDI kábel (VCC, GND, D0, D1, RESTART) ale nešlo to. Bolo jasné, že bootloader alebo celý procesor je v čudu, iný som po ruke nemal, tak som začal pátrať a objavil som super návod ako využiť DFU režim MEGA16U2. […]

  4. GP | Pearltrees - April 13, 2015

    […] Multiple arguments can be appended to commands. Callback functions can be triggered on received commands. You can find the CmdMessenger Playground page here: CmdMessenger. Serial COM Tutorial Part 4 (Visual Studio C#) Java For Beginners – Contents Page. Visual C# .NET for Complete Beginners – a free programming course. Hotel Room Booking Tutorial (ASP.NET, C#, VB, SQL Server) Bring your dead Uno/Mega back to life! How to fix ATMEGAXXU2 issues – Virtuabotix LLC. […]

  5. PC no reconoce Arduino (/dev/ttyACM0) | LinUES - May 10, 2015

    […] nueva imagen. Hay varios tutoriales, comenzando como el del sitio oficiar [1] y otros [4] [5] [6] [7] que me resultaron […]

  6. Aside: Frying ATMEGA16-U2 on Uno (R3) | Project Echo - November 1, 2015

    […] Sudden Uno Death Syndrome […]

Leave a Reply