Hi all,
Background spiel
I've been working on a arduino project involving a servo, some LEDs and an LCD module. For the development I've been using the Arduino UNO board and a breadboard for all the components. Now I'm ready to make the project more permanent, however I don't want to put the entire UNO board in the project as it 's a bit of a waste putting the entire thing in when I only need a few pins. So I went on and used the "bareduino" schematic and managed to get the ATMega328 chip working on there without the UNO board. However I want to further shrink the components needed in the permanent project.
Currently I'm using a 4x AA batteries (6V total) to power the ATMega328 using a 7805 regulator with some capacitors to reduce the voltage to 5V for the ATMega328 and the servo power is plugged in before the regulator so it can use higher current (7805 will cap to 1A max).
Instead of using batteries I wanted to instead use a 5V DC mains supply (one used for a phone where it outputs 5V DC and 2.5A max current). As I'm using a 5V DC plug, I want to remove the 7805 portion of the circuit. I've attached a basic strip board of what I'm trying to do minus the LEDs and LCD.
Questions
-
As I'm using a DC mains supply that is already capped to outputting 5V and 2.5A max, can I remove the 7805 regulator?
As the mains supply is 5V DC it doesn't need to reduce the voltage further, but I wasn't sure if having a 7805 regulator between the mains and IC added some other layer of protection I'm overlooking. -
As the servo is being plugged into the same "power rails" do I need to add anything like a rectifier diode (1N4007) to protect the ATMega328 at all (as I hear people saying motors can cause reverse power spikes that can damage ICs)?
If so, where should I put it or is it unnecessary?
Thanks for your time and advice!