How would I write LED row for row in OctoWS2811 ?

paulfer

Member
Hi All,

I am planning to try this. I have 200 of the new ws2811 26mm LEDS. Here is a pic of them:

Screenshot 2024-06-20 135437.png


And I am planning to place them in a grid of 20 cols by 10 rows.

as follows:

IMG-20240618-WA0007.jpg




What I dearly need to do is limit the amps draw. I am in the VMS sign business and power here in Africa comes at major premium.
These boards stand on isolated roads and they need solar/battery power.

I would like to try illuminate row for row.

I would firstly connect the 20 pins from the Teensy4.1(T41) to each row of the leds respectively. Then, turning on Row0 for say xxx uS then turning it off then Row1, etc etc. In the hope that that would reduce power draw if we only illuminate one row at a time.

So, I am thinking of declaring as follows:

Code:
OctoWS2811 leds0(ledsPerStrip, displayMemory, drawingMemory, config, numPins, 15);
OctoWS2811 leds1(ledsPerStrip, displayMemory, drawingMemory, config, numPins, 16);
etc..

This would need 20 pins then from the T41.

Or is there a better way to code the OctoWS2811 to get it to illuminate/darken row by row?

By coding something like this:

Code:
byte pinList[numPins] = { 15,16,17,etc };

//then turn on/off pin for pin to the LEDs

I hope Im making sense?

(For background info, in a past experiment with different single color LEDs I made a 20x10 matrix from PFETS and Constant current drivers (STP16CP) and I got approx 50% reduction in current draw. )

As this is all theoretical at the mo, I am open to any sugestions/advice/comment.

I am also thinking, this method would be no better than placing NFETs on the respective ground lines and pulsing them, which in turn would be no different than PWM'ing them which would probably just dim them. Which isnt what I want.


Comments?
 
Last edited:
IMG-20240615-WA0004.jpg

For context, here is a trailer I have just reconditioned , using APA102 LEDs , and it draws anywhere between 30 to 60amps!
Notice the large Solar Panels and Battery Boxes needed!
 
Impressive work!

Some questions and ideas come to my mind:

Why use WS2811 LEDs? Do you really need all the colors? If not, there should be LED options which are more energy efficient, i.e. give you more brightness drawing less current.

WS2811 have a defined and therefore limited update rate. A longer strip needs more time as more data have to be passed on through each LED. When no data is sent the last state is held usually. It can be a matter of the desired/needed update rate and/or a matter of the wiring how many pins are really necessary. 20x10 = 200 LEDs would be possible to control from one pin. (If 200 of the systems in the picture are used, this is possibly multiplied by 3 which would be also possible. edit: probably 3LEDs are adressed as one pixel from one chip here) 200 LEDs should give you 150Hz. 600LEDs 50Hz - which probably would be sufficient here.
You can find more details here: https://www.pjrc.com/teensy/td_libs_OctoWS2811.html

You can directly set values from 0 to 255 for each R G B channel for each of the LEDs using leds.setPixel(num, red, green, blue). With FastLED there are more options to set colors and global brightness. You can dim or blink any LED however you like and program it. Controlling each LED is not a matter of the used pins. Pins have only an effect on the update rate.

Are the clear enclosures already working as focussing lenses? If not, using optical lenses can focus the light to a smaller angle and enhance the brigthness significantly. Spreading the light in a wide angle of 180° is less efficient. There a cheap plastic lenses available. Probably more professional solutions, too. In LED lights for stages etc. there are lenses on them.

What about enhancing contrast "mechanically" by putting each pixel into a black or grey pvc tube so deep and wide as possible as the necessary viewing angly allows.

Edit:
Regarding pins for the LEDs a Teensy 4.0 should be sufficient.

It is wise to measure the current of the LEDs in all used states. There are huge differences depending on the exact type of chips which are used. They can differ even from the same order. There can be drawn a significant amount of power even when the LEDs are dark! This could be relevant in this application. In my experience 5V LEDs (WS2812) are more efficient regarding this.
 
Last edited:
Thanks Tom,
Why use WS2811 LEDs? Do you really need all the colors? If not, there should be LED options which are more energy efficient, i.e. give you more brightness drawing less current.
These LEDs have a single replacement capability, which in our line of work is priceless. The APA102s take too much skill for the average Joe to replace/solder. Over the years a lot of designs have been tried and they all have their drawbacks. I have built sigle LED boards with single colours. And they work fine. But, here things get broken/abused/liberated so one has to take it all into account.

WS2811 have a defined and therefore limited update rate. A longer strip needs more time as more data have to be passed on through each LED. When no data is sent the last state is held usually. It can be a matter of the desired/needed update rate and/or a matter of the wiring how many pins are really necessary. 20x10 = 200 LEDs would be possible to control from one pin. (If 200 of the systems in the picture are used, this is possibly multiplied by 3 which would be also possible. edit: probably 3LEDs are adressed as one pixel from one chip here) 200 LEDs should give you 150Hz. 600LEDs 50Hz - which probably would be sufficient here.
You can find more details here: https://www.pjrc.com/teensy/td_libs_OctoWS2811.html
Yes they address all three LEDs as one LED.

Are the clear enclosures already working as focussing lenses? If not, using optical lenses can focus the light to a smaller angle and enhance the brigthness significantly. Spreading the light in a wide angle of 180° is less efficient. There a cheap plastic lenses available. Probably more professional solutions, too. In LED lights for stages etc. there are lenses on them.

They are not, sadly, but the brightness reallly is sufficient. Also, we use a diffusing polycarb material which works a treat in front of the LEDs. Especially in bright sunlight.

What about enhancing contrast "mechanically" by putting each pixel into a black or grey pvc tube so deep and wide as possible as the necessary viewing angly allows.
In the past, we tried two methods, yes. One with little "EYEBROWS" made of UPVC and another where we had the LEDS recessed behind a matt black sheet which had the LED visible through clear "holes" in the sheet. Both worked fine. Probably as well as the diffuser polycarb, BUT, the damn road engineers refused to sign them out because of the angle restriction. (40degrees)
It is wise to measure the current of the LEDs in all used states. There are huge differences depending on the exact type of chips which are used. They can differ even from the same order. There can be drawn a significant amount of power even when the LEDs are dark! This could be relevant in this application. In my experience 5V LEDs (WS2812) are more efficient regarding this.
I will thanks. I find the best way is to test proper with all running than try the theoretical.

But thanks a mil for all your advice. You insight to the OCTO library helps a ton! I shall build this board the weekend. I have just received my laser cut sheet, I have sprayed it matt black, and I am waiting for the paint to dry. Then I will load up the LEDs and give it a whirl. And report back.

IMG-20240621-WA0012.jpg
 
What a great and useful project! Very interesting!
Looking forward to seeing something about the progress or the finished solution.
 
Back
Top