I usually take WS2812B LEDs from LED strips and modules for my projects. Since I may need heating pads or a soldering iron, I always test the LEDs before soldering them onto my project. To simplify this process, I designed a PCB that allows me to test the WS2812B LED without needing to solder it first.

In this project, the device will cycle through red, green, and blue colours. Additionally, a second LED will confirm that communication between the LEDs is functioning properly by syncing with the data from the testing LED. We will be using the Seeed Studio XIAO SAMD21 to control the LED. So, let's get started!

Supplies

Seeed Studio XIAO SAMD21

WS2812 5050

2 X M3*10MM

Step 1: Designing the PCB

The PCB designing process was straightforward, thanks to Flux.ai. This browser-based PCB design tool leverages AI to assist with hardware design. Once I finished designing the PCB, I exported the Gerber file for manufacturing. I used the seeedstudio fusion service to manufacture this PCB.

Also I choose a surface finish as ENIG for the PCB

link to the SeeedStudio fusion service: https://www.seeedstudio.com/fusion_pcb.html

link to the Flux.ai project: https://www.flux.ai/gokux/ws2812b-tester

Step 2: Enclosure

I used Fusion 360 to design the enclosure, then exported bodies to STL files and 3D printed it

Step 3 : Flashing Code To XIAO

📷follow this tutorial for getting a idea about how to setup IDE and how to flushing process

https://www.youtube.com/watch?v=t1XsDqZjuQo

Here is the Code

#include <Adafruit_NeoPixel.h>
// Define the pin and number of LEDs
#define LED_PIN     D8
#define NUM_LEDS    2
// Create an instance of the Adafruit_NeoPixel class
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
// Initialize the NeoPixel library
strip.begin();
strip.setBrightness(128); // 50% brightness (255 * 0.5 = 128)
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
// Cycle through red, green, and blue colors
setColor(strip.Color(255, 0, 0)); // Red
delay(1000);
setColor(strip.Color(0, 255, 0)); // Green
delay(1000);
setColor(strip.Color(0, 0, 255)); // Blue
delay(1000);
}
// Function to set the color of all LEDs
void setColor(uint32_t color) {
for (int i = 0; i < NUM_LEDS; i++) {
strip.setPixelColor(i, color);
}
strip.show();
}

Step 4: PCB Assembly

I used hand soldering to attach all the components to the PCB. First, I melted some solder on one pad of the PCB and placed the Xiao microcontroller on it while keeping the heat applied to the pad. After that, I connected the remaining pins.

Step 5:Enclosure Assembly

Put the top and bottom enclosure and fasten it with M3 10mm screws

Step 6: Testing

Connect Xiao to a USB power source and place the LED on the soldering pad make sure the placement of the LED is correct

If your LED is working it will successfully go through the testing sequence

Step 7: Do You Need Free PCBA for Your LED Project ?

Unleash your ideas with LED Remix: Design the Next Generation!

flux.ai and Seeed Studio have teamed up to make hardware prototyping a breeze for developers.With Flux's AI-powered design tools, you can quickly iterate on your ideas. With Seeed Fusion's rapid prototyping services, you can bring your designs to life in no time. Want to build a bravo LED project based on #Xiao? We can help you every step of the way.

Apply Nowhttps://forms.gle/iTjL9ZV6eqkHHDH16…

  • Each participant is limited to two PCBA boards 100% completely FREE for one design
  • Free usage of http://Flux.ai for 2 months

Duration: 12th Dec. 2024- 12th Mar. 2025

Blog link : https://www.seeedstudio.com/blog/2024/12/11/how-to-realize-quick-prototype-with-flux-ai-online-design-and-seeed%ef%bc%9f/