Arduino Mega2560 not being detected

Hi everyone,

I have a Arduino Mega board which was working fine but after one bad evening,i don't know what exactly happened. Now the board is not being detected. Whenever i plug USB cable with my laptop, it says "USB device not recognized". I have tried different cable but problem remained the same. I also plugged UNO, UNO+WIFI board and Arduino Nano board and all three were detected successfully. I connected faulty Mega2560 with other computers and even with a Ubuntu 20.04 laptop as well but none of PCs/Laptop was able to detect it. LED (on pin 13) and Power LED constantly remain lit.

Initially i thought that i bricked Atmega2560 but i can program it using ICSP header. Then I used Nick Gammon's Atmega Board Detector sketch (more details here) to check USB-to-Serial chip Atmega16U2, it showed 0xFF for all locations of Bootloader (unfortunately i forgot to save the output at that time) and hence i made conclusion that firmware of Atmega16U2 is missing. Also, i could not work out Nick Gammon's How to flash the USB chip on the Arduino Uno from this link because i couldn't work out DFU programmer for windows (well i didn't tried hard :slight_smile: )

Then i tried this instructable to upload firmware to Atmega16U2, i followed steps 2 & 3 of the instructable with following modifications

  • My bootloaders folder contains this file only
    Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex
    [/li]
  • My boards.txt file is
# See: http://code.google.com/p/arduino/wiki/Platforms

menu.cpu=Processor

##############################################################

megarestore.name=MEGA 16U2 Restore Firmware

megarestore.bootloader.tool=arduino:avrdude
megarestore.bootloader.low_fuses=0xff
megarestore.bootloader.high_fuses=0xd9
megarestore.bootloader.extended_fuses=0xf4
megarestore.bootloader.file=Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex
megarestore.bootloader.unlock_bits=0x3F
megarestore.bootloader.lock_bits=0x0F

megarestore.build.mcu=atmega16u2
megarestore.build.f_cpu=16000000L
megarestore.build.board=mega.build.board=AVR_MEGA2560
megarestore.build.core=arduino:arduino
megarestore.build.variant=standard

##############################################################

But even after successfully uploading the bootloader, i am getting the same error

I again uploaded Nick Gammon's Atmega Board Detector sketch to my working UNO and checked the firmware of Atmega16U2 again. The response received in serial monitor is attached as Atmega16U2_after_bootloding.txt

I guess the firmware has been uploaded successfully. But i noticed strange ( or may be not) things that even though my boards.txt file has "Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex" file mentioned but response of Atmega Board Detector sketch states it has "Arduino-dfu-usbserial-atmega16u2-Uno-Rev3" programmed and also

Bootloader in use: No

There is no visible fault in hardware (though i have replaced regulator AMS1117 with LM1117 during the troubleshooting process)

I have attached boards.txt file as well

Atmega16U2_after_bootloading.txt (24.1 KB)

boards.txt (774 Bytes)

ahsan4288:

Bootloader in use: No

There is no visible fault in hardware (though i have replaced regulator AMS1117 with LM1117 during the troubleshooting process)

I have attached boards.txt file as well

WHY did you have to replace the regulators ?
It sounds like you damaged something prior to having possible bootloader issues ?

If you damaged other components they would also need to be replaced even if you cannot physically see the damage. That is often the case if the board was abused in some way and is very hard to repair without all the required test equipment.
In that case you would need a new board and more care in how you attach things.

A schematic of what you had attached may also be useful.

WHY did you have to replace the regulators ?

I plugged 12V power adaptor but arduino couldn't turn on but AMS1117 was getting too hot, replacing with LM1117 solved the problem.

A schematic of what you had attached may also be useful.

Nothing was attached to arduino board as i was only testing arduino's code and using serial monitor for verifying "expected outputs"
I forgot to mention that "reset_en" jumper is also disconnected.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.