I'm new here and I'm a newbie in electronics. Since 1 year I'm playing around with Arduino (different types) and now I want to build my own thing: a smiley with WS2812D-F5 RGB leds. But I'm not sure if I did any misstakes. Is it possible that an expert in electronics can check my schematic? That would be very kind, nice and cool :)

Functions: The switch SW1 is connected on D8 (PB4) and if pushed the smiley changes from sad to happy. pushed again it changes again and so on.

Because the WS2812 leds needs a lot of current, I have added some different possibilities to power the whole thing: 1x DC jack connected on a voltage regulator that output 5V fixed and two pins for a LiPo 3.7V that ist connected too on the voltage regulator. I dont know if it works if the LiPo has only 3.7V.

Well.. then I added a power switch, micro usb, FTDI and SPI connection. If one fails to burn the bootloader or to upload a sketch, I have more possibilities to do that ;)

Yeah I think thats it. If I forgot something, just ask me. Thanks a lot!

Kind regards.

Greetings from Switzerland

delf Schematic WS2912 atmega32u4 smiley

Edit 15.5.19 18:00 Ok, I just changed the schematic based upon your great advices :) Thanks a lot to everyone. I changed/added the regulator. Current output=3A (each one). Should be enough. But I'm not sure if I can divide the current in that way.

What do you think? :)

Greetings to everyone :)

Version 1.2

  • Be sure that every component, that lies between the power supply and the LEDs, is capable of giving the needed current. Also the supply has to provide enough current – chrisl May 15 '19 at 6:42
  • A 7805 as a regulator on a circuit that needs about 4A...?! OUCH. I think not. – Majenko May 15 '19 at 9:31
  • Majenko already replied to the most important part (the power management); I'd like to just give a few advice. The LiPo battery connector cannot work that way, since the 7805 needs at least 6-6.5V to work. Moreover you shouldn't connect it in parallel to a 12V supply. The very first time you forget it connected and you also connect the 12V... well, there are a lot of videos of batteries exploding... Finally try to be "cleaner" when drawing the circuit; avoid too many intersecting lines since they are confusing (for instance look at the reset line). Finally SW1 is useless (you cannot control it – frarugi87 May 15 '19 at 12:19
  • Which method and/or programmer are you using to burn the bootloader? – Gerben May 15 '19 at 14:56
  • @frarugi87 SW1 has only the function to check if the signal is high to change the shape of the smiley. That should work or did I forgot something? Finally I forgot something important: the max amount of running LED's = ~50. I just add a newer version in a few minutes with the layout of the pcb – swim hive May 15 '19 at 15:51

On the FTDI header you need to swap the TX and RX pins. The TX of the FTDI should connect the the RX of the Arduino, and vice-versa.

Also, on the FTDI header, the USBVCC pin is connected directly to the 5V pin. I would want to connect my PC to that header if external power is applied to your board. If you're never going to use that pin to power the board, you could leave it disconnected. The same applies to the USB port.

I'd have the LiPo connector bypass the regulator, as all it does is drop the voltage even lower. A LiPo is around 4.2V when full. The 3.7V is only it's nominal voltage.

D1 is in a weird location. If you want to use it to prevent reverse polarity, move it between the jack, and the input of the voltage regulator.

  • Thanks a lot for your advice :) I just did a few changes. But I'm not sure if I can split the current in that way and how to power the VBus. Is it possible to connect the VBus pin with the output pin from the "regulator2"? Kind regards - – swim hive May 15 '19 at 18:37
  • It seems the VBUS pin is an input pin, used to detect if USB is plugged in. So you could wire the 5V from the USB port directly to the VBUS pin. And no connect it to the 5V from the regulator. Leave the Vcc from the FTDI header disconnected. – Gerben May 15 '19 at 18:42

No. That circuit will not work.

The moment you turn on more than a few of the LEDs the regulator will go into meltdown. No matter how powerful your power supply is, that regulator is the bottleneck and will overheat the moment you try and light your smiley face.

The regulator (a venerable 7805 - I mean, come on, that's from the ark. There's far better modern regulators now...) is rated for a maximum of 1A. That is with very good heatsinking and thermal management, and an input voltage only slightly above 5V + the dropout voltage. Your circuit can draw up to about 4A. That's 4x what the regulator is rated for when it's at its most optimim - probably 6x to 8x what your arrangement would be able to provide.

For this kind of circuit you need a switching regulator. One that can provide many many times the current of a linear regulator like the 7805 (or the more modern LM1117-5.0). You need one that will provide at least 4A, and ideally a little more for some extra headroom. So you're looking at 5A.

With a decent efficiency you could then run the whole thing from a 12V input with 2.5A minimum current. Assuming 85% efficiency:

  • 12V @ 2.5A = 30W
  • 85% of 30W = 25.5W
  • 25.5W @ 5V = 5.1A

So a 12V, 2.5A supply being fed into a 5V, 5A switching regulator with at least 85% efficiency will allow your circuit to operate more reliably.

You also need to take care with your PCB layout (assuming you are designing this for building on a PCB). Switching regulators take a certain amount of care when laying them out. You should refer to the recommended PCB layout in the datasheet for your chosen regulator and stick as closely to that as you can.

Also handling larger currents requires more thought put into your traces. This site has a handy trace width calculator.

As an example: for a 5A trace over a distance of 5cm with (standard) 1oz copper your trace should be at least 2.77mm wide. That will give a 10C temperature rise in the trace at room temperaure (25C to 35C).

  • Hi :) Thanks a lot for your help! like I said: I'm a newbie :) can you recommend a voltage regulator? I only find linear voltage regulators that provide 3.3V and 5A. But I need 5V :-/ Thanks a lot for the usefull informations. But.. the rest of the circuit works? About the traces on the pcb: only the VCC and the GND trace should be ~3mm wide or am I wrong? Thanks a lot for your kind help :) Greetings and keep smiling ;) – swim hive May 15 '19 at 11:59
  • 1
    @swimhive personally I'd go with larger traces, or even planes. I suggest you to try to minimize the amount of current in a single point (for instance use a sort of "tree" connection rather than a sequential one). – frarugi87 May 15 '19 at 12:23
  • Certainly for the ground you want a solid pour rather than traces. Then route the power traces first, and only afterwards worry about the signals. – Majenko May 15 '19 at 12:36
  • @swimhive As a newbie I wouldn't suggest designing your own switching regulator circuit just yet. Take a look at external modules, such as UBEC modules for model aircraft etc. – Majenko May 15 '19 at 12:36
  • @Majenko Yes you are right. But I have to :( There is one thing that I dont understand. My Arduino Due can drive 50 pieces WS2812B leds. One single led uses max 60mA (20mA for each color). If every led is white it consumes 60mA each. Total=3000mA. The regulator on the DUE is a LM2734Y and has a max. current output 1A. But it works.. how? – swim hive May 15 '19 at 13:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.