Hello and thanks in advance to everyone trying to help me!
I have a Arduino Mega 2560 and unfortunately I touched unintentionally a cable on the bread broad. I immediately noticed that my PC rebooted. I had a 12V external power supply and the USB cable attached to the Arduino board. A driver IC was drawing some current (up to 0.8 A max), I guess.
After this incident my Arduino is not recognized as an USB device anymore. No USB plug-in sound, nothing reported in device manager, etc.
I checked the USB port on the computer, other devices work just fine. So, luckily the computer was not hit. I checked the USB cable and it works fine with other devices. I reinstalled the Arduino IDE and driver, but it did not help. I tried to connect the Arduino to another PC (Linux) but same thing, it is not recognized. I measured voltages (VIN, 5V, 3.3V) all fine with USB only and with external 12V supply. All lights are on and fine. Reset does work. I reprogrammed the Mega2560 chip using AvrMKII and it works fine (!). So, I can still use the board but no USB connection, which is a pity.
Then, I tried to connect to the Usb-2-serial (Mega16u2) via my AvrMKII and it worked as well. I could download the memory and flash it again using the HEX file that comes with the Arduino IDE. All worked fine. However, the board is still not recognized as USB device, nothing. I checked the board but I cannot see obvious damage, shorted/blown soldering or ICs/components.
Any other idea, what to check and/or what could be wrong?
It could be that the boot loader has been zapped. I have noticed that his can happen on some chips from Atmel that are not used on Arduinos.
I would try burning a new one in for the Mega. Select the Megs and use the burn boot loader menu option. You do need an external programmer for that, but I understand from your post you already have one.
Thanks, I will give it a try. You mean the boot loader of the Mega2560 is also important for the USB to be recognized? I thought only the Mega16u2 was responsible. But anyhow, I am desperate, so I will give it a try.
I gave it a try. My AvrMKII is correctly recognized by the Arduino IDE but when I choose the option "Burn Bootloader" I get an unspecified error: "Error on burning boot loader." (free translation to English). The same when I try it on the Mega16u2 chip.
Another remark: when I choose: Export compiled binary file then I get a file which is with the bootloader; and if I upload this with my AvrMKII programmer to the Mega2560 I should replace the bootloader, right? However, no way to find out if it is working properly...
Any other ideas? Or an idea why the Burn bootloader fails...
I have no idea why the bootloader gets wiped. I only know that this has happened to me about three times when making a 3D printer with another Atmel chip of the same class as the Mega.
My Mega doesn't have the 16u2 chip as an USB to serial converter, is it a genuine Arduino Mega?
You look to see if serial data is being generated on the TX pin.
Use an oscilloscope or an LED wired to light up on a logic LOW, because it is easer to see a short on flash than a short off flash.
It is looking more likely that your 16u2 chip is toast, or it has lost its code. There are ways to program this chip but I am not sure what pins you have to probe.
I think that @stephan1982 already did that; see below quote.
Yes, I did this, but maybe I did it wrong. However, the connection to my programmer is fine and I can read out fuse bits and hex dumps without problems from Mega2560 and Mega16u2
Yes, I can, and also my own programs. So, I do not think that the 2560 is toast but with the 16u2 I am not sure. Still weird that I cannot use the "Burn Bootloader" option for any of the two.
So, I can still use the board with my programmer but to have serial-via-USB as output would be very nice. I have ordered a new board just in case, but it would be nice if I can rescue this one somehow.