Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

R1842 patch LED: use HSV color space to calcuate LED color

2 posters

Go down  Message [Page 1 of 1]

royqh1979



Now LED's color is not accurate. For example, a Red LED will displayed as green if there's no currect.

By using HSV color, we keep the hue and only change the intensity.For example, red will always be red, just darked or lighter.

R1842 patch LED: use HSV color space to calcuate LED color Snap413

R1842 patch LED: use HSV color space to calcuate LED color Snap512



Last edited by royqh1979 on Sat Sep 02, 2023 11:28 am; edited 1 time in total

royqh1979



Patch cleaned.
Attachments
R1842 patch LED: use HSV color space to calcuate LED color AttachmentLED.zip
You don't have permission to download attachments.
(1 Kb) Downloaded 1 times

royqh1979



Demo of Red LED (old vs new)
R1842 patch LED: use HSV color space to calcuate LED color Snap614
R1842 patch LED: use HSV color space to calcuate LED color Snap713

KerimF likes this post

arcachofo

arcachofo

Led colors are a bit tricky.
For example what happens when the led is slightly overloaded?
It should increase it's brightness, but we are already at 100%.

In the picture below (with HSV patch) you see that 100 Ω and 200 Ω have the same brightness.

R1842 patch LED: use HSV color space to calcuate LED color Snap413


Also different colors have different brightness at same current (leds at the bottom with HSV patch).
In my previous implementation I tried to get a more uniform brightness, but colors got off the rails (leds at the top).

R1842 patch LED: use HSV color space to calcuate LED color Led-in10



I did some changes based in your solution (Rev 1851), but addressing some issues:
- Fixed the wrong color at very low brightness.
- Kept some brightness correction but keeping closer to your colors:

R1842 patch LED: use HSV color space to calcuate LED color Led-sa10

- Kept some overbright at slight overload (100 Ω led below).
- Added some color to the background to indicate slight overload (100 Ω led below).
- Kept the flashing warnings with medium and extreme overload (75 Ω & 10 Ω below).

R1842 patch LED: use HSV color space to calcuate LED color Leds-a10

KerimF likes this post

royqh1979



Great!

arcachofo wrote:Led colors are a bit tricky.
For example what happens when the led is slightly overloaded?
It should increase it's brightness, but we are already at 100%.

In the picture below (with HSV patch) you see that 100 Ω and 200 Ω have the same brightness.

R1842 patch LED: use HSV color space to calcuate LED color Snap413


Also different colors have different brightness at same current (leds at the bottom with HSV patch).
In my previous implementation I tried to get a more uniform brightness, but colors got off the rails (leds at the top).

R1842 patch LED: use HSV color space to calcuate LED color Led-in10



I did some changes based in your solution (Rev 1851), but addressing some issues:
- Fixed the wrong color at very low brightness.
- Kept some brightness correction but keeping closer to your colors:

R1842 patch LED: use HSV color space to calcuate LED color Led-sa10

- Kept some overbright at slight overload (100 Ω led below).
- Added some color to the background to indicate slight overload (100 Ω led below).
- Kept the flashing warnings with medium and extreme overload (75 Ω & 10 Ω below).

R1842 patch LED: use HSV color space to calcuate LED color Leds-a10

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum