Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS2811/WS2812 LED strip control #185

Closed
Armadillo1 opened this issue Jun 25, 2018 · 10 comments
Closed

WS2811/WS2812 LED strip control #185

Armadillo1 opened this issue Jun 25, 2018 · 10 comments

Comments

@Armadillo1
Copy link

Would be a useful feature to be able to tell from a distance whether the hotend is cold (e.g. green), heating (yellow) or hot (red).
An option for ambient (low light), working lights when repairing the printer (=bright), etc would be nice and helpful.

Something to consider.
Thanks

@lordgort
Copy link

yes yes yes XD this would be awesome

@lordgort
Copy link

but i think this is more a request, not an issue

@dc42
Copy link
Collaborator

dc42 commented Jul 20, 2018

We will definitely not be supporting the WS2811/WS2812. The reason is that they use a nonstandard protocol that means the processor cannot do anything else (even process interrupts) while writing to these LEDs. That is unacceptable; it would lead to lost steps, lost serial input, possibly also network disconnections.

However, we have implemented a driver for DotStar LED strips in the latest RRF source code. These LED strips use standard SPI MOSI ands SCLK signals, so not only does the processor not need to give them its undivided attention, it can use DMA to send the data. To use them on the Duet WiFi or Duet Ethernet, you would need to make a hardware adapter to level shift the MOSI and SCLK signals to 5V, also to gate SCLK with your chosen /CS pin. You could do all of this using a single 74HCT02 chip. You would also need to enable the DotStar support for the Duet 2 build of RRF.

@dc42 dc42 closed this as completed Jan 22, 2019
@svs072477
Copy link

Studying the topic with WS2812 came across two projects using DMA, perhaps it will be useful.
https://www.pjrc.com/non-blocking-ws2812-led-library/
https://drive.google.com/file/d/0B5dbvc_yPqJHQ2FEUXpkR3NocnM/view?usp=sharing

@dc42
Copy link
Collaborator

dc42 commented Apr 10, 2019

It may well be possible, but it is inefficient, and the timing accuracy would depend on what other DMA is taking place at the same time. Both the network interface SPI and the SD card use a lot of bandwidth, e.g. 20MBytes/sec for the SD card. DotStar is a better solution.

@svs072477
Copy link

DotStar of course better. And have you had experience with other SPI LED strips? For example APS 102 https://cdn-shop.adafruit.com/datasheets/APA102.pdf In Russia, they are easier to buy than Dotstar

@svs072477
Copy link

I realized that asked a stupid :)

@dc42
Copy link
Collaborator

dc42 commented Apr 10, 2019

You mean because the DotStar originally used the APA102? That's my reading of the tech details section of https://www.adafruit.com/product/2238?length=1.

@svs072477
Copy link

Yes, Yes, I already wrote above that asked a stupid question :)

@stavros-k
Copy link

stavros-k commented Apr 11, 2019

If you have a lot of ws2812 hanging around and you don't want get apa102 or other supported led strips. You can get an arduino (as a cheap as 2$) and connect it with duet wifi to get the status and control the leds.
Duet <-> arduino - > leds
You can either do it with custom macros triggering pins on duet so you can read them with arduino easily. Or find out the apa102 spi protocol and read this.
Of course you will have to program the arduino code yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants