I am new to the Arduino family and would welcome some help. I have built a unit copy on a stripboard to control a number of servos for a model railway layout and I am hitting a problem. I have programmed the atmega328 and it works ok on a standard UNO. If I now take the chip out and install it on my stripboard it is getting hot and is consuming approx 200mA. I have been over my stripboard over and over looking for a wiring fault but to no avail.
If I look at the various circuits shown on the web some show the AVCC and AREF (Pins 20 & 21) pins tied together and some leave it floating. I have tied them together.
Could this be my problem?
Having AREF floating or connected to VCC/AVCC shouldn't cause the problems you're seeing. It is more likely to be a problem on the board. What sort of power draw are you seeing if you remove the ATMega328 from the stripboard and then power up the stripboard?
AREF must NOT be tied to Vcc (otherwise selecting an internal analog reference will damage the chip)
AVcc must be tied to Vcc (otherwise the chip can be damaged, because half of the chip is powered through the internal protection diode)
You must have a 0.1uF cap between Vcc and Gnd, and one between AVcc and Gnd. (otherwise chip may hang or reset unpredictably). The connections should be as short as possible (I put one on either side of the chip).
If you are copying an uno (ie, running at 16MHz with crystal), you need the 16MHz crystal and loading caps. Connections to these should also be as short as possible.
Any guide that gets any of those things wrong was written by someone who doesn't know what they were doing and may have made other errors - if you see one of those rookie mistakes in a guide, immediately stop using it, because who knows what else they screwed up.
That all said, the fact that the chip got hot indicates a severe wiring error - Vcc/Gnd reversed, voltage higher than Vcc or lower than Gnd connected to an I/O pin, power or ground connected to the wrong pins. Anything that resulted in the '328p getting hot has probably trashed the chip.
Problems solved. After reading the replies I did a thorough double check on my "wiring" and found a solder whisker across two tracks. Once that was cleared the current reduced considerably. I also fitted two caps (disk ceramics -104) as suggested. The unit is working fine now. With two servos connected plus the 555 input board the steady current is 150mA with 12v applied (via a 7805 reg).
My project is to operate multiple servos to operate model railway switches or points depending upon a digital input signal from the main controller so I have a small circuit board with a 555 connected across the track. The output from this feeds the stripboard UNO which in turn operates the servos. WWW.arcomora.com refers.
Many thanks for the feedback.