Pages: [1]   Go Down
Author Topic: Arduino Robot Upload Fails! Help needed!  (Read 436 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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! smiley
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

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

I like Pololu's version...
http://www.pololu.com/product/1300
Logged

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

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 "http://www.engbedded.com/fusecalc" 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.
Logged

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

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
Logged

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

Okay guys SOLVED the problem!!  smiley

How did I do it?

0) 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.

1) 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!

2) 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!
« Last Edit: April 10, 2014, 05:05:41 pm by Noppe » Logged

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

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

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

For tutorial, there is the one here:
http://arduino.cc/en/Tutorial/ArduinoISP

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).

5) 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:



6) 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.

7) 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 smiley

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.

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

10) 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!
« Last Edit: April 14, 2014, 04:23:34 pm by Noppe » Logged

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

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.
Logged

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

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,
Logged

Pages: [1]   Go Up
Jump to: