I'm about to install a small Christmas decoration that utilizes 5 meters of WS2812B

I’m about to install a small Christmas decoration that utilizes 5 meters of WS2812B strips, an Arduino Uno Rev 3, and a 100watt 5V power supply. I also have a 9 volt wall wart power supply available.

My concern is in three parts: 1) I’ve heard that powering the Uno with 5v bypassing the voltage regulator is a bad idea. 2) I’ve heard that turning off power to the light strips before stopping the data line from the Uno may damage the first light/WS2812 chip. 3) the whole thing is going to be switched on each evening via an A/C timer and switched off later the same way.

Obviously I’ve got more than enough 5 volt power available, but I don’t know if I can ignore issue #1. If I use the 9 volt wall wart, the Uno may stay powered longer than the lights and trigger issue #2 when #3 happens.

I would appreciate some real-world input on this. I’ve fiddled around long enough that I’m about to miss Christmas altogether. :slight_smile: (and I started this project in August)

#1 If you are supplying 9v to your system, you must feed it through the onboard regulator. As 5.5v directly into the Uno (and probably your LEDs) will be enough to irreparably damage them, let alone 9v. If using a 9v brick to power everything, then feed it into the Vin (and GND) via the barrel connector so the regulator can do its job and turn your 9v into 5v needed by everything. Tap 5v from the Uno to feed your LEDs.

#2 This is a concern only if you are using 2 (or more) different power sources. One for your Uno and one for your LEDs. If you are using a single supply feeding both, then when turned off, the supply will collapse at the same rate for the Uno and the LEDs. As the Uno supply is always at exactly the same level (ignoring any capacitors around the Uno regulator) as the supply to the LEDs, then there is no chance that the data output of the Uno will be higher than the supply to the LEDs and thus no damage should occur. If you are really worried, enable the ‘Brownout’ feature in the system fuses of the 328P chip and this will ‘lock’ and ‘reset’ the processor out as soon as the power goes wrong, minimising any possible damage. Also place a series resistor in the data line to prevent any real current flow if things go AWOL. Can’t remember the preferred value, there are plenty of articles around covering this subject.

#3 No problem, good energy saving idea. You could also connect a light sensor into the Uno so it knows when it is light or dark and turn on/off as the level changes. Put the program into a ‘sleep’ after blanking out the LEDs to use minimum power. Then wake up periodically to check the light level again. You can also dim you display when really dark so the display is not quite so harsh on the old eyes. And brighten when ambient light is bright so you can see your display better.

Just seen that you have 5m of LEDs. The onboard regulator is not up to that job. So the LEDs will have to be powered directly by a suitable source. Feeding the Uno from this same single supply will still be OK, because the output voltage of the regulator is feeding both still and thus the Uno output voltage can’t exceed the input voltage, which is the same as the voltage to the LEDs and thus no over-voltage anywhere.

If you have different regulators around, then you will have different voltage collapse rates and thus risk of over voltaging.

I have read the same warning about not feeding +5VDc directly in.

I can’t guarantee that it won’t cause problems ( so don’t sue me… :wink: but I have powered a clock using a Mega 2560 this way and it has been working for close to a year now. I assume the +5V Regulation thing is identical (or very very similar to the Uno!)

I am (still… :frowning: ) working on my Xmas tree even now and I use the same setup. IE: A 100W 5VDC PSU feeding directly to an Arduino MEGA’s 5VDC and I have powered up and down the thing numerous times and also connected/disconnected a USB cable from my PC many times without any issue !

The only warning I would add is… do not connect anything EVER to the DC-IN if you feed +5Vdc directly. In that case, the onboard regulator may fight a losing battle to regulate internal voltage.

I remember my initial concern was not with the onboard regulator itself as you are connecting to the output of a floating regulator (no input voltage supplied) but the supply of the internal 3.3v with this method.

I found that the internal 3.3V was still generated correctly with way !

I have the same configuration and here is what I did: +5V power supply connected directly to the LED strip. I also cut up a USB cable and connected the red wire to +5V and the black wire to ground of the 5V power supply. Put some tape on the USB cab;es data lines to protect them, but to not connect them to anything. I plug this “power only” USB cable into the UNO to power the UNO. Has been working great for about a month with all switching happening at the AC outlet. Powering the UNO through the USB connector bypasses the onboard regulator, but current still goes through the current limiting fuse on the UNO. When I am debugging, I remove the 5V power-only USB and connect a USB cable from my laptop. Everything works fine with the UNO powered from the laptop and the LED string powered from the 5V power supply. This way there is no chance of blowing out your laptop USB port if your 5V power supply supplies too much voltage. (I am more worried about protecting my computer than protected the LEDs) I am no expert on LED strings but this is working fine for me.

It seems adding a 450uf between +5VDC and the first WS2812B input and a 300Ohm resistor on the data line is preventing the first chip to be damaged. I received my 3 strips last friday. I’ve been playing a bit during the weekend. Had some troubles with my WS2812B at first. Got only ramdoms flash from the first chip. It needs to be connected to the GND of the +5VDC with the 2 wires (red/white) and also to the GND of my UNO with the white wire of the 3 PINs connector. i’m only using the green wire of the 3PINs connector for the DATA. My 2x50 LED pixel string has the WS2811. it works great with the 2 wires assigned DATA (Green) to pin 11 of my UNO, CS (White) to the pin 12 and separated power supply. 5+VDC (red), GND (black). according to this source : https://solarbotics.com/download.php?file=2159. You also need to add a 1N4148 high speed diode to the +5VDC (ahead of the capacitor). i’ll have a ride to the local electronic store tonight :wink: