Bootloader only works once (MEGA 2560)

Disclaimer: I've searched a lot of similar topics on internet, followed several procedures, none of these worked :frowning:

Hello Everyone!

I've just brought an Arduino Mega 2560 for my 3d printer. (chinese Arduino board)
When plugged, it first started blinking the yellow led (possibly missing the bootloader)

Using a Arduino Uno, i burned a new bootloader on mega. After that, I uploaded the 3d printer program to the Mega. It worked. Once.

After a small change, i had to upload a new firmware. Then the arduino IDE does not finish the upload. I've got the following message:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

Anyone has a clue? Thanks in advance!

Op System: Windows 7 x64.

The blinking led did not indicate a missing boot loader. It's the default sketch (blink) that is loaded ('from factory') in Arduinos and probably in most (or all) clones.

I can't really help you with the problem; did you accidentally overwrite the boot loader when you loaded the sketch?

Hmmm how could I do that?

I've just downloaded the most popular 3d printer program and uploaded it. Also, I made a test:

  1. Burn bootloader
  2. Upload the blink example. [sucess]
  3. Change some times on the blink code.
  4. Tried to upload blink example again. [Error]

Re-bootload it, and then upload the bare minimum sketch. Does that upload work?

If yes (and assuming subsequent upload attempts still fail) - you'll notice that when you press reset, the light blinks a few times. This is done by the bootloader to let you know that the bootloader is running. When you're trying and failing to upload, do you get the blink pattern then too? (this verifies that autoreset is working).

Is anything connected to pins 0 or 1, or to reset? Anything connected to those pins is likely to interfere with uploads.

Is anything connected to it at all?

If you load a program via the Icsp (?) connector , then it overwrites the bootloader and you cannot then use the USB connector until you reload the bootloader

Thanks for all the help!

Re-bootload it, and then upload the bare minimum sketch. Does that upload work?
Yes, also works with the heavy 3dprinter program.

when you press reset, the light blinks a few times.
Damn, mine doesn't do that. The orange light is up all the time. When i press reset, it just turn off for milisecs, and then gets up all the time again, no blink pattern.

Is anything connected to pins 0 or 1, or to reset?
I've tried both. Without anything connected and connected to a arduinomega shield called 'Ramps 1.4'.

If you load a program via the Icsp (?) connector.
Not that case, I've used this schema using a Uno as a programmer: