Electronic – MCU powered from the same PSU as a LED strip

capacitorled stripmicrocontroller

I want to make a simple controller of WS2812B addressable LED strip. I will consist of a MCU (most likely Atmega328P), a couple of buttons (RESET and mode selection) and 7-segment indicator, which will show current illumination mode. Power to the strip will be delivered by a N-channel MOSFET, which gate is also driven by MCU. Max length of the strip is 4 meters, I plan to use 30 leds per meter strip, so maximum current consumption is 6A (1.5A per meter). Since this current is only required if all LEDs are white at full brightness (which I don't plan), i'll use a Mean Well 5V@5A PSU. I think even 5A will never be reached in any application.

Main question is, is it OK? Or do I need to use secondary small PSU for microcontroller? This I'd like to avoid, of course. MCU together with indicator would draw no more than 150 mA.

Another question is, is it OK to use only two large value capacitors (470 uF), one at the input of power, another at strip output? Do I need a separate small ceramic capacitor close to Atmega pins? It's no problem to add, but I'm not sure if it's required: the board is really small, and distance between input 470 uF capacitor and 5V input pin is just 6-8 mm.

Third question is, do I need a fuse on the board? If yes, how to choose it's value properly?
Below is my simplified schematic (7-segment indicator and buttons are omitted):

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

Yes same powersupply can be used. Yes you need separate 100nF ceramic at AVR supply pins, it is a local bypass for high frequency current pulses the AVR takes every clock cycle. The electrolytics are quite bad at high frequencies. Also, I am slightly worried about using FET to cut ground from the LEDs, as the data pin must then be set high so that it does not pull current when it is low. Turning the power on with FET will charge the output capacitor with a high current pulse so it might break. Think carefully if you even need to cut power from LEDs, and whether high side switching would be better.