I would like to reduce the amount of lines for a string of WS2812B RGB LEDs for a project. In my understanding two lines should be sufficient, since we can modulate the signal onto the DC line.

Similiar questions have been asked and answered on this platform: "How to couple a signal on to a DC line", "Injecting a communication signal over DC power supply lines" and proably more.

So I went ahead and simulated an according circuit in LTSpice. Below you find my circuit and the simulation result.

Circuit and simulation result (All plot curves are voltages; Red curve is the input signal, blue is the dc+signal mix, green is the demodulated signal and turquoise is the demodulated DC. C4 symbolizes the 15pF input impedance as per datasheet and D1 approximated the power consumption by the RGB LED. ws2812.txt contains a random 5x24 bit signal modulated as per datasheet for the WS2812B).

As you can see, the modulation and demodulation seem to be working just fine, except for the huge overall oscilation/swing.

My guess is, that that comes from the effective LC-Circuit formed by C1, L1, C2 and L2. I played around with this circuit for hours to get rid of it, but was never really successful. My best attempt can be seen below: I added one 5V-zener-diode for the demodulated signal branch. (Please note the different colors for the voltage plots.) Circuit as the previous, with added 5V zener diode. (All plot curves are voltages; Green curve is the input signal, blue is the dc+signal mix, red is the demodulated signal and turquoise is the demodulated DC).

According to the WS2812 datasheet the resulting signal should be ok, except for the continued swing on the signal line after the actual signal ended. I was wondering if I was doing anything wrong and/or if there was a better solution.

One thing to keep in mind, is that there should never be any voltage dropping element in series with the dc part of the line, since we want to add several of these circuits in series and each needs a dc component of 5V.

  • 1
    \$\begingroup\$ As far as the ringing goes, you will need to add resistance. Start by choosing a real inductor, look up the series resistance, and modify the default inductor in LTSpice to include that series resistance. This may take care of the ringing. If not, add resistance in series with sigin. \$\endgroup\$
    – user57037
    Dec 22, 2017 at 4:42
  • \$\begingroup\$ Will this work? I am not sure. You may want to keep an eye on the current in V1. If it seems excessive, that is an indication that this scheme is not practical. But larger inductors will help with that. Also, you are capacitively coupling a signal whose duty cycle could vary over a wide range, depending on the ratio of ones to zeroes in the data stream. This could lead to a variable DC offset in the received signal. \$\endgroup\$
    – user57037
    Dec 22, 2017 at 4:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.