Wearable Christmas garland. Bluetooth LE



    And for me, the best way to spend long dark winter evenings is to develop algorithms for festive illumination.

    I present an open project of a New Year's garland based on LED strip with WS2812B LEDs. The garland is powered by 4 AA batteries. With the current settings, the project supports 122 LEDs on the tape, but can easily be expanded to 1000 LEDs or more. Flexible customizable algorithm for generating lighting effects. The project contains a garland management program from phones or tablets, compiled without modifications for iOS, Android and Windows.

    Managed by the tape in my project module K66BLEZ c Kinetis microcontroller family.
    Familiarity with the K66BLEZ1 module was started in articles:

    - Universal controller module for the Internet of things. Breathe life
    - Universal controller module for the Internet of things. Testing FatFs
    - Universal controller module for the Internet of things. Programming Basics
    - Module Diagram
    - Project Repository A

    high-performance way to work with LED strip on the WS2812B has been described here . In this project, I use the same principle. Like STM32 microcontrollers of the Kinetis K66 family have timers with access via DMA (direct memory access mechanism bypassing the processor). This time I use interrupts after the end of each DMA cycle to update the status of the LEDs according to the effect generator algorithm.

    We connect to the module through the breadboard:



    The breadboard practically does not contain anything except two connectors. One connector is for connecting batteries, the other for connecting tape.

    Below is the layout diagram (clickable):



    Supply voltage


    An interesting feature of the tape is its ability to work from a much lower voltage than what is written in the specification. The garland remains operational when the voltage on the batteries is reduced to 2.9 V !

    With fresh batteries, the garland receives a voltage of 5 V, but at the same time the control signal is supplied directly from the microcontroller and has an amplitude of 3 V and there are no failures in the LED control.

    This is how the work of the garland on the table in debug mode looks like: The



    project sources are here - Indemsys / K66BLEZ_WS2812B_LED_strip_control .

    The project consists of 3 software parts:

    • MK66 directory - contains the project for the MK66FX1M0VLQ18 microcontroller of the K66BLEZ module. The microcontroller runs the main application. The application is based on the MQX real-time operating system .

      In addition to the main application, the project contains USB, TCP / IP stacks, a file system, a debug monitor, and much more. In fact, this is a framework for creating a variety of applications where garland management is just some simple demo application. Development Environment - IAR 7.70.2.

    • MKW40Z directory - contains the project for the microcontroller MKW40Z160VHT4 of the K66BLEZ module. The microcontroller supports Bluetooth LE communication. The Bluetooth stack is based on the FreeRTOS real-time operating system . Development Environment - IAR 7.70.2

    • The PC_app directory contains the project of the control program on the PC in RAD Studio 10.1. A cross-platform framework is used to compile the application for 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.

    Also popular now: