Hi,
As soon as I connect my arduino to my laptop, the ATMega chip starts getting and within 5 minutes, I cannot even touch it. I really don't know why is it happening and moreover, suddenly, none of IDE softwares are recognizing my board. I'm getting this error constantly "avrdude: stk500_getsync(): not in sync: resp=0x00". I don't know if these are two problems are related but please, can someone help me?
It is the same problem. The chip should not get hot. There might be a shortcut somewhere, or the Arduino board is broken.
By the way, it is always running code (except in sleep mode).
If the chip is getting hot, that's usually an indication that one or more outputs have been damaged, and it's only a matter of time until the chip fails altogether.
Thank you very much. So does that mean that I need to get a new chip for the board? And is the error related to the chip?
Yes; and there might be something in your design that is causing the damage. What do you have connected?
It wasn't working for a motor I was working on and the chip was getting hot. So I tried the blinking LED code using pin 7 and it wasn't working. But the chip is getting hot every time I connect the board to my laptop.
Time to replace it.
Pull the chip, and try the Loopback test, make sure the USB/Serial interface is still working.
How did you have the motor connected? Using a NPN transistor to sink current thru the motor? Did you have 220 ohm resistor between Arduino and transistor base? Did you have a diode across the motor? (anode to transistor collector, cathode to motor supply voltage - lets current generated by the motor when the transistor turns off dissipate in the motor and not destroy the transistor). 1N4001 diode is a good generic diode for small motors.
Logic Level N-channel MOSFET is also good for driving a motor. AOI518 from digikey is a good example for a low current motor:
RDS(ON), Static Drain-Source On-Resistance, with VGS=4.5V and ID=20A: 0.007 ohm typical.