Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1] 2 3   Go Down
Author Topic: Can't upload to Arduino Mega 2560  (Read 5385 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Since yesterday, I can no longer connect to my arduino Mega 2560. I was playing with a servo when the servo had some strange behavior (turning left, right, right, left etc etc). After that, I can't upload anything to my Arduino. I'm running Windows 7 and I had never problems before.

When I try to upload something to the board with the shift key enabled, I get the message 'avrdude: stk500_getsync(): not in sync: resp=0x00'.
I tried to burn the bootloader through usb but that gives me the same error.

In the Arduino environment are the board type and the port entered correctly.

I hope someone can help me with this.
Thanks in advance.
Logged

Miramar Beach, Florida
Offline Offline
Tesla Member
***
Karma: 159
Posts: 6316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you powering the 2560? USB or power jack? Do you still have 5v on the +5v pin?
How are you powering the servo?

edit: Before you think about powering the Uno or Mega with the +5v pin, you should read this topic
http://arduino.cc/forum/index.php/topic,82046.0.html
and this response from the Arduino crew
http://arduino.cc/forum/index.php/topic,82046.msg758170.html#msg758170
« Last Edit: September 02, 2012, 07:27:46 am by SurferTim » Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 2560 gets its power from an usb port. There is 5.00V on the +5V pin en 3.29V on the +3.3V pin.
I was powering the servo from the +5V, ground and digital pin 9.

I can not really measure the power on pin 9 cause I only have a multimeter and not a scope (I was sending pulses to pin 9 with 9ms interval). Although I can measure that pin 9 is powered.

When I power the servo with an external power supply my program works. So the arduino is still alive.
« Last Edit: September 02, 2012, 09:53:30 am by Samueldw » Logged

Miramar Beach, Florida
Offline Offline
Tesla Member
***
Karma: 159
Posts: 6316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do not power the servo from the +5v pin. Bad idea. It is not as much the current, but the inductive nature of servos cause some bad sags and spikes on the power input.
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I will take that into account, but what could cause the problem that i can't upload a sketch or the bootloader?
Logged

Chile
Offline Offline
Edison Member
*
Karma: 35
Posts: 1251
Arduino rocks?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I will take that into account, but what could cause the problem that i can't upload a sketch or the bootloader?

If the com port appears in arduino, the cause probably is the bootloader. If not, can be several things, mostly the small chip that handles usb-serial connection
Logged

My website: http://ried.cl

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, the com port appears. If I do not connect the arduino, the compiler returns 'avrdude: ser_open(): can't open device "\\.\COM3"'.
So my arduino connects to my pc. It start compiling and uploaden so the com port is in use. If I want to try uploading again, I first have to disconnect my arduino from the usb port, otherwise it says 'com port in use'.
Logged

Chile
Offline Offline
Edison Member
*
Karma: 35
Posts: 1251
Arduino rocks?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, the com port appears. If I do not connect the arduino, the compiler returns 'avrdude: ser_open(): can't open device "\\.\COM3"'.
So my arduino connects to my pc. It start compiling and uploaden so the com port is in use. If I want to try uploading again, I first have to disconnect my arduino from the usb port, otherwise it says 'com port in use'.

OK, try this mod: http://arduino.cc/forum/index.php/topic,118440.0.html if it works to you please tell me smiley
Logged

My website: http://ried.cl

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately it didn't seem to work. Still the same problem. When I press shift+ U, your ide asks to apply a fix and afterwards it's says 'Done Uploading' but nothing has happend.

Although I like your work smiley
I like the button in the taskbar.
Logged

Argentina
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I came across the same problem. I have a friend that is really good at this and I told him to take a closer look. I will keep you posted if I get any news from him.
Logged

I like to stay all day ... at work smiley

Chile
Offline Offline
Edison Member
*
Karma: 35
Posts: 1251
Arduino rocks?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately it didn't seem to work. Still the same problem. When I press shift+ U, your ide asks to apply a fix and afterwards it's says 'Done Uploading' but nothing has happend.

Although I like your work smiley
I like the button in the taskbar.

Windows version? 32 or 64 bits? If unplugging your arduino fixes it temporalilly it should work + new winavr seems to not drive to the "serial is already in use".

If you are in win vista or 7, does some permission request pops when you press fix? I am thinking that I forget something for 32 bits smiley-grin (I only have win7 64 bits to test)
Logged

My website: http://ried.cl

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using win7 64bit.
There is indeed a permission request when I apply the fix.
Logged

Chile
Offline Offline
Edison Member
*
Karma: 35
Posts: 1251
Arduino rocks?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, the com port appears. If I do not connect the arduino, the compiler returns 'avrdude: ser_open(): can't open device "\\.\COM3"'.
So my arduino connects to my pc. It start compiling and uploaden so the com port is in use. If I want to try uploading again, I first have to disconnect my arduino from the usb port, otherwise it says 'com port in use'.

Are you able to upload something? Maybe I misunderstood what you said earlier.
Logged

My website: http://ried.cl

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I can't upload anything. It starts uploading but does not finish.
Also the leds TX and RX don't blink, like the normally do when you upload something.
Logged

Chile
Offline Offline
Edison Member
*
Karma: 35
Posts: 1251
Arduino rocks?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I can't upload anything. It starts uploading but does not finish.
Also the leds TX and RX don't blink, like the normally do when you upload something.

Ahh, in that case my mod version can't fix anything because it is not the serial port being use, it is probably a problem in the bootloader. Reading the last sentence of that message I thought by mistake you were saying: "first time works, second says serial already in use".

First test loopback test (google that). If goes wrong = small chip has something weird -> test DFU mode and updating that firmware (16u2 or 8u2 depending on your arduino). If loopback test is OK: look for instructions how to upload the bootloader again.
Logged

My website: http://ried.cl

Pages: [1] 2 3   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: