Skip to main content

Intro

Welcome to the Starklicht firmware repository!
This project powers creative lighting for movie makers, theater productions, and professional lighting installationsβ€”where dynamic, reliable, and customizable effects matter most.


🌟 What is Starklicht?​

Starklicht is a modular, STM32-based lighting controller for professional and creative environments.
It enables dynamic lighting animations, battery management, and intuitive user control for demanding applications.


Files​

You can download all files for Hardware (PCB, 3D Print) at Cults3D!

Note: We will update the Circuit diagrams for the PCB etc. in the next days!


πŸ› οΈ Starklicht Build – Estimated Cost Breakdown

CategoryDetails / NotesEstimated Cost (USD)
PCBsMain controller, driver boards, etc.~$100
Electronic ComponentsLED chip, power supply, heatsink, fan~$65
3D Printed PartsFilament for case and mounting parts~$7
Shipping & TaxesDepends on your region and import fees~$27
πŸ”’ Estimated Total(Before time investment)~$199

πŸ” A Few Important Notes​

  • Economies of Scale
    Buying components and PCBs in bulk can significantly reduce the cost per unit.

  • Time Investment Not Included
    This estimate does not account for the time spent sourcing, soldering, or assembling. Expect a hands-on, rewarding process!

  • Component Flexibility
    This is an open-source project. You’re free to substitute parts depending on what you have or preferβ€”which can impact final costs.


πŸ“– Documentation​

We are working on a detailed Documentation right now, work in Progress πŸ‘·β€β™€οΈ. Just click on Wiki to check it out. It will tell you, how it's made, how to 3D-Print components, etc.


πŸ› οΈ Building the Lamp​

βœ… The entire Lamp housing can be 3D Printed. We will provide them very soon here!

We also provide PCB's fitting exactly into the housing. You can order both PCB's and Lamp housings on https://www.starklicht.net ! 😊

For detailed instructions on Hardware (PCBs, Wiring, Housing), refer to the Wiki Hardware. This chapter will be updated the next weeks.

Components​

  • Microcontroller: STM32F401CCU6 Blackpill Board
  • Display: 1.3" 128x64 OLED Display (SH1106 Driver)
  • Bluetooth Module: HM-10 BLE Module
  • LEDs: High-power RGB LEDs
  • Potentiometers: For manual control of color and brightness
  • Buttons: For preset selection and other functions
  • Fan: For cooling the LEDs and driver
  • Current Sensor: To monitor power consumption
  • Temperature Sensors: To monitor the temperature of the LEDs and driver

πŸš€ Features​

  • 🎨 Customizable Lighting Animations: Create and control stunning effects for any scene.
  • πŸ”‹ Battery Management: Real-time monitoring and smart power handling.
  • πŸ–₯️ User Interface: Graphical display and button input for easy, on-the-fly adjustments.
  • πŸ’Ύ EEPROM Support: Save and recall your favorite effects and settings.
  • 🧩 Modular C++ Design: Clean, maintainable codebase with reusable classes.

🧩 Software Architecture​

Editor _ Mermaid Chart-2025-06-26-141957

  • Main Application: Entry point (main.c, starklicht.cpp)
  • Controller: Central logic and coordination
  • Display: Handles graphical output (u8g2 library)
  • Animation: Manages lighting effects
  • Battery: Monitors and manages power
  • Messaging: Communication and event handling over BLE

πŸ“š Third-Party Libraries​

This project utilizes the following open-source libraries:

  • u8g2: A monochrome graphics library for OLEDs and LCDs.

βœ‰οΈ Messaging Protocol​

Design Philosophy​

The Starklicht BLE protocol is designed for maximum efficiency and simplicity, tailored for the constraints of Bluetooth Low Energy and embedded microcontrollers.

  • Lightweight: We use a raw binary format instead of text (like JSON). This makes messages extremely compact, ensuring most commands fit within a single 20-byte BLE packet to reduce latency and power consumption.
  • Fast to Parse: The fixed [ID][DATA] structure allows the device's firmware to read values directly from memory offsets without needing a complex parser, saving precious CPU cycles and RAM.
  • Embedded-Friendly: The protocol uses integer math where possible to avoid computationally expensive floating-point operations on the microcontroller.

