Hi, I am building a robot with an Arduino Mega 2560 and I was uploading and testing several time using battery power to power the board and robot (the robot has 3 12 V DC motors).
All of a sudden when I went to upload a new code the port is greyed out. I can still plug in an UNO and upload, and my board still runs the old program but the MEga is no longer recognized by my computer
I have tried all usb ports, different cables, different computers, reinstalling the arduno IDE, all with the same result. Mega is NOT recognized. This is weird to me as it still lights up and runs the old code I just cant upload anything new
I am using windows but the device does not show up on device manager on any pc. The sketch I had previously uploaded still runs so I believe the micro controller is working. From research I think that whatever allows the board to connect via USB is broken. I may need to use an external USB to serial to upload to the board but I'm not sure how to do this. I also don't know if this can be fixed by returning to the manufacturer or if I need a new board.
Are there common issues that cause the USB converter part of the board to break? I'd like to now how to avoid this in the future since I need to complete this project for school and I don't want to keep frying my boards?
That does sound like the USB-Serial chip has gone kaput. Are you using a genuine Mega, or a clone?
It should be possible to use an external USB-Serial converter instead of the onboard one. It might be easy or hard to do, depending on exactly how the onboard one has failed.
If you aren't too fussed about using the onboard serial you could always just get an external programmer (like a USBASP, they are only a couple of dollars on whatever online auction site you prefer) and program it using that.
Pjim_robot:
What causes the USB serial chip to fail? It would be nice to avoid this issue for future projects down the road.
The genuine boards use a micrcontroller as the USB-Serial bridge instead of a dedicated USB-Serial chip, and it seems that they are a bit less robust than a dedicated USB-Serial bridge. I've never seen the issue examined in any great detail but there are a few people here and there that have had the USB-Serial microcontroller on their genuine board fail.
kprims:
Just my opinion. Buy a USB to TTL converter that has the DTR lead. It saves you from trying to time the Reset when uploading sketches.
Definitely do this. Also be aware that if the USB-Serial microcontroller on the Mega is still tying up the serial lines you might have to force it into reset to allow an external USB-Serial adapter to work.
Thank you all for your help. The USB to TTL I posted the Amazon link allows me to upload. As kprims stated I do need to hold the reset button, but for me this is a minor inconvenience compared to having a bricked board.