Magnet screwed up my Arduino Mega!

I made a speaker for my mega from nokia mobile speaker. I throw the speaker that I made into same bag where I held my arduino. The outcome of this is that my arduino is not responding to any code that I upload to it.

Can my board be saved by flashing bootloader again? :'(

A magnet will not damage the arduino unless it has a ruff edge and messed up one of the traces while in the bag. May want to take a close look at the board and make sure there is no physical damage to it.

Thanks for reply. I did not see any physical damage on the board. The magnet is really small - like a shirt's button but quite powerful. I hope I can fix it burning bootloader again.

Any ideas for building own isp programmer for linux? I found this, but could not find a circuit layout for it (PCB). http://www.fischl.de/usbasp/

It's impossible (as far as I know) for a magnet to adversely affect a Duemilanove because of how it stores its data.

What exactly is happening when you try to upload code?

I cannot think any other reason why my board does not work. It was in an ESD-plastic bag. I cannot see any physical damage on it. When I upload a code into it - the program compiles code and gives no error. While compiling board's tx & rx led will not blink as they used to do.

Today I might get an isp programmer from a friend. I am considering could there be some kind of fuse bit mix-up? What a magnetic field will do to a capacitator if it is charged?

What a magnetic field will do to a capacitator if it is charged?

Nothing as far as I know. :-/

Nothing as far as I know

You know correctly. :)

There is no known mechanism for a magnetic field to interfere with or break an IC or capacitor, resistor or inductor.

I am a bit alarmed you talk about charged capacitors, was there one of those in the bag as well?

What a magnetic field will do to a capacitator if it is charged?

I suppose the Hall Effect might pull some of the leakage current to one side. ;D

No hall effect only works in a semiconductor not a conductor. But otherwise good joke. ;)

No hall effect only works in a semiconductor not a conductor

Oh dear, I don't quite know how to break this to you, Mike, but...

Yes it's been one of those days. :-[

I erased bootloader from the board with studio 4 and then I burned it with a bootloader file that I got from Arduino hardware folder. Now my mega just blinks and it does not respond any code that I upload into. Arduino just happily compiles everything that I give.

When I try to burn bootloader in Arduino with STK500 clone it gives this:

avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

What should I do? Buy another Arduino? I have avr dragon on my table but haven't figured out what to do with it.

Should I get eeprom programming file somewhere or should it be empthy or what?

Success!! I burned bootloader with dragon and everything works! So happy! ;D

Did you burn the correct bootloader? With the correct fuse settings? The fact that you are getting something (0x51) back from the Mega makes it look like there is some communications happening, perhaps at the wrong serial speed. That could be caused by the bootloader not matching the “tools/board” speed setting, or by using the wrong clock source fuse setting. (And the fact that you were able to successfully program the bootloader with the STK500 probably means the chip itself is OK…)

I did try to burn correct bootloader with arduino. Where do I set fuses in arduino? Should I have set speed to 57600 for usb-port as it is in boards.txt? In windows port-speed was 9200.

Since I got nowhere with arduino bootloader burn - I did it with avrstudio4. No errors there.