
And for me, the best way to spend long, dark winter evenings is to develop algorithms for holiday illumination.
I present the
open project of a New Year's garland on the basis of a LED tape with WS2812B LEDs. The garland is powered by 4 AA batteries. With the current settings, the project supports 122 LEDs on the ribbon, but it can easily be expanded to 1000 LEDs and more. Flexible reconfigurable light effects generation algorithm. The project contains a program for managing the garland from phones or tablets, compiled without modifications for iOS, Android and Windows.
The tape in my project is
controlled by a
K66BLEZ module with
Kinetis microcontrollers.
An introduction to the
K66BLEZ1 module was started in the articles:
')
- Universal controller module for the Internet of things. Breathing life- Universal controller module for the Internet of things. FatFs Testing- Universal controller module for the Internet of things. Basics of programming- Module layout- Project repositoryThe high-performance way to work with LED tape on the WS2812B has been described
here . In this project I use the same principle. Like the STM32, the Kinetis K66 family of microcontrollers includes timers with DMA access (direct memory access bypassing the processor). This time, I use interrupts after the end of each DMA cycle to update the LED states according to the effect generator algorithm.
We join the module via the mockup:

The development board contains practically nothing but two connectors. One connector is for connecting batteries, the other is for connecting tapes.
Below is the layout scheme (clickable):

Supply voltage
An interesting feature of the tape is its ability to operate at a much lower voltage than what is written in the specification. The garland
keeps working at decrease in voltage on batteries up to 2.9 V !
With fresh batteries, the garland receives a voltage of 5 V, but at the same time the control signal is fed directly from the microcontroller and has an amplitude of 3 V and there are no failures in the control of the LEDs.
This is how the work of the garland on the table in debug mode looks like:

Project sources are here -
Indemsys / K66BLEZ_WS2812B_LED_strip_control .
The project consists of 3 software parts:
- Directory MK66 - contains a project for the microcontroller MK66FX1M0VLQ18 of the module K66BLEZ. The microcontroller runs the main application. The application is based on the real-time operating system MQX .
In addition to the main application, the project contains USB stacks, TCP / IP, file system, debug monitor and much more. In essence, this is a framework for creating various applications where garland management is just some of the simplest demo applications. Development Environment - IAR 7.70.2.
- Directory MKW40Z - contains the project for the microcontroller MKW40Z160VHT4 module K66BLEZ. The microcontroller is engaged in supporting communication via Bluetooth LE. The work of the Bluetooth stack is based on the real-time operating system FreeRTOS . Development Environment - IAR 7.70.2
- The PC_app directory contains the project of the control program on the PC in the RAD Studio 10.1 environment. A cross-platform framework is used that allows compiling an application under Windows, iOS and Android.
The project is developing. And I hope for the next New Year the garland will be controlled by voice and from the clouds.