Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FW1906 LED driver chip #702

Closed
Makuna opened this issue May 7, 2023 · 19 comments
Closed

Support FW1906 LED driver chip #702

Makuna opened this issue May 7, 2023 · 19 comments
Labels
enhancement pending Pending new release; already merged but not released in a version

Comments

@Makuna
Copy link
Owner

Makuna commented May 7, 2023

Is your feature request related to a problem? Please describe.
The FW1906 is often used in strips with a single package LEDs of RGB-WWx configuration.

Describe the solution you'd like
It seems to be a fully WS2812x signal compatible chip (need spec) driving six channels rather than just three.
NeoRgbwwxFeature similar to the already existing NeoRgbwxxFeature but exposing the second white channel?
RgbwwColor to match it?

Describe alternatives you've considered
Stick with the NeoRgbFeature/RgbColor; rely on the sketch writer to know that even pixels are the WWx rather than RGB and that there always needs to be even number of Pixels.

Additional context
Is this chip used on a strip that has other configurations, like two RGB LEDs or even RGBWWW?

@Makuna
Copy link
Owner Author

Makuna commented May 7, 2023

@marschr Note the alternatives listed above. You can do this today with the caveat that even pixels the RGB represents WWx in your case.

@marschr
Copy link

marschr commented May 8, 2023

I made some progress today, I got my ESP32 working with NeoPixelBus<NeoRgbwwxFeature, NeoEsp32I2s0800KbpsMethod>, NeoRgbwwxFeature being a modified version of NeoRgbwxxFeature. I can set the strip to the colors accordingly with SetPixelColor(). ClearTo() seems to have some issues with my RgbwwColor, its sorta sampling all the 5 color channels and outputting a mean value to all of them, I need to look further into it and iron things out. Also, color channel ordering is G, R, B, CW, WW.

Additional context Is this chip used on a strip that has other configurations, like two RGB LEDs or even RGBWWW?

I haven't seen it being used in other LED strips, seemed to be a very application specific LED controller IC, it doesn't even have any laser markings on the packaging, I have a chinese datasheet for it if needed (google translator did a somewhat readable job with it). Now for these single package RGBWW LEDs I couldn't find any spec.

@Makuna
Copy link
Owner Author

Makuna commented May 8, 2023

Modify your Feature to correct order, NeoGrbwwxFeature. Its ok to only support the order that you need now so no need to keep NeoRgbwwxFeature. If its not obvious how, just compare NeoRgbFeature to NeoGrbFeature.
Go ahead and create a pull request with what you have, I won't merge it, but I can take a look and provide feedback through the review system.

@Makuna
Copy link
Owner Author

Makuna commented May 9, 2023

The only thing that seems broken was the count should be 5 not 4 as noted in the code review on the pull request.

@Paalap
Copy link

Paalap commented May 20, 2023

Hi, the development is highly appreciated but it is not really working for me - it seems the color pixels are shifted I would assume I need something like "CxGRBW" instead of "RGBCWx"

To be honest I'm not fully into the project and didn't figured out how to set empty bit in between other colors

EDIT

I was testing oin ESP8266 with NeoPixelBus<NeoRgbwwxFeature, Neo800KbpsMethod>
Ok FW1906 is actually a double RGB IC, i.e. 6 channels which can be in use differently but I hope having a 6ch approach all derivats can be handled easier.
Some specs

@Makuna
Copy link
Owner Author

Makuna commented May 21, 2023

A quick way to test color order is to do something like this...
Use this definition NeoPixelBus<NeoRgbFeature, NeoWs2812xMethod>
Then use this sample to set the colors...

strip.SetPixelColor(0, RgbColor(255,0,0));
strip.SetPixelColor(1, RgbColor(0,0,0));

strip.SetPixelColor(2, RgbColor(0,255,0));
strip.SetPixelColor(3, RgbColor(0,0,0));

strip.SetPixelColor(4, RgbColor(0,0,255));
strip.SetPixelColor(5, RgbColor(0,0,0));

strip.SetPixelColor(6, RgbColor(0,0,0));
strip.SetPixelColor(7, RgbColor(255,0,0));

strip.SetPixelColor(8, RgbColor(0,0,0));
strip.SetPixelColor(9, RgbColor(0,255,0));

strip.SetPixelColor(10, RgbColor(0,0,0));
strip.SetPixelColor(11, RgbColor(0,0,255));

strip.Show();

Then note the pixels that are lit and the colors in order.

@Paalap
Copy link

Paalap commented May 22, 2023

the result is GRBCWx

@Makuna
Copy link
Owner Author

Makuna commented May 22, 2023

@Paalap To be precise, is this color order (GRBCWx) on the strip what you observed or is this the derived order of the feature that you need? (OR both).

@Paalap
Copy link

Paalap commented May 22, 2023

@Makuna Yes this is the color's order on the strip with your code above

@BLeibbrand
Copy link

@BLeibbrand
Copy link

@Paalap
Copy link

Paalap commented May 31, 2023

Finally got some time to test - it is working, I've found my issue.

To be more detailed:

  • Defined for me NeoGrbcwxFeature
  • strip->SetPixelColoris working fine for me
  • strip->ClearTo is creating some wired results ... is it caused by 6 vs 5 pixels?

Everything else is untested or for me it is done outside of the library

@marschr
Copy link

marschr commented May 31, 2023

@Paalap I think I could give some hints on why ClearTo() is not working, I did change some stuff for it to work, take a look into the Neo6Byte5xElements.h file here: marschr@854e4f8 .
I borrowed the replicatePixel() from other features implementation although I'm not sure if it's the most efficient way to rewrite all the addresses for all the leds.

(I couldn't find time to work on the FW1906 implementation lately and needed to buy new esp32s to test it)

@Makuna
Copy link
Owner Author

Makuna commented May 31, 2023

I didn't spot anything specific that would cause ClearTo to not work. I commented in the pulls on some minor things you will want to fix (using CW setting on WW element).

But I noticed the fix you applied is also incorrect in my current elements classes and I will address those.

@Paalap
Copy link

Paalap commented Jun 1, 2023

@marschr Thanks! This fixed it - now it si working fine.

(Only WhiteTenthMilliAmpere was ignored as I'm not using it and I miss a new additional settings class)

@Makuna
Copy link
Owner Author

Makuna commented Jun 5, 2023

NOTE: Pull 710 does a major refactor of features/NeoElements and fixes the ClearTo issue. This is no longer compatible with your changes mentioned above. But I will be re-creating your changes in the next few days and merge those in.

@Makuna Makuna mentioned this issue Jun 5, 2023
@Makuna
Copy link
Owner Author

Makuna commented Jun 5, 2023

If you pick up the master branch, you will now have
NeoGrbcwxFeature - feature with color order of GRB Colder White, Warmer White, and an ignore channel x.
RgbwwColor - color object that includes a WW (warmer white) and CW (colder white).

Note: WW and CW are relative to each other rather than specific technical warm white and cold white. So, if you have a neutral and cold, WW = neutral. If you have a warm and neutral, then CW = neutral.

If you have all three, WW, NW, and CW, then thats a whole other issue that needs to be created.

@Makuna Makuna added the pending Pending new release; already merged but not released in a version label Jun 5, 2023
@Paalap
Copy link

Paalap commented Jun 6, 2023

Thanks - is working very well fo me!

Will you also publish a release to arduino in the next time?

@Makuna
Copy link
Owner Author

Makuna commented Jun 27, 2023

https://github.com/Makuna/NeoPixelBus/releases/tag/2.7.6

@Makuna Makuna closed this as completed Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pending Pending new release; already merged but not released in a version
Projects
None yet
Development

No branches or pull requests

4 participants