Firmware
How I did it
Thanks to Roger Clark's WS2812B LED example for providing code for the LED string. The number of LEDs in that example has been changed from 30 to 300. Uploading code to the Blue Pill is done easily using the Arduino IDE.
You'll need to add Dan Drawn's package_STM32duino_index.json to the Arduino Boards Manager. STMicroelectronics released official support for the STM32 on Arduino. Unluckily they also call their core "STM32Duino". This core is used by PlatformIO. It's very confusing. Moreover, the cores are not 100% compatible.
This example will not work with ST's STM32Duino core. So don't try to build it on PlatformIO. You can find instructions here if you don't have experience yet with the Blue Pill in the Arduino IDE.
How I would do it now
The Adafruit_NeoPixel library supports the STM32. The strandtest example using the STM32 bluepill and output on A8 worked flawlessly. You can build it immediately on PlatformIO, no hassle with Arduino IDE and its cumbersome library setup or boards manager required.
Power supply
The power consumption strongly depends on the power supply voltage.
Power supply voltage | Power supply current | Power |
---|---|---|
2.5V | 0.5A | 1.25W |
3V | 1.10A | 3.30W |
3.3V | 1.35A | 4.46W |
5V | 3.10A | 15.50W |
The USB power bank goes into current protection mode when driving the LED string directly at 5V.
The power bank will be connected to a 3.3V buck converter. This will reduce the power consumption to 4.5W. The LEDs will not shine so bright, but they're still bright enough.
Housing
There probably are no cheaper and water-proof housing than junction boxes. They have cutouts which make it easier to mount connectors in the walls.
Nice project!
Thank you, this is where I found the information on which lib to use for driving WS2812B leds with STM32 blue pill ! Useful! NeoPixel lib works right!