# Voltage regulation for Atmega328p

I am designing a circuit containing two Atmega328p. First chip will drive TFT screen with 3.3 V linear voltage reg.

Second one will drive BT module, couple of relays, two sensors, SD card module, and will pass data do first chip to display.

The circuit will be powered by wall charger. Is it okay to use LM2596 buck converter module to get 5 V needed for microcontrollers or should I go for the linear voltage regulator. I am worried about the noise that SMPS can cause, but I am concerned about power consumption as well, since circuit will be ON 24/7. Only TFT will be powered on occasionally.

• When you say "wall charger" what do you mean? A USB phone charger? Or do you mean a wall wart? If the latter, what is its output voltage? Aug 18, 2017 at 12:47
• I meant wall wart. I just checked and I can buy 5V wall wart, is it ok just to connect 5V wall wart and don't use any kind of power regulation only bulk and smoothing caps? Aug 18, 2017 at 13:47
• Ah, ok. Yes, for sure you can use a 5 V wall wart. This is nothing else than an SMPS itself, but in most cases the ouput is quite reasonably filtered. Aug 18, 2017 at 13:57
• Yes that would be fine, as long as someone doesn't, say, plug in a 9V wall wart! Also, it's worth putting in reverse polarity diode. Aug 18, 2017 at 14:18

Did you already calculate the accumulated current the supply has to deliver? If you know that you can calculate your power loss of a linear regulator:

(U_in - 5V) * I = P

The difference between your input voltage and the voltage you want to regulate is the voltage that drops over the linear regulator. If you multiply this by the current you need, you have your power loss.

Now, you can either accept that loss and go with the easy and unproblematic way of the linear regulator or you don't accept that. In that case you would have to find a way to make the output noise of the SMPS small enough for your purpose (which by the way is not as hard as some people think).

It all depends on the input voltage coming from the wall-wart. Converting from from above 9 V to 5 V with a linear regulator would not be efficient given that you have a couple of devices at the output which could draw some significant currents.

Generally the the LM2596 won't do much harm you will be fine if you choose it.

If you are really worried you can use ferrite beads at the output of the LM2596 to reduce the switching noise. Like they suggest in the schematic below:

Just use a 5V wallwart, and 3.3V regulator for the TFT. \$6, probably way more current than you need too, I've used this one in lots of projects:

https://www.mpja.com/5-Volt-DC-Plug-Power-Supply-4A-Regulated/productinfo/18520+PS/