Author Topic: Is addressable LED data stream (WS281X, etc) considered DC-Balanced????........  (Read 529 times)

0 Members and 1 Guest are viewing this topic.

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 3014
  • Country: us
  • Not An Expert
The data stream format for the WS2812 and similar addressable LEDs looks like this:



Question:
Since each bit transmitted consists of both a high and low with similar opposite timing for bit polarity, does this make the the bitstream effectively DC-Balanced?  If so (and using appropriate drive circuits), can you directly send this through normal ethernet magnetics??
« Last Edit: November 15, 2024, 09:47:41 pm by Smokey »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15711
  • Country: fr
Well, no, it doesn't. That would require alternating 1's and 0's in the bitstream, at least sufficiently frequently, with an identical number of each on average, which can't be guaranteed as the bitstream just directly encodes R,G,B intensity as binary values. Just look at the worst cases where there are all 0's or all 1's.
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 3014
  • Country: us
  • Not An Expert
The diagram shows that each bit of RGB data is indeed transmitted as alternating 1 and 0 (with different high and low times, but never long sections of just low or just high).

If I wanted to transmit the RGB data byte of 0b11110000 (yes I know the full RGB data per LED is more bits than that), the voltage on that line would look like:
HIGH(0.7us) - LOW(0.6us) - HIGH(0.7us) - LOW(0.6us) - HIGH(0.7us) - LOW(0.6us) - HIGH(0.7us) - LOW(0.6us) -
HIGH(0.35us) - LOW(0.8us) - HIGH(0.35us) - LOW(0.8us) - HIGH(0.35us) - LOW(0.8us) - HIGH(0.35us) - LOW(0.8us)

Lets say its all 0s for a while (which is still alternating but more unbalanced than a long string of 1s).  Would the difference between HIGH and LOW timing, even through it's always alternating, cause balance issues?
« Last Edit: November 15, 2024, 10:20:29 pm by Smokey »
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2071
  • Country: au
Question:
Since each bit transmitted consists of both a high and low with similar opposite timing for bit polarity, does this make the the bitstream effectively DC-Balanced?
Not quite. They do have duty limits, but they are not DC=0 average as the data pattern is unknown.


If so (and using appropriate drive circuits), can you directly send this through normal ethernet magnetics??
The 50us RESET is another problem, but you can get the edge information across a transformer, and if you feed that into a symmetric Schmitt trigger, the edges act like SET and /RESET pulses, and you can recover your LED data.


« Last Edit: November 16, 2024, 12:10:32 am by PCB.Wiz »
 

Offline aeg

  • Regular Contributor
  • *
  • Posts: 127
  • Country: us
Since each bit transmitted consists of both a high and low with similar opposite timing for bit polarity, does this make the the bitstream effectively DC-Balanced?

No, it explicitly makes the bitstream DC imbalanced. If high and low have "opposite" timing then they have non-equal timing and it is not DC balanced.

That would require alternating 1's and 0's in the bitstream, at least sufficiently frequently, with an identical number of each on average,

It's worse than that. The 1 duty cycle is not the inverse of the 0 duty cycle. So not only are "1" and "0" individually not DC balanced, the sequence "10" is not DC balanced either.

I'm not familiar with the WS2812 protocol but I wonder if you could put garbage bits after a command, ignored by the LED, to restore DC balance. Similar to the merge bits in compact disc EFM encoding. That might be fun, but instead, I would probably just manchester encode the commands and put a microcontroller at the receiving end to convert it to WS2812 format.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6953
  • Country: ro
It isn't balanced, but should be possible to send that through magnetics.  If you look at the edges (the positive and the negative spikes after magnetics) it should be possible to restore the original signal.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf