Close

A little forethink

A project log for Clock7

A 3D printed, illuminated, colored, connected, smart powered, 7 segmented clock

nathan-bleuzenNathan Bleuzen 10/28/2018 at 15:020 Comments

Electrical requirements

Powering the LED strip

The rule of thumb for the WS2812B is that each LED with its driver can consume up to 60mA when set to white full brightness RGB(255, 255, 255). The clock will be made of 4 7segs display, each having 7 segments (duh..!), made out of 4 LEDs. That's a total of 112 LEDs. If we count 4 LEDs for each dot that will be in the middle of the clock that's a grand total of (tadaaaa!) 120 LEDs. This is quite convenient since you can buy a 2 meters strip of WS2812B with 60 LEDS by meter from AliExpress for cheap.

Therefore, we have: 120LEDs * 60mA = 7.2A

Not all LEDs will be on at the same time, and even if I'm not sure they will run at full brightness. Using a 10A 5V we can make sure we don't run out of power and the power adapter will only run at a fraction of its maximum output resulting in better efficiency.

Driving the LED strip

The second electrical issue is that the ESP8266 board (I'm using a ESP12E NodeMCU) is running on 3.3V whereas the WS2812B needs the data line to be run at, at least 0.7 * VCC. When powering the strip at 5V to have the rated performance the threshold of 3.5V is to high for the ESP. However as the board has an onboard voltage regulator we can supply the board with 5V from the power supply on the Vin pin without having to step it down to 3.3V, which is nice.

Back to the data line problem. We need to make a 5V signal (at pretty high speed since the WS2812B use a 800kbps data-rate) to a 3.3V level. Different ways to that exist.

One would be to lower the power supply of only the first LED to lower the threshold on the data line, at the output of the first pixel the data line will be rectified higher to the same level that the VCC and pass it to the next pixel using 5V. The problem with this method is that we loose brightness on the first pixel.

The way I choose to go is to use a bus transceiver level shifter that can shift a signal from 5V to 3.3V. For some reason I had a hard time using it and making it work. After multiple models of level shifters tried without successfully operating the LED strip I tried using an other Arduino library than the Adafruit one. Using the NeoPixelBus library with a level shifter worked where the Adafruit one didn't.

Discussions