Can i use USB for the data in/out for addressable LED's

What is the problem?

No GPIO's available due to using a Hyperpixel

What did you already try to solve it?

Nothing yet apart spend a lot time researching whether its possible or not, i want to extend the G-code stauses to LED stauses for the hotend, bed and errors/warnings. I have a 5v10a power supply matched up to the output of the LED's i need to use already.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, what kind of hardware precisely, ...)

Caribou 420 3.911, Rpi4b*Gb, OctoPi. 1.7, Hyperpixel, Octodash,

I don't know of any LED drivers that do this (if you do, let me know!) but one thing I know for sure is that there is no plugin that supports them over USB. Might be better to be specific about what kind of LEDs you have?

There are plugins in the plugin repository already that will do this already, they use the gcode to trigger the data i think at least.... But those plugins output to the GPIO pins and im wondering if the data could be output to the USB.

I know, I wrote one of them :wink:
None of them (as far as I know) support USB, only GPIO. And USB is not really suitable to directly drive them, it would need some middle man LED controller.

Also,

If you have WS2811/WS2812/SK6182, even better: I have a solution for you:

Per this article: https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-hyperpixel-4
quite far down at the bottom, it says pins 10 & 11 are broken out. I don't have one of these, but this means you can use my plugin:

https://plugins.octoprint.org/plugins/ws281x_led_status

which uses pin 10 to drive the LEDs so it should be compatible? Again, not tried it, just going by what I'm reading.

1 Like

On more reading, this seems like it might just be for i2c, but the plugin uses SPI instead :slightly_frowning_face:

Ahaa ok that great to know, would it be much work to modify your plugin to use I2C instead? i dont understand it.

It would not be possible, unfortunately. The WS281x LEDs require specific timing, which i2c can't do. To my knowledge, I2C allows you to connect multiple devices/sensors etc. to the same pins, and the data can be passed to the right one, but this is not compatible with WS281x since they require constant data, at specific timings.

I have looked into the possibility of making a plugin that would support WLED, so you could do it wirelessly using an ESP8266. I bought the hardware, but that's as far as it got. We're talking long term goals here, since I have quite a few other things on my list.

You might be able to do it yourself, using the webhooks plugin, or MQTT plugins to manually configure it.

1 Like

And is it definately not possible to send the data stream through the USB controller do you know?

What kind of LEDs do you have?

I think it would be extremely unlikely, without an extra box (Pi > box > LEDs) since USB would not be able to produce the signal for WS281x leds.


i picked up a couple of WS2812 rings also and a 5v10a PSU.
The plan was to install these then came across the hyperpixel lol
I thought about using a 2nd Pi with octo taking data from J19 straight off the Einsy for the data but then that disables the USB on the Einsy...

I've no issues using a board inbetween BTW

Yeah, I just don't know of any :slightly_smiling_face: You might be able to find some somewhere on the internet. It is not possible to go direct, (ie, wire WS2812 data to USB data), but someone might have made something.

1 Like

What about Ethernet / network controller?

Charlie, would something like this work/

My first impression is no, since it is i2c rather than a single dedicated GPIO pin - since the hyper pixel uses all of the GPIO pins. I don't know enough about how that works, I only know that the WS281x LEDs need a constant flow of precise data, which is not available with many things outside of the hardware built in to microcontrollers or the raspberry pi's GPIO pins.

Am i the only person wanting LED that has a hyperpixel, surely not? Nobody else got a solution for this??

The fadecandy is an easy to use USB-based WS2811 controller:

Damn it, gutted.... Thought it was a breakthru.
I have the RGBW https://www.adafruit.com/product/2848
but it only does RGB at the moment :frowning:

would this do it if i use a buck converter? https://www.adafruit.com/product/2264

Sounds crazy but can I send the data out by Wi-Fi or Ethernet to a zero W or another pi 3 or 4?

If you want to write the code, then yes! That's also what WLED & and ESP8266 (that I linked earlier) and with a combination of MQTT or webhooks plugin you could get it connected to OctoPrint. If I were you, that would be where I would look into.

With most of your solutions (breakout boards, wifi, USB etc. ) they are all technically possible, but then someone has to write the code to make it work (especially if you want it to work with OctoPrint), and test it. And that means they need to have the hardware too to develop against. So it is not impossible, it is fully possible but if no one has done it before (or, shall I say, published their solution) then you will have to do it yourself.

1 Like