RGB LED lighting is broadly utilized in residence automation, good lighting, and inventive tasks. This challenge demonstrates constructing an IoT-enabled RGB LED Controller utilizing the IndusBoard Coin V2 and a WS2812B NeoPixel LED ring.
Key Options:
- Internet-Based mostly Management – Change colours, alter brightness, and management particular person LEDs.
- Customized Animations – Consists of varied lighting results and animation modes.
- Scalable Design – May be tailored to manage lengthy LED strips as an alternative of a round LED ring.
- Positive-Tuned Management – Modify brightness and handle particular person LEDs for custom-made results.
This challenge is right for DIY fanatics, IoT builders, and good residence automation tasks.
![NEOPixel RGB LED Controller](https://www.electronicsforu.com/wp-contents/uploads/2025/02/scs-1024x638.jpeg)
Use Circumstances
- Good Dwelling Lighting: Customise RGB lighting in numerous rooms.
- Interactive Shows: Use NeoPixels for visible results.
- Wearable Tech: Small-scale RGB management for good clothes.
- Artwork Installations: Use animations for aesthetic shows.
Invoice Of Materials
Part | Amount |
IndusBoard Coin V2 | 1 |
WS2812B NeoPixel LED Ring/Strip | 1 |
Energy Provide (5V, 2A beneficial) | 1 |
Circuit Design
This challenge makes use of the IndusBoard Coin V2, which options 30+ GPIO pins, permitting flexibility in selecting the information pin for the WS2812B NeoPixel LEDs. These LEDs are managed utilizing a single information line, making them simple to handle with the onboard microcontroller.
On this setup, the NeoPixel LED strip’s information pin is linked to pin 21 of the IndusBoard. Nonetheless, because the IndusBoard has 30+ I/O pins, you possibly can modify this challenge to manage a number of LED strips, successfully protecting a complete residence with LED lighting. We’re constructing a controller for a single LED strip for this demonstration, however it might all the time be expanded.
Moreover, the IndusBoard Coin V2 features a built-in gentle sensor, which may be built-in into the code for automation options equivalent to day/evening detection, computerized brightness adjustment, and light-based on/off management. Nonetheless, on this challenge, the sunshine sensor isn’t utilized.
This setup supplies a easy but highly effective basis for good LED lighting and may be simply custom-made for varied purposes.
![WS2812B NeoPixel LED and IndusBoard Coin Connection](https://www.electronicsforu.com/wp-contents/uploads/2025/02/circuit1-1024x658.png)
Code Clarification
![NEOPixel RGB LED Controller Code](https://www.electronicsforu.com/wp-contents/uploads/2025/02/fig1-1024x600.png)
Setting Up the IoT RGB LED Controller
Step 1: Set up the Adafruit NeoPixel Library
Earlier than beginning, set up the Adafruit NeoPixel library within the Arduino IDE. Whereas you should utilize different libraries, this one is broadly used and simplifies the method.
Step 2: Embrace Mandatory Libraries
Initially of the code, we embrace important libraries:
- WiFi.h – Handles WiFi connectivity.
- WebServer.h – Units up a easy HTTP internet server.
- Adafruit_NeoPixel.h – Controls WS2812B RGB LEDs.
Step 3: Outline Pins and LED Configuration
- LED_PIN is assigned GPIO 21.
- NUM_LEDS is ready to 16 (for a hoop of 16 LEDs).
- The Adafruit_NeoPixel object (
strip
) is created for controlling the LEDs.
Step 4: Set Up the Internet Server
The ESP32-S2 creates a WiFi Entry Level (AP) with the next credentials:
- SSID:
ESP32S2_LED_Controller
- Password:
12345678
- A internet server is ready up on port 80.
Step 5: Create the Internet Web page UI & LED Management Capabilities
The HTML & JavaScript code is embedded to supply a user-friendly interface, permitting customers to:
- Modify RGB colours for particular person LEDs.
- Run predefined animations.
- Work together with an LED ring UI.
Step 6: Powering & Connecting the Board
- Energy the IndusBoard Coin V2 and join the LED strip.
- If the LED strip is small, it may be powered straight from the IndusBoard.
- For bigger LED strips, use a separate energy supply and join solely the management line to the IndusBoard.
Step 7: Connecting to the Controller & Utilizing the Internet UI
- Open your Wi-Fi settings in your cellphone.
- Search for the IndusRGB Controller WiFi community.
- Join utilizing the password 12345678.
- Open a browser and enter
192.168.4.1
within the deal with bar. - Use the internet UI to:
- Choose any coloration from 10+ million colours.
- Modify brightness.
- Management particular person LEDs.
- Run varied lighting animations.
![Testing DIY RGB LED Controller](https://www.electronicsforu.com/wp-contents/uploads/2025/02/webui-910x1024.png)