Constant power supply is an important factor for the proper working of Microcontrollers. Voltage is commonly regulated using 7805 Voltage regulator.
Features of 7805 regulator.
1. Three terminal regulators.
2. Internal Short-Circuit Current Limiting.
3. Output Current up to 1.5 A.
4. Output Transistor Safe-Area Compensation.
5. Internal Thermal-Overload Protection
6. High Power-Dissipation Capability
Positive line of the regulator output is given to the VCC ( Pin 7 ) of the microcontroller and negative line of the regulator output is given to the GND pin ( Pin 8 ) of microcontroller. Pinout diagram of ATMega328 is given below.
Don’t forget to put a 0.33 micro Farad capacitor at input side and a .1 micro Farad capacitor at the output side of the regulator.
If your circuit is correct, then your microcontroller will working on a constant 5 voltage. Circuit will work even if the capacitors are not connected. But its better to add capacitors for the longer life of your voltage regulator and microcontroller.