Go Down

Topic: MEGA2560 stuck uploading (Read 1 time) previous topic - next topic

Ba1-

Hey everyone!

I would like to start by saying I have probably read every thread on the new and old forums looking for a solution to this problem. I found people with the exact same issue and their problem was never resolved.

I am using an Arduino MEGA 2560 on Windows 7. I used it for 3 months prior to the uploading problem with no issues. The last program uploaded to the board is still on it; it is a small and simple program to run motors using the servo library. A week ago I attempted to upload another program and the program got stuck trying to upload. Since this time I have used 4 different USB cables on 3 different computers. I have updated from 021 to 022 arduino and have tried multiple programs (including the blink program) with no success. The uploader gives me a continuous loop of timeout errors and the LED at pin 13 stays lit the entire time (I waited over 30 minutes). The only way to stop the process is to hit the upload button again, in which case it says COM4 is already in use, or to unplug the USB cable.

I assumed it wasn't a driver problem since I have successfully uploaded programs from multiple computer before. The was no '!!!' in my code at all. Unfortunately I am using the board to control a robot that must be demonstrated in the next week and I fear that it will take longer than that to fix the board. Any help or advice would be greatly appreciated!

John

madworm

#1
Mar 26, 2011, 09:12 pm Last Edit: Mar 26, 2011, 09:15 pm by madworm Reason: 1
Get yourself a proper ISP programmer. Cheap ones (usbtiny) can be had for 20 bucks.

If uploading doesn't work with these, the board is seriously sick or even dead. The more threads on this subject I read - it must have been hundreds by now - the more I come to the conclusion that relying on a bootloader as the _only_ means to get code onto the micro-controller is just a waste of time.

This is not your fault. Just get a proper programmer and be free. You can even configure the IDE to upload using the programmer directly, or just run avrdude by hand.

Unfortunately this won't fix your current problem quickly, but in the future it will save your ass many times.

Quick fix: get a new mega board for your display and deal with the other one later. Maybe it can be revived, maybe not.

Ba1-

Thank you for the quick reply madworm.

I reinstalled the drivers and firmware with no success. I will rush order a new board today and hope it makes it on time. I will continue to search for a solution after the demo!

hugo007

You can force the upload by pressing the reset botton and the just plug the usb cable and hit upload the new sketch.
this way you will put the board in reset and the arduino wont start running until you release the botton.
just try ...
Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

Ba1-

Force upload did not work. I received the new MEGA 2560 today and it uploaded the same code no problem (Thank goodness). I will continue to look for a solution after the demo and post my progress. Thanks everyone!

nickgammon

The bootloader relies on the bootloader program itself being present in the firmware, and also various "fuses" being set to tell the processor to run the bootloader on reset. Conceivably a bit was changed somewhere in either the fuses or the bootloader which is why it won't work now. However the ISP programmer simply relies on the processor hardware itself and should be more reliable (for example, to replace the bootloader).

Interestingly, your project involves motors. Conceivably also a voltage spike damaged the processor, or even a single port on the processor, making the processor either fail entirely, or fail to read certain ports (for example, the port used by the bootloader). You may want to check that you have protection diodes in place across motors, or driver transistors.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

Ba1-

We are using multiple motors, the highest of which are rated at 16A stall. However, we are using Victor 883 speed controllers to drive these motors, which are rated at 60A. I was under the impression that these controllers would prevent the spikes you are talking about. The Electrical's in our project, myself included, are very inexperienced with motors and motor drivers. Perhaps there are extra precautions we need to take?

I would hate for something to happen to this new board before the demo.

Thank You.

nickgammon

I am not really a motor expert, however I have heard before that there is a correlation between people powering motors from their Arduinos, and trouble.

The docs for the Victor 883 are not very specific about what you need to drive it, and you haven't provided any details about what you are actually doing.

Try Googling for: "Victor 883" +"pwm driver"

There seem to be hints there that some sort of driver might be needed between the Arduino and the Victor.

The Victor documents say:

Quote
You will need (1) PWM extension cable or PWM Signal Driver.
1.   Use a PWM Signal Driver to ensure the signal from your receiver is Victor compatible if you are not using an IFI Control System.


So I don't know if your signal is "Victor compatible" whatever that means exactly.

I would post a query under the "Motors, Mechanics, and Power" section of the forum, asking for advice in connecting up the Victor. Preferably provide as much information as you can about what you have currently done.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

Go Up