2

The WS2812b color LED uses some kind of duty cycle encoding to encode three states:

  • one
  • zero
  • reset

This can be seen in the following figure: WS2812 Protocol

(Source: https://cpldcpu.files.wordpress.com/2014/01/ws2812_protocol.png)

What's the name of the used encoding?

It's not classic Pulse Width Modulation (PWM).

Edit:
While this question What encoding is used in this signal? asks for a name of a similar modulation, it does not give a name for the modulation.

Paebbels
  • 3,897
  • 2
  • 18
  • 43
  • Looks to be just a made up one. Not unusual to have a sync pattern then some data. You see similar ones used elsewhere, not having a global name either. – old_timer Nov 25 '18 at 19:47

2 Answers2

7

AFAIK it doesn't have a fixed name, apart from 'the WS2812 protocol'. As described, it is a fixed-cell pulse-width encoding.

FYI: in practice, it isn't fixed-cell at all: provided that the pauses (T1L, T0L) are shorter than Treset, all that matters is the pulse width (T0H, T1H). This makes it a plain pulse-wdith encoding, and it makes bit-banging waaaaay easier.

Wouter van Ooijen
  • 48,407
  • 1
  • 63
  • 136
  • 1
    This looks like a variant of 1-wire protocol encoding scheme, also referred as "PWM", in this case it looks like 33/66% PWM. The protocol was invented by Dallas Semiconductor, now a part of MAXIM. http://home.roboticlab.eu/en/examples/sensor/1-wire – Ale..chenski Nov 25 '18 at 20:36
  • 2
    I don't see what this unidirectional protocol has to do with the bi-directional dallas/maxim 1-wire protocol. And IMO PWM is a strange term to describe this protocol, because it isn't a Modulation, it is an Encoding. So yes, it is a pulse-width encodong, just like 1-wire, and dozens of others. – Wouter van Ooijen Nov 25 '18 at 20:44
1

This is what World-Semi calls it, they make the WS2812B

The data transfer protocol use single NZR communication mode. After the pixel power-on reset, the DIN port receive data from controller, the first pixel collect initial 24bit data then sent to the internal data latch, the other data which reshaping by the internal signal reshaping amplification circuit sent to the next cascade pixel through the DO port. After transmission for each pixel,the signal to reduce 24bit. pixel adopt auto resha -ping transmit technology, making the pixel cascade number is not limited the signal transmission, only depend on the speed of signal transmission.

CrossRoads
  • 3,453
  • 1
  • 6
  • 14
  • This does not answer my question. I asked for the signal modulation name, but not how communication works. – Paebbels Nov 26 '18 at 00:36
  • 3
    The question was "What's the name of the used encoding?" The manufacturer calls it "single NZR communication mode". I think that does answer the question. – CrossRoads Nov 26 '18 at 01:36
  • I get your point, but I believe this is a typo. There is no `NZR` code (according to Google), but `NRZ` (Non-Return to Zero`). NRZ is a general term and the basis for many codes. – Paebbels Nov 26 '18 at 08:32
  • Next suggestion would be to browse the Adafruit Neopixel library of the FastLED.h library and see if they call it something else. – CrossRoads Nov 26 '18 at 15:27