Programming Arduino Mega 2560 with external USB-to-serial adapter

Hi,

I'm trying to program a Mega 2560 with an external FTDI USB-to-serial adapter (i.e. not using the onboard USB port). I need this because the Arduino is about 20m away from the controlling PC.

When connecting RX, TX, VIN and GND from the adapter to the Arduino, I can send/receive data through the serial connection. As soon as I connect DTR to Reset, the serial connection stops working. After adding a 0.1µF capacitor between DTR and Reset, communication works again. Programming the Arduino does not, however. I always get the following message during upload:

Binary sketch size: 3,960 bytes (of a 258,048 byte maximum)
avrdude: stk500v2_ReceiveMessage(): timeout
... Repeated 5 times ...
avrdude: stk500v2_getsync(): timeout communicating with programmer

The adapter works fine when uploading to an Arduino Pro Mini, so I assume something in the Mega's onboard USB-to-serial part is interfering here.

Any ideas what I could do to make this work? Thanks!

You need to break the "RESET-EN" jumper just above the 47µF capacitor on the Mega2560.

When/ if you want to use the on-board USB again, solder a two pin header onto these points and put a removable jumper on.

Thanks, that did the trick!

I can now program my Arduino Mega with an external FTDI or CP2102 usb-to-serial adapter. As the RESET-EN also exists on the Uno, I guess it works there, too.

Note: At least with the CP2102, the 0.1µF capacitor from DTR to Reset is still required.

Hi miqe

Could you give me more details on how were you able to connect and program the Arduino Mega 2560 with an external USB-Serial converter? I have a weird situation. I feel my onboard USB-Serial via the ATmega16u2 has broken (may be because of static electricity or so). The sketch on my board just works fine which means the actual 2560 microcontroller is fine.

Now I need to update the code and upload to arduino, but not able to do so since the Serial port COM8 in my case doesn't work at all. I tried all possible solutions including putting the ATmega16u2 into dfu mode and recover it. Unfortunately in R3 there is no DFU support as it looks like.

The last resort left out for me (before throwing off the Arduino) is to try to program it via an external USB-Serial adapter. Details on that would be quite helpful.

Thanks,

atripathy: I tried all possible solutions including putting the ATmega16u2 into dfu mode and recover it. Unfortunately in R3 there is no DFU support as it looks like.

What about using another Arduino as IDE to program via the ICSP on the ATmega16u2? That would be the usual way to reprogram it if it gets scrambled (in which case DFU would also not work).