Arduino Robot Upload Fails! Help needed!

Hello everyone,

I can't anymore upload to the arduino robot.

I tried almost everything including hex upload from avrdude, arduino ISP, resets etc., nothing works unfortunately.

I also learned that the 32u4 chips are kind of problematic with the IDE because of the USB communications and sensitivity.

So I'm anticipating a lot of upload jams in the future.

In order to resolve this issue, I'm thinking of buying an ISP programmer so that I don't use the USB serial port anymore.

So my question is: Will buying an ISP programmer solve all my problems? If so, what (pocket avr, usbasp etc..) do you suggest?

Thanks! :slight_smile:

Noppe:
So my question is: Will buying an ISP programmer solve all my problems?

There is no way to know because you have not diagnosed the problem.

If so, what (pocket avr, usbasp etc..) do you suggest?

I like Pololu's version...

Thanks for your reply,

Actually, no I don't exactly know what the problem is, I just uploaded an official example script (robot control -> logo) and then it got stuck there. Well, the robot works fine, it does what it has to do. The problem is -> can't upload anything new...

On clicking reset, the RX/LED flashes 2 times so I guess the bootloader is fine. Perhaps I can even use the DFU on 32u4 (if the arduino people hasn't re-written on it).

On trying to upload another sketch: Well, the TFT screen and the board resets, RX line flashes a bit then the current sketch is still there. I get unsynchronization error from avrdude and/or the IDE. I was using the IDE 1.5 beta version when uploading these sketches. After the final sketch got stuck, I tried other IDE's but no luck.

My fuse settings for the 32u4 are listed on the preferences text as "ff" for low, "d8" for high and "f3" extended, "f2" lock. I checked these settings from "AVR® Fuse Calculator – The Engbedded Blog" and can see that SPI is on.

I came across this site:
http://www.hilltop-cottage.info/blogs/adam/using-atmel-studio-6-ide-with-arduino-uno-and-leonardo/
The arduino IDE also tries forced 1200 baud rate kick to start off the bootloader. However All I see is COMx numbers with arrows and blank "{}"s. So perhaps the 1200 baud kick isn't working???

Thanks for suggesting that usb avr. Do you think it is compatible with atmega32u4? I couldn't find it listed on their pdf.

I get this as well:

avrdude: stk500_getsync(): not in sync: resp=0x00

Perhaps the 1200 Baud kick doesn't do its job?

I did come up with this post:

http://forum.arduino.cc/index.php/topic,108270.msg838797.html#msg838797

I'll try and see what happens.

I'll also try the DFU thing with FLIP from atmel.

thanks

Okay guys SOLVED the problem!! :slight_smile:

How did I do it?

  1. Prepare arduino UNO board as ISP programmer as shown on the tutorial. Note that I did not have a capacitor on GND and RESET. This programmer was on COM4.

  2. erased the whole chip memory (the chip 32u4 on the arduino robot) with -F command. Here is my avrdude code:

avrdude -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -v -v -v -v -patmega32u4 -carduino -B 8 -P\.\COM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m -F

Note: the -F was necessary because I was getting device signature errors. However, be very careful when using -F as this might lock up some fuses and make things even harder!

  1. uploaded another example sketch (actually a hex file compiled by the IDE) with -F. here is the code:

avrdude -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -v -v -v -v -patmega32u4 -carduino -P\.\COM4 -b19200 -Uflash:w:C:\Users\XCOM\AppData\Local\Temp\build4730142799873281839.tmp_333.cpp.hex:i -F

A couple seconds of reset... aaaand it works!

I can then upload the good old bootloader so everything back to normal, phew!

anyway, thanks everyone for reading this!

This is Fantastic!!! Can you tell me where to find the tutorial that shows how to connect a UNO to program the Arduino Robot?

For tutorial, there is the one here:

However, I'll make a brief one here too, here is how I did it:

  1. Install Arduino IDE 1.0.5, (The others also might work but I used this one). If you have something else right now and decided to install this one, please make sure that you delete all the files that a previous installation might have left.
  2. Select examples -> ArduinoIsp and open it.
  3. Find the line "#define RESET SS" and change "SS"->"10". This will make your 10'th pin as reset signal. Save and upload this to your UNO. Your uno is now ready.
  4. Now disconnect your UNO from pc and do the following connections:

This is the arduino robot control board viewed from the back (even though it doesn't look anything like it). I've marked the UNO pin no's that you have to connect on the ISP (The ISCP channel marked on the robot control board).

  1. Now go back to the IDE and click on preferences and select verbose output during compilation and upload. THen select a robot control example (or write one yourself) and click compile (or click "verify") on the arduino IDE. You should get something like this:

  1. copy the filepath shown on blue on the above pic, and paste it to the code shown below.

avrdude -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -v -v -v -v -patmega32u4 -carduino -P\.\COM4 -b19200 -Uflash:w:C:\your_file_path.hex:i -F

So, for example write:
C:\Users\XCOM\AppData\Local\Temp\build1791068044929905252.tmp\R04_Compass.cpp.hex

instead of
C:\your_file_path.hex

on the code above. I'm assuming that your arduino is installed on "C:\Program Files (x86)\Arduino". Change this accordingly if you get an error. Also, I'm assuming that your UNO is on com4 etc. You can modify the code above to suit your needs.

  1. Now, open command prompt and go to:
    C:\Program Files (x86)\Arduino\hardware\tools\avr\bin

copy and paste the code starting with "avrdude ..." (with the modified filepath) on the command prompt.

You can also use avrdude-GUI for easier copy-pasting :slight_smile:

8 ) Press enter on the command prompt and if everything is okay, you should see the RX/TX/LED13 leds on your UNO flashing for 10-15 seconds.

  1. remove UNO from PC. Turn on the power of your arduino robot

  2. enjoy your new sketch!

If nothing happens, perhaps you missed a step?

Note: you only need to power your UNO, and if all your connections are correct, the UNO should power the robot by itself!

Noppe,
You are the only one that I have found, that seems to have a clue about how to deal with the upload problem on the Arduino Robot. I am an old guy and don't know much about forums. I see the that number of people experiencing the upload problem is growing exponentially everyday. I don't know if everyone with the problem has seen your excellent post. What to do? Do I relay this information to the moderator somehow and let him disseminate the information?
I admit that I have not had a chance to try your solution, but I am extremely grateful to you for working though the issue and taking the time to tell us about how to fix it. People like you that make everything fun for the rest of us.
I do think that there is a firmware problem that has not been addressed by the Arduino Gurus. It would certainly be wonderful for everyone concerned, if suddenly a miracle occurred and the problem was found and fixed. Determining the problem and fixing it is admittedly, well beyond my abilities or I would try to help.
Thank you again.

Hey Panda!

The robot library might have a firmware problem. I read my fuses and I can see that they are unprogrammed. (SPI is shut etc.) Normally, this shouldn't be the case. Even though my lock fuses are (0x3f), I can't program my fuses, I might need an HV programmer but can't/don't want to buy it just for the robot.

I belive that the Arduino Robot is overpriced and therefore very few people use it. This is probably the main reason why you/we can't find a lot of troubleshooting information about the robot. The robot is also getting very moderate reviews. I don't think the robot is bad: it had a few lose screws and non-functioning examples (line follow hello?) but that's okay, it still saves you from a lot of trouble, I can even use it for simple genetic algorithms. The problem is that, the robot is just not "arduino style". It is kind of problematic...

The solution I posted above (a slight modification of the UNO ISP tutorial adapted for the arduino robot) worked for me everytime; I belive it will work for you too if you do it the same way. However, if there are any problems, let me know and I will try to help.

If you could try and see if this method works for you as well, it would be a great idea to make this some kind of a sticky post. I remember how frustrated I was when it was only 2 days I've bought the robot and had an upload problem.

Thanks,

Hi there everyone.
Same problem... slightly different solution for me. Used the Arduino as ISP, connected to ICSP terminals as per above, uploaded a sketch as above, which worked. Then tried to upload a sketch from the Arduino IDE... nope. Long story short, I found the following method to work:

(This tutorial roughly follows this tutorial from Arduino http://arduino.cc/en/Tutorial/ArduinoISP)
First:
I'm not responsible for bricked robots, broken hearts, unfulfilled sexual partners, thermonuclear war, etc. Please do some research before you dive in. Guidance only :slight_smile:
Okay, here goes.
As mentioned above, before you upload ArduinoISP to your device that's going to be doing the programming, change the following line.

#define RESET     SS

to

#define RESET     10

Upload the code, connect the terminals in the way shown above.
REMOVE THE TFT SCREEN FROM THE ROBOT!
As mentioned here http://arduino.cc/en/Main/Robot

Control Board SPI: ...if you want to flash the processor using an external programmer, you need to disconnect the screen first.

In your Arduino IDE -> Tools menu, select the board as Arduino Robot Control, the programmer as 'Arduino as ISP' and the COM port as the one with your programmer device on it.
Select 'Burn Bootloader', then let it do its thing. Wait until it finishes, then plug your screen back in, upload a sketch and you should be away.
Hopefully this helped some people. Thanks to Noppe for the tutorial.

Hi All,
the same problem - after loading example R01_Logo it was impossible to load any sketch via IDE (1.5.6-r2).
I just tried the procedure described at http://arduino.cc/en/Main/Robot

Because of the way the Robot handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by double-pressing the reset button on the board. A single press on the reset will restart the user sketch, a double press will initiate the bootloader.

So I pressed RESET button twice between Compiling and Uploading phase and new sketch was loaded via IDE as usual.
I wanted to apply the procedures described earlier with AVRISPMKII programmer but it wasn't necessary.

Hopefully it helps someone.

Hi all, how are you?

Thank you so much Thyristor66, the double press on reset button worked like a charm for me when I was stuck on R01 :wink: