Page 1 of 1

RGB LED WS2811

Posted: Mon Sep 08, 2025 12:30 pm
by Abhijit
Hello!

I am using WS2812B RGB led in one of my projects, below are few doubts, may i request to please address if someone has faced similar problem.

1. The component is not showing correctly in the 3D panel, i tried 1D, 2D, and 3D, but i could see only a single dot always with the axis arrow when selected, when i click somewhere else on the 3D panel the component gets deselected but do not show anything, in my project i have 24 count of LED's in 1D arrangement.

2. Abruptly any LED out of 24 blink, even if i write zero in the R,G, B, values

3. on compiling i get below Compiler Message
157: #warning WS2811 Timings are less than 10 instructions, timing may be incorrect at the current clock speed
^ (162) #warning: WS2811 Timings are less than 10 instructions, timing may be incorrect at the current clock speed (warning)
Kindly help me know what mistake i am making.

Thank you.

Regards
Abhi

Re: RGB LED WS2811

Posted: Mon Sep 08, 2025 12:44 pm
by mnfisher
Hi Abhi,

Please upload your chart....

Martin

Re: RGB LED WS2811

Posted: Mon Sep 08, 2025 4:22 pm
by Abhijit
Hi! Martin

Kindly excuse for the delayed reply, it took me some time to extract the sample from the main program, attached is the chart to review.

By the way how long can i extend the data pin, i mean from the micro port (C.5 pin) the the first LED (LED.0), can i lay the 3 wires i.e. +5V, 0V, and data, up to 2 meters long before the first LED and space the 25 LED's 150mm apart. Do i need to pull up or pull down the data pin?

@ Matrix team: i do not see 25 numbers of LED's in the 3D panel after one of the update, previously it was visible.

Is the abrupt blinking of one of the LED out of 25 because of the refresh macro, i notice something to do with that if i am not wrong.

Thank you for writing back, hear you soon.

Regards
Abhi

Re: RGB LED WS2811

Posted: Mon Sep 08, 2025 9:21 pm
by mnfisher
First thing to check - is the clock speed correct? Have you run a 1s blinkie?

I don't think you need a pull resistor on the data line - at least for short lengths - I suppose the way to find out the 'range' is to test with some longer (and longer) wires - if they are reasonable quality then you might get a reasonable distance (with the MAX7219 - I found that the quality of the wire used made a huge difference to the speed that could be used - so some signal degradation might occur due to resistance / electrical fields etc - and 'cheap' jumpers didn't score highly)

Running your code on Arduino (which I currently had set up with some RGB LEDs) - flashes the 25th LED (position 24 - starting from 0) which seems to be the intention of your code...

My guess - if you get a random LED flashing would be a timing issue - the LEDs are receiving the data, but something is too slow and the 'latch' is occurring at a random position.

Martin

Re: RGB LED WS2811

Posted: Mon Sep 08, 2025 11:28 pm
by chipfryer27
Hi

I have updated libraries to latest.

I cannot even "see" the LEDs if I try and create a chart from new using the component, or open up Abhi's. I can select 1D and I can select the number of LEDs (default 27) and I can by going into properties manually set dimensions, but the LEDs don't appear. Running Abhi's code doesn't give me anything in simulation. I see his push-button but nothing else....

You are running at 64MHz which is plenty fast enough for your needs. I think the minimum speed you need is 400Kbps (don't quote me though). Doing a 1-sec blinkie as Martin suggests is always a good idea to "prove" Oscillator settings are good. However I think you use that chip a lot so will know it better than I :}

The WS2811 chips reshape, so you just need to ensure you have a good signal hitting the first in your chain and all being well they will take care of everything else. No need for any pull up/downs. Do enure though that the signal meets minimum high value where it connects to your chain or the chip may struggle to differentiate high / low. You "may" need a low value resistor in series with Din (datasheet should advise, but I think a few tens of Ohms) which can help with reflections

I assume you are using an appropriate PSU.

Do you have a link to or datasheet for the strip you have?

Regards

Re: RGB LED WS2811

Posted: Tue Sep 09, 2025 3:07 am
by Abhijit
Hi! Martin, Hi! Chipfryer
good morning

Thank you both for your suggestions, i will check and keep you posted.

Yes the rest of the program is working good still i have kept 1 sec blink in the loop (in my chart)

I also noticed only then that the program is running at 64Mhz, :lol: , and the PLL is not needed but probably running the previous chart with other program settings, i will try to reduce to 16Mhz and check.

Yes Martin i will surely use the best quality cable from the micro to first LED, no doubt i will try to keep the shortest length.

Below is the link of the LED strip i am using.
https://hubtronics.in/neopixel-ws2811-l ... ch=ws2812b

Thank you again for your inputs, i will keep you posted.

Regards
Abhi