Controlling WS2812b LED strips through I2C?

I wonder if it is possible to control a lot of WD2812b LED strips through a I2C unit (like PCF8574)?

I have searched for this but have not found anything on Internet on this.

I wonder if it is possible to control a lot of WD2812b LED strips through a I2C unit (like PCF8574)?

No it is not.
The standard rate for I2C is 100Kb/s ( bits per second ) where as a WD2812b communicates at 800Kb/s. Even faster I2C would not work as I2C communicates in bytes.

However you could use something like an ATtiny with a soft I2C interface to fill a buffer under I2C and then use that processor to send out the data to the WD2812b.

I have searched for this but have not found anything on Internet on this.

That has to tell you something.

you could use something like an ATtiny

I thought of that too, but it would limit the length of the led strip to around 150 LEDs, as most attiny have at most 0.5KB ram memory.

Yes but it depends on if his project uses that many.
I used an ATtiny to control the LEDs on four motorised slider pots in a recent project, although I did use an SPI like interface to get the data out from the nano. This was so the Nano could still receive MIDI without missing any bytes when updating the slider’s LEDs.

Thanks. I thought it was not possible and you have confirmed that.

thehardwareman:
I wonder if it is possible to control a lot of WD2812b LED strips through a I2C unit (like PCF8574)?

I have searched for this but have not found anything on Internet on this.

Why? controlling the LED strip only uses one I/O pin already. What possible advantage would there be to use I2C?

Controlling MANY LEDs :slight_smile:

wrong topic derp.

thehardwareman:
Controlling MANY LEDs :slight_smile:

The limit on how many LEDs you control is defined by how much SRAM memory you have. Each LED takes 3 bytes and the Uno only has 2K of this sort of memory for storing all the variables as well as the LED buffer. That is a limit that applies no matter how you address them.

SteveMann:
controlling the LED strip only uses one I/O pin already. What possible advantage would there be to use I2C?

If the OP has zero Arduino pins left, but does have an i2c I/o extender with a free pin, or can add another I/o extender, then that might seem like a solution. But, as discussed, i2c speed is much too slow to update ws2811/ws2812 like that.

Some types of "NeoPixel" strips have separate clock and data lines. Maybe it would be possible to control that type of strip using 2 I/o extender pins. It would not be very fast! But for a small number of LEDs it might work well enough.

Grumpy_Mike:
The limit on how many LEDs you control is defined by how much SRAM memory you have. Each LED takes 3 bytes and the Uno only has 2K of this sort of memory for storing all the variables as well as the LED buffer. That is a limit that applies no matter how you address them.

Which give a 600+ LEDs with an UNO 3. With a Mega 2560 about 2700 LEDs (theoretically). Right?

thehardwareman:
Which give a 600+ LEDs with an UNO 3. With a Mega 2560 about 2700 LEDs (theoretically). Right?

Something to consider, 2700 LEDs will only be able to update about 12 types per seconds, so rapid animation will not be possible. Also, at 60mA maximum current per LED you will potentially need a 5 volt 162 amp power supply if you want all the LEDs on at once.

If you could explain your intended use you may get some more useful suggestions.

Hi ,
You can use only arduino to control your led strip. and you have to add an external power supply that goes with the type of leds you use 5v or 12v and a good value of amps

Which give a 600+ LEDs with an UNO 3. With a Mega 2560 about 2700 LEDs (theoretically). Right?

Well you need memory for other stuff so it depends on what you are doing. Note that when you look at the memory used in a sketch stuff you reserve for the LEDs doesn’t show up.

just as soon as I questioned the wisdom of controlling LED strips over I2C, I discover from another thread that Adafruit does. Adafruit Dotstar LEDs

There is also the SK9822 LEDs that require a clock line from the processor. The datasheet shows a maximum rate of 30MHz.

SteveMann:
just as soon as I questioned the wisdom of controlling LED strips over I2C, I discover from another thread that Adafruit does. Adafruit Dotstar LEDs

No, DotStar are not i2c. They use an SPI-like protocol.

SteveMann:
There is also the SK9822 LEDs that require a clock line from the processor. The datasheet shows a maximum rate of 30MHz.

I mentioned this type in post #9. If you attempt to create the clock and data signals via an i2c i/o extender, you might be able to get them to work, but the 30MHz maximum rate would be completely irrelevant, you wouldn't be able to hit 200KHz, even if you used the 400KHz i2c speed.