This protocol is a living document. We are open to suggestions and changes to improve its functionality and performance.


Message API Reference​

All multi-byte values are encoded in Big Endian format.

1. Color Message (ID: 0)​

Sets a solid color.

ByteFieldDescription
0ID0
1RedRed channel (0-255)
2GreenGreen channel (0-255)
3BlueBlue channel (0-255)
  • Example (Set color to Blue): [0, 0, 0, 255]

2. Animation Message (ID: 1)​

Sends a color gradient animation.

BytesFieldDescription
0ID1
1Interpolation0=Linear, 1=Ease
2Time Factor0=Once, 1=Repeat, 2=Mirror
3Duration (Mins)Duration minutes part (0-59)
4Duration (Secs)Duration seconds part (0-59)
5Duration (Centis)Duration milliseconds/10 (0-99)
6Color Point CountNumber of color points (N) that follow
7+Color PointsN blocks of Color Point data (5 bytes each)

Color Point Structure (5 bytes per point):

OffsetFieldDescription
+0RedRed channel (0-255)
+1GreenGreen channel (0-255)
+2BlueBlue channel (0-255)
+3, +4Position16-bit integer (position * 1000)

3. Brightness Message (ID: 2)​

Sets the overall brightness.

ByteFieldDescription
0ID2
1BrightnessBrightness value (0-100)
  • Example (Set brightness to 50%): [2, 50]

4. Fade Message (ID: 3)​

Fades to a target color over a duration.

ByteFieldDescription
0ID3
1, 2Duration16-bit duration in milliseconds
3RedTarget Red channel (0-255)
4GreenTarget Green channel (0-255)
5BlueTarget Blue channel (0-255)
6Ease Flag1 for ease, 0 for linear
  • Example (Fade to purple over 1.5s): [3, 5, 220, 128, 0, 128, 1]

5. Save/Load Message (ID: 4)​

Saves the current state to a preset button or loads a state from it.

ByteFieldDescription
0ID4
1Save Flag1 to save, 0 to load
2Button IndexThe button index to use (0-3)
  • Example (Save to Button 1): [4, 1, 0]
  • Example (Load from Button 2): [4, 0, 1]

🏁 Getting Started​

Prerequisites​

Setup​

❗️ This setup works, but is not optimal yet. If you have any Ideas, don't hesitate to add a PR!

  1. Clone this repository:
    git clone https://github.com/yourusername/starklicht-stm32.git
  2. Open STM32CubeIDE
  3. Select File β†’ New β†’ STM32 Project From Existing STM32CubeMX Configuration File
  4. A new Popup with Project Creation Wizard appears
  5. File: Browse β†’ Select the .ioc File of this Repository
  6. Set Targeted Language to C++
  7. Click Finish
  8. Replace Inc, Src and Startup in Core with the ones from this Repo
  9. Replace STM32F401CCUX_FLASH.ld with the one from the Repo

Now you can Build the Project

Building and Flashing​

  1. Build the project in STM32CubeIDE.
  2. Connect the STM32F410RB board via USB to UART.
  3. Use STM32CubeProgrammer to flash the firmware onto the MCU.

🎬 Example Use Cases​

  • πŸŽ₯ Movie Sets: Sync lighting with camera cues for dramatic effects.
  • 🎭 Theater: Dynamic scene changes and mood lighting.
  • πŸ’‘ Installations: Interactive or automated light shows.

🀝 Contributing​

We welcome your ideas and improvements!
See CONTRIBUTING.md for guidelines.


πŸ“„ License​

GLP3.0 – see LICENSE for details.


πŸ“¬ Contact​

Questions or support?
Email us: kontakt@starklicht.net