• 0
Alex

Documentation For Ws2812 Led Strip

Question

I have a question from the customer. Can anyone help on this?

 

 
I purchased the WS2812 LED Strip but can not find the documentation covering the protocol to control it onyour site.  Can you please provide a link to a .pdf or a website?
 

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Hi, 

 

The WS2812 LED Strips were not made directly by Digilent from the ground up (so-to-speak) so we not developed a nice Digilent documentation for it as of yet.  However, we have made links on the product page to two different Instructables that explain how you would get the LED Strips up and running on either a chipKIT uC32 or Uno32 ( well as the chipKIT WF32 or Max32 (http://www.instructables.com/id/Getting-Started-with-WS2812-LEDs-with-Digilent-chi/).

 

Additionally, you can check out our blog post on the WS2812's (https://blog.digilentinc.com/index.php/new-product-ws2812b/), which explains how to recognize which LED Strip you have, how to power the LEDs, and communicating with LEDs. On the blog post we also recommend two more tutorials on running these LEDs by Phillip Burgess from Adafruit and from arcobotic on Instructables.

 

Please let us know if you have any more questions.

Share this post


Link to post
Share on other sites
  • 0

Some simple Google-fu like "WS2812B filetype:pdf" gives the following links:

 

If the LEDs have 6 pins then they are the older WS2812 model : https://www.adafruit.com/datasheets/WS2812.pdf

 

If the LEDs have 4 pins then they are the new WS2812B model : http://www.adafruit.com/datasheets/WS2812B.pdf

 

And what is the difference (apart from the number of pins?) : http://www.lightingnext.com/WS2812B_VS_WS2812.pdf

Share this post


Link to post
Share on other sites
  • 0

The protocol interface is pretty simple - the state of the bus has to be reset by holding the data signal low for 50us, followed with sending out 24 bits for each LED that is connected in the string.

 

The '1' bits are sent by driving the data line high for 0.9us, followed by driving the line low for 0.35ns, The '0' bits are sent by driving the line high for 0.35us, then driving it low for 0.90us.

 

The frame is in 8-bit Green, then 8-bit Red then 8-bit Blue format, and within each colour the MSB is sent first.

 

Once they have received a 24-bit colour value the LED will remember it until a new colour is received (or power removed).

 

The timing is quite tight. If you are writing your own code for a micro-controller you will definitely want to have interrupts disabled while you bit-bash your bits (as servicing an interrupt might cause a glitch).

 

If you want to get started with an FPGA you can find some source at http://hamsterworks.co.nz/mediawiki/index.php/Intelligent_LEDs

 

Oh, and they can suck a lot of juice - each LED can use up to 0.3W - it only takes 15 LEDs to overload a USB port!

Share this post


Link to post
Share on other sites
  • 0
On 2014/11/20 at 1:02 AM, hamster said:

Some simple Google-fu like "WS2812B filetype:pdf" gives the following links:

 

If the LEDs have 6 pins then they are the older WS2812 model : https://www.adafruit.com/datasheets/WS2812.pdf

 

If the LEDs have 4 pins then they are the new WS2812B model : http://www.adafruit.com/datasheets/WS2812B.pdf

 

And what is the difference (apart from the number of pins?) : http://www.lightingnext.com/WS2812B_VS_WS2812.pdf

This is really helpful. but more and more people prefer to use sk6822 RGB LED now.

Share this post


Link to post
Share on other sites
  • 0

Hello @Philxu007,

From what I could see on the datasheet you provided and this blog post the configuration pins are different on 2813 than on the 2812 and 2811. The code will not work without a pinout reconfiguration. See the pictures attached.

Best regards,

Bianca

2.JPG

1.JPG

Share this post


Link to post
Share on other sites
  • 0

Hi @Philxu007,

Looking at the ws2813 and the sk6822 datasheets they look very similar.  I would suggest looking at the Instructable  Compare SK6822 WS2813 APA102 SK9822 LED for a comparision. The sk6822 pins are different on ws2813 than on the sk6822. The code talked about above will not work without a pinout reconfiguration. See the picture attached for the SK6822 vs above attached picture of the WS2813.  Another avenue to get information about these addressable LEDs would be to contact the manufacture here.

mechanical_sk6822.jpg

Edited by jpeyron

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now