TX1812Z5 and WS2812B

I have used the classic WS2812B LED strips, they are very common, and AdaFruit do a lot.

They have a serial data line, in and out, on each RGB LED, and GND and 5V, making them ideal to make an LED strip will all programmable LEDs.

They work by sending a serial stream of short+long or long+short bits, 24 bits per LED, so the first LED "eats" the first 24 bits and then passes on the rest. A gap then means all done and they can all load the LED pattern. The data is around 1.25uS per bit, so even with hundreds of LEDs, this is really fast to update.

There are standard drivers, including for ESP IDF on the ESP32s I use.

But, try as I might, I could not find any of these common 5mm x 5mm "neopixel" RGB LED modules on LCSC/JLCPCB for an LED ring project. They had them on LSCS, and in stock, but would not pick up on a BOM on JLCPCB, or even allow a parts buy from LCSC, crazy!

What they did have is a much smaller, 2.1mm x 2.1mm, TX1812Z5 based, modules. And a Chinese data sheet!

So, tentatively, I designed boards using these and ordered. They are smaller, which is nice. The design was fun, C code to make circular tracks...

I was lucky - JLC queried the pin 1, as I did not (originally) have any pin 1 mark on silk screen, and only then did I realise the pin numbering for the 4 pins was different to the common 5x5 LED modules. So I was able to cancel the order at that point. Had that not happened I would have a number of duff boards!

Having got the pin out right, I ordered again. Then I had a slight panic. The LEDs are run on 5V, and hence a USB lead feeding the inner ring as 5V there. For 24 LEDs in the ring a USB-C will be fine. But, I spotted in the Chinese data sheet that min VIH is 0.7VDD which would be 3.5V, and I am driving from 3.3V data line as that works with a normal neopixel module. It was too late to cancel. But to be fair, WS2812B says 0.7VDD as well, and I know that works with 3.3V.

I also spotted that the timing was 295ns and 595ns not the timing for WS2812B which is 400ns+850ns or 800ns+450ns. Thankfully this would be easy enough to fix in software.

To my surprise, it just worked. The only issue was my PCB sandwich design is a bugger to solder the boards together. Timing and voltage do not seem to be an issue!

The project is a PCB sandwich, with top being a coaster for an (empty) fancy bottle on each table at a wedding. It is going to be awesome.


  1. 5050 RGBWW: C2911581
    5050 RGB: C2843785

    Sometimes it's really hard to find stuff on LCSC :D

    1. Yeh, I found on LCSC, but trying to use in assembly on JLCPCB did not find part from part ID, did not find when I searched, and would not even let me stock order. Weird. Anyway the smaller ones seem to just work, which is cool.

    2. Fair enough! I've used both of those on JLCPCB so not sure why. Their site can be a bit obtuse.

  2. Any chance you might publish the PCB generation code to your github repo?

    1. Err, https://github.com/revk/ESP32-LED/blob/main/makering.c

    2. Not sure how I missed that first time round, most appreciated, thanks.


Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

NOTSCO (Not TOTSCO) One Touch Switching test platform (now launched)

I posted about how inept TOTSCO seem to be, and the call today with them was no improvement. It seems they have test stages... A "simul...