so i was trying out diffrent examples in the arduino ide for the arduino mega2560 and i noticed it started hetting hot so i tryed a simple blink sketch with the onboard led that blinks every half second and the main micro controler herts warm or hot even if there is no code on it. i would much appreciate some help please.
If it is powered only by USB cable and nothing else is connected to it and it gets hot, then it is either faulty or damaged.
Is it a new Mega or had it been used before by yourself or others?
i have had it for about a year now and no matter how i power it, it still gets hot
Did it get hot when you first used it a year ago?
no not from what i can remember
Then I'm pretty certain something you did damaged it. Sorry...
The thing is is that I havent connected anything the the io pins the only thing I have connected was a push button thats it
and it still works perfictly it just gets quite got would it be ok just to put a small heat synk on it to keep it cool with a snall thermal pad
Sure. It may live a little longer that way.
But alas, its time seems limited.
well i have the heat sync it was a spare so why not
How is the button attached? to which pins? Pull up/down resistor used?
pull up on Pin 9
Is anything stuck to the underside that shouldn't be?
under the ic or the arduino its self
Somewhere that conducts poorly between 2 traces and drains power. It could be anywhere on the board, it could be a bit of food or something you just haven't noticed that stuck on when you set the board down one time. This is a longshot but it is possible.
If the board is a knockoff, a component may have failed in a less than spectacular way is also possible.
It's not sitting on any conductive, is it?
Perhaps your 9V to 5V regulator is bad, providing 9V to the processor. Do you have a multimeter? If not you should get a low cost one for such measurements.
The processor would get 9V for a very short time before getting smoked. But go for it.
Not that I would recommend it but...
You would be surprised how much they can take before giving up the ghost. I put 12V on 6 of the inputs of a 74HC245, after about 10+ minutes realized it and it still worked fine with the proper 5V.