Flexible PCB demo with WS2812B-4020 and a XIAO ESP32C3

Nov 20, 2026 Last reply: 22 hours ago 4 Replies
Jump to replies (4)

I've built a fair few projects with WS2812B addressable LEDs over the years, mostly the standard 5050 and 2020 packages. Then I came across a less common variant, the WS2812B-4020, where the LED position sits right-aligned inside the package. Seemed like a fun one to experiment with, so I went for it. Designed a small flexible PCB for the test and got it made at JLCPCB. Soldered a Seeed Studio XIAO ESP32C3 onto one end, wrote some code to drive the LEDs, and hooked it up over USB-C. Powers up fine and the whole curved strip lights up in multiple colors, so the little demo works as intended. It was just a small experiment to try out a diffrent LED package, but I'm happy with how it turned out. The package shape opens up some interesting layout options on a flex board. Have any of you used this variant before? Curious what projects or applications you'd reach for it with. Link to the LEDs is in the comments, whould love to hear your ideas.


I've stuck mostly with the regular 5050 packages over the years and dabbled in the 2020s once, so the right-aligned die in the 4020 is new territory for me. Looking at your photo, the way the strip curls upward with the silkscreen labels following the curve makes it look almost purpose-built for edge lighting or wearables, the sort of layout where a straight bar just looks wrong.

When I hand soldered the 2020s on a small board last year, the pads were painfully tight and I ended up reworking a couple of joints. Was the 4020 any friendlier to place with hot air, or just as fiddly? And did you notice any difference in brightness or heat along the curve compared with the bigger packages, or does the smaller die balance out over the denser spacing? As for uses, that offset position seems like it would suit anything where the light throw needs to sit away from the wiring edge, like a shelf lip where the board edge is hidden but the glow needs to land in view. Also curious whether running them around a tight curve affected the data signal at the far end at all. Nice little demo, and it has me eyeing the bag of standard packages on my shelf a bit differently now.

My brain went straight to the controller side reading this. I run WLED on ESP32 boards for the lighting behind my own desk setup, and the XIAO ESP32C3 is the sort of board I keep reaching for because it's tiny enough to hide in odd corners of a build. Did you load WLED onto it for the demo, or did you write your own sketch from scratch? I ask because I've found WLED handy for the early stages of a project, when I mostly want to see the strip doing something before I invest time in custom code. On the 4020 package itself, I'd honestly reach for something like this for a status panel inside an enclosure, the kind of thing where a normal 5050 chain wastes space on pads you never see. The right-aligned die seems like it would let the lit part sit close to an edge or an opening without the whole package hanging out into the visible area.

In your photo the T-shaped layout with the branch curving up reads really nicely, and the lit section has a scattered, multicolor look that WLED effects like rain would suit well. One thing I'd want to know from someone who has handled this variant: does the smaller body make alignment on the pads any trickier, or is it business as usual under a regular iron? I've only ever worked with the bigger packages, so that's pure curiosity on my end.

The right-aligned die is the bit that finally made sense to me looking at your photo, that curl upward with the glow landing just off the wiring line. I sketched something similar on paper last year for a curved backlight around a monitor, gave up because I assumed the offset packages would be awkward to source, and went back to a straight 5050 run. Yours looks like the version I should have made. Question on the flex board side, since I've only ever ordered rigid boards from that fab: did you need anything special on the order for the flexible material, or is it just a different substrate checkbox? I'd love to give this another go with the 4020s this time.

Update: the little board is still running fine, the whole strip lights up in different colors over USB-C and it's been behaving exactly as hoped. To answer the WLED question, I wrote my own code for the demo rather than flashing anything existing. Glad the offset die finally clicked for someone else, the 4020 really does seem made for curves like that monitor backlight idea.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required