Let's Make Robots!

Arduino project losing its mind

I'm using Ro-Bot-X's uservotino for my Venux robot. I recently had a problem where the sketch (program, for all you non-Arduino types) disappeared on me. The board would power up fine, but nothing would happen. Then I upload the sketch again and everthing is fine.

I thought it was an isolated incident, but it just happened again! Any thoughts on what would cause an Adruino to lose its mind?

EDIT: The issue turned out to be with the Brown Out Detection (BOD) settings on the Arduino bootloader. The BOD defined in the bootloader was disabled. When the power to the Arduino dips too low, it can wind up corrupting memory, including the stored code. The BOD feature tells the processor to reset if the power dips below a selectable threshold. Since my chip didn't have a BOD threshold set, I lost the program code.

To change the BOD setting, I'll need an ISP programmer, which I don't currently have. So I'll probably just live with this for now. Thanks for all the help figuring out what happened!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Yes, just follow my instructions up to programming the bootloader. Leave all other fuse settings in place and set just the BODLEVEL fuse to the desired level, then click on the Program button. You will see the result below, if it's OK, you're done and you can close that window and AVR Studio.

I don't have an ISP Programmer. Any recommendations?

Is AVR Studio 4 your recommendation for the IDE?

Long time ago I got a AVR ISP programmer, but I could never use it directly under Arduino IDE. I don't think you can even find it anymore. But from other people's recommendations, I would get a Pololu AVR programmer because it also has a second serial connection and a slo-scope. You can read more about it here: http://www.pololu.com/catalog/product/1300

IG, if you shoot me an email with a shipping address I can send you some chips with the boot loader. Let me know \0/

That is a very kind offer, which I will take you up on!

IG, do you have another Arduino? Then you already have a hardware programmer! Arduino ISP! Use it! Hack your µBotino if no other option. Just unplug the Dtr wire from your FTDI cable to avoid the auto-reset of the µBotino (after you upload in it the Arduino ISP sketch). Then make the connections from one board to the other (you have to read more info about that, sorry I haven't yet...) and upload the bootloader to the µServotino from the Arduino IDE. Not sure if you can use the Arduino ISP from AVR Studio, but you can try. Let me know if it works!

There is a shield to transform your regular Arduino board (not the Uno!) into a AVR ISP (hardware) programmer:


It has a ZIF (Zero Insertion Force) socket for the target microcontroller and it can also eliminate the auto-reset on the Arduino board by a jumper. You can also get a 6 pin ribbon cable to program external devices (like the µServotino). Cool!