Author Topic: Dimming WS2812C LED  (Read 1185 times)

0 Members and 1 Guest are viewing this topic.

Offline symbianasTopic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: lt
Dimming WS2812C LED
« on: February 08, 2023, 09:59:32 pm »
Hi, is there a way to dim WS2812C LED (SMD 2020 Chip: San'an)?
In the darkness RGB color of "1, 0, 0" is ok, but I cant get combined colors at this level of brightness, like lets say I want orange which would be at least RGB "6, 1, 0" which is now too bright.
Is there any way to lower the brightness?
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Dimming WS2812C LED
« Reply #1 on: February 08, 2023, 10:50:19 pm »
Each of the 3 channels supports 8 bits, so 256 levels randing from 0 (completely off) to 255 which is full brightness. You can't go any lower than 1, so once you hit a level of 1 with any one of the three colors that is as low as you can go for the whole combination.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: Dimming WS2812C LED
« Reply #2 on: February 08, 2023, 11:01:09 pm »
If your chain is short (1-2 LEDs), you can try to PWM them. For long chains you will get a lot of flicker.
Alex
 

Offline themadhippy

  • Super Contributor
  • ***
  • Posts: 2583
  • Country: gb
Re: Dimming WS2812C LED
« Reply #3 on: February 08, 2023, 11:09:02 pm »
Quote
you can try to PWM them
might not be appreciated by the chips built into the leds
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Dimming WS2812C LED
« Reply #4 on: February 08, 2023, 11:16:28 pm »
might not be appreciated by the chips built into the leds

I assume he meant PWM them by updating the brightness settings rapidly. IIRC you can update a few of these at several hundred Hz, but the more you have chained together, the more data you have to send out for each update.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: Dimming WS2812C LED
« Reply #5 on: February 08, 2023, 11:23:56 pm »
At 800 kHz clock it takes 30 us to transfer information for one LED and 50 us for the reset signal. So, one LED can be updated at 12 kHz rate. And 30 LEDs can be updated at 1 kHz rate if my math is correct.

But to PWM you need to vary the period, and at high update rate your resolution would be very limited.
Alex
 

Offline timenutgoblin

  • Regular Contributor
  • *
  • Posts: 190
  • Country: au
Re: Dimming WS2812C LED
« Reply #6 on: February 09, 2023, 12:10:13 am »
you can try to PWM them.

might not be appreciated by the chips built into the leds

I assume he meant PWM them by updating the brightness settings rapidly. IIRC you can update a few of these at several hundred Hz, but the more you have chained together, the more data you have to send out for each update.

Do you mean setting R (red) to 3, 3, 3, 3 etc. (100% duty cycle) and G (green) to 1, 0, 1, 0 etc., (or 1, 1, 0, 0, 1, 1, 0, 0, etc.) 50% duty cycle? That would result in a 3:0.5 (6:1) ratio.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1613
  • Country: gb
Re: Dimming WS2812C LED
« Reply #7 on: February 09, 2023, 12:23:54 am »
Hi, is there a way to dim WS2812C LED (SMD 2020 Chip: San'an)?
In the darkness RGB color of "1, 0, 0" is ok, but I cant get combined colors at this level of brightness, like lets say I want orange which would be at least RGB "6, 1, 0" which is now too bright.
Is there any way to lower the brightness?

Red in these devices tends to be the lowest brightness - I know they claim that they are all equal in intensity for the given PWM value, but they aren't. So [1,0,0] will be the minimum brightness - of any colour - that can be achieved without dithering (as discussed in previous replies).  Adding green or blue to the [1,0,0] red would of course increase brightness, at least double if you have [1,1,0]/[1,0,1].

As far as I'm aware, thats pretty much the minimum brightness - I'm surprised its too bright given that the 2020 WS2812C's run at 5mA per die/channel.  But I suppose if you are running these are night, with no other sources of light then many LED's can appear too bright even running a few mA.  But with a value of 1, thats an average brightness of 0.4% of a 5mA red LED die.
 

Offline symbianasTopic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: lt
Re: Dimming WS2812C LED
« Reply #8 on: February 09, 2023, 06:13:28 am »
Yes, at night with no other source LEDs tend to be distracting and are too bright. I have 120leds in a chain so I guess its not very good to PWM them.
How about hardware modifications? Sanding LEDs with sand paper to become matte?
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Dimming WS2812C LED
« Reply #9 on: February 09, 2023, 07:27:48 am »
You could certainly coat them with something. Window tinting film or tinting in spray cans they sell for idiots to put on their car's tail light lenses would probably work.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11561
  • Country: ch
Re: Dimming WS2812C LED
« Reply #10 on: February 09, 2023, 03:51:39 pm »
You can try reducing the supply voltage, they will usually function below the 5V rating. What you’ll find is that once you get below about 3.5V, the colors will start to shift, since the blue die needs the highest voltage (around 3.2V), then the green (around 2.8V), while the red will happily work down to far less. The consequence is that blue will go dim sooner than green, and that sooner than red, resulting in a progressive color shift, first towards yellow, then towards red.
 
The following users thanked this post: Zero999, symbianas

Offline symbianasTopic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: lt
Re: Dimming WS2812C LED
« Reply #11 on: February 10, 2023, 06:21:06 am »
You can try reducing the supply voltage, they will usually function below the 5V rating. What you’ll find is that once you get below about 3.5V, the colors will start to shift, since the blue die needs the highest voltage (around 3.2V), then the green (around 2.8V), while the red will happily work down to far less. The consequence is that blue will go dim sooner than green, and that sooner than red, resulting in a progressive color shift, first towards yellow, then towards red.

I though IC will stop working on lower voltages, but it seems its still working even at 1.8V, though blue color is gone at this level. 2.5V seems to be ok for blue though, it still lights up.
« Last Edit: February 10, 2023, 10:32:19 am by symbianas »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11561
  • Country: ch
Re: Dimming WS2812C LED
« Reply #12 on: February 10, 2023, 08:16:30 am »
I assume the IC is CMOS and thus capable of low voltages. This is also handy because it means they work quite reliably with signals from 3.3V microcontrollers, even when the LEDs are powered from 5V, without needing level shifters.

FYI, it’s also true of the APA102 style (“Dotstar”) LEDs, which I used in one project with a 3.3V microcontroller, with the LEDs powered directly from the LiIon battery voltage (3.0-4.2V).
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11561
  • Country: ch
Re: Dimming WS2812C LED
« Reply #13 on: February 10, 2023, 08:24:20 am »
As for the original problem, of needing to dim below 1/256: this reminds me that I really need to order some of the newer, advanced successors to the APA102, namely the HD108 or SK9826, which are models with 16 bits per channel (plus 5-bit global brightness!), allowing for far, far, more brightness control. The big question is whether any of the big addressable LED libraries support them…
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf