LED strip PWM/RGB cascadable controller
Overview
This project presents a versatile LED strip controller, which is based on the STC8G1K08A microcontroller. The design is focused on providing a low-cost, easy-to-use solution for controlling both monochrome and RGB LED strips. The controller offers two operating modes: dual-channel PWM for monochrome LED strips and single-channel RGB control for WS2812-type LED strips. It is suitable for applications requiring brightness control, lighting effects, or color customization for LED strips in DIY projects or professional installations.
The controller is designed to be easily programmable via a simple TTL serial interface, making it highly adaptable to custom applications. It also supports controller cascading, allowing the control of multiple LED strips across a series of controllers.
Features
Key Features of the Controller Hardware
- Low-Cost Design: Based on the STC8G1K08A chip, this controller offers an affordable solution for controlling LED strips, particularly for hobbyist and small-scale projects.
- Serial Port Control (TTL): The controller is designed with a simple serial port interface, making it easy to communicate with and program from a host computer or microcontroller.
Dual-Mode Operation:
- Dual-Channel PWM Monochrome Control: Control two independent monochrome LED strips using PWM for brightness adjustment.
- Single RGB Channel: When in RGB mode, the controller can manage WS2812 RGB LED strips for full-color control.
- Support for Multiple LEDs: In RGB mode, the controller theoretically supports up to 340 LEDs, though the current program supports 128 LEDs. For larger installations, the number of LEDs can be reduced when controllers are cascaded.
- Cascading Support: Multiple controllers can be cascaded together for extended LED control, with up to 190 controllers being theoretically supported by the program.
- 5V Power Supply: The controller is designed to work with 5V LED strips and requires a 5V power supply for operation.
- PWM and RGB Switching: Channel 1 supports PWM, while Channel 2 can be switched between PWM and RGB modes, providing flexibility depending on the type of LED strip used.
- Power Control: The maximum current on both channels should not exceed 1A to prevent damage to the MOSFETs and wiring. In RGB mode, Channel 1 operates at full brightness (5V).
- Modular Design: The hardware includes provisions for easy cascading and modular connections, ensuring scalability for larger projects.
Additional Design Considerations
- Enclosure Design: A custom shell was designed for the controller, including stickers for port labeling and a magnetic position for easy attachment. The enclosure also allows for a knurled copper nut in the top stud hole for secure assembly using M2 screws. Additionally, a wide heat shrink tube can be used to cover the controller for added protection.
- Precautions:
- The controller only supports 5V LED strips.
- Avoid exceeding the current limit (1A) to prevent overheating and possible damage.
- RGB mode can only be applied to the last controller in the cascade series.
- Do not switch between PWM and RGB modes while the system is operating.
Hardware Components
- STC8G1K08A (U1): A low-cost 8-bit microcontroller that forms the core of the LED strip controller.
- AO3400A MOSFETs (Q1, Q2): These MOSFETs act as electronic switches for controlling power to the LED strips, ensuring efficient operation.
- Capacitors (C1, C3, C4): Used for filtering and stabilizing the power supply to prevent voltage fluctuations and noise in the system.
- Resistors (R1–R6): Standard 10kΩ resistors that regulate current flow and provide necessary resistance in the circuit.
- Connectors (IN1, OUT1, RGB1, H1, POW1): Standard 3-pin and 2-pin connectors for easy connection of the LED strips and power supply.
- M2 Screws (S1, S2): Small screws used to secure the enclosure and controller components together.
Schematic and PCB Layout
Program Development
- The software for the controller was developed using open-source tools such as VsCode and SDCC. The packaged source code includes the SDCC toolchain, a make tool, and a compilation script that runs on Windows. By executing the ./build.ps1 script in PowerShell, users can easily compile the code, generating the final .hex file in the build folder for uploading to the controller.
- Programming and Uploading Instructions
- Connect the TX and RX pins of the STC8G1K08A to the serial port of your computer or programmer.
- RX on the controller corresponds to the data input (Data).
- TX corresponds to the data output (Data).
- The controller operates with a clock configuration of 20MHz during programming. Ensure that your serial port settings reflect this configuration for accurate data transmission.
Subsequent Development Plans
- Enhance RGB Mode: Future software updates will improve the functionality of RGB mode by allowing fixed-length data receiving. This will enable full cascading in RGB mode, eliminating the current limitation where RGB mode can only be applied to the last controller.
- Host Computer Development: A fully functional host software will be developed for easier programming, control, and monitoring of multiple cascaded controllers. This will improve the overall usability of the system and expand the range of possible applications.
Conclusion
This project provides a robust, low-cost solution for controlling both monochrome and RGB LED strips with flexibility and ease of use. Its modular design, PWM/RGB mode switching, and cascading support make it suitable for both small-scale and large-scale LED projects. With future software upgrades, this controller will support even more functionality, making it a versatile tool for lighting control applications.
LED strip PWM/RGB cascadable controller
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by DIY TECHOS MR AHSAN BILAL
- XRC PRO: Open-Source RC Transmitter and Receiver System OverviewThe XRC PRO is an advanced, open-source RC transmitter and receiver system designed to offer...
- LED strip PWM/RGB cascadable controller OverviewThis project presents a versatile LED strip controller, which is based on the STC8G1K08A mic...
- STM32F722 flight control Project Overview:This flight controller board is designed with innovation and user-friendliness in m...
- USB3.0 Gigabit LAN-RTL8153B OverviewThis project is a high-performance Gigabit USB 3.0 network card designed around the RTL8153B...
- STM32F103C8T6 minimum system board OverviewThis project is a minimalistic system board designed around the STM32F103C8T6 microcontrolle...
- WCH-LinkE-R0-1v3 Debugger Overview The WCH-LinkE-R0-1v3 Debugger is a versatile and powerful tool designed for online debuggin...
- MAKE 8CH RC TRANSMITTER AND RECEIVER WITH STM32&NRF24L01 OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- MAKE 8CH RC TRANSMITTER AND RECEIVER WITH STM32&NRF24L01 OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- AMAZING DIY DIGITAL OSCILLOSCOPE Working PrincipleThis mini oscilloscope project aims to create a compact and user-friendly device fo...
- AMAZING DIY DESKTOP CHARGING STATION Four-way Desktop Smart Charging StationThis is a practical intelligent multi-channel desktop charger...
- AMAZING DIY DESKTOP CHARGING STATION Four-way Desktop Smart Charging StationThis is a practical intelligent multi-channel desktop charger...
- Advanced 8-CH RC Transmitter and Receiver using stm32f103 and Nrf24l01 OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- Testing SBUS & PPM Signals on DIY STM32 RC Transmitter & Receiver! 🎮📡 | Advanced Control Verification | DIY TECH DEEPLY IntroductionWelcome to DIY TECH DEEPLY! In this comprehensive guide, we'll delve into the intricacie...
- DIY RC Transmitter & Receiver with stm32 🎮🚁 | 8 channels pwm,ppm,sbus | DIY TECH DEEPLY OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- UNLOCKING THE SECRET OF UNI-T 203+ TO MAKE RECHARGEABLE. OverviewEmbark on a thrilling DIY journey as we delve into the Uni-T 203+ from Cell to Battery Conve...
- Advanced 8-Channel RC Transmitter and Receiver using stm32f103c8t6,nrf2l01.(Totally Diy) OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- 2-Axis Servo-Based CNC Pen Plotter (Fully Hand Crafted). IntroductionHey there! I'm excited to share my cool project with you - it's a 2-axis servo-based CNC...
- Advanced 8-Channel RC Transmitter and Receiver with STM32F103C8T6 Project OverviewThe "Advanced 8-Channel RC Transmitter and Receiver with STM32F103C8T6" is a versati...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
109 0 0 -
DIY Laser Power Meter with Arduino
156 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
152 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
543 0 2