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

TM1814 RGBW Support #325

Closed
theomegapixel opened this issue Dec 30, 2019 · 9 comments
Closed

TM1814 RGBW Support #325

theomegapixel opened this issue Dec 30, 2019 · 9 comments
Assignees
Labels
enhancement pending Pending new release; already merged but not released in a version under test Available on github, but needs testing before it is released

Comments

@theomegapixel
Copy link

Hello Makuna,
I was wondering if it were possible to add support for the TM1814 IC RGBW https://datasheetspdf.com/pdf-file/1330606/TitanMicro/TM1814/1 on the ESP32. I've previously been using the adafruit neopixel library and a teensy3.5 and modified the library to match the data sheet it seems fairly simple but I'm unfamiliar with your library.

I used the SK6812 RGBW constructor and added the required C1 and C2 values to the frame at the begging of the buffer and adjusted the timings to match, I ended up with pixels.setPixelColor(amp, ~amp, 3 pixels.color(255,0,0,0); and pixels.fill(amp, ~amp, pixels.color(255,0,0,0), 0, NUM_LEDS);. I then use a NOR gate to invert the signal.

@Makuna
Copy link
Owner

Makuna commented Dec 31, 2019

NOTES:

  • These chips are unique in the ability to set the CC for each channel of the LEDs (but shared with all on the strip). These value are sent at the front of the data stream. There will be a need to expose setting these value.
  • The signal by default is inverted from others, so the Invert version would be normal.

@theomegapixel
Copy link
Author

Hey Michael,

I hope you had a good New Years!
Thanks for taking a look at this, if you do implement these chips I can report back with tests and oscilloscope readings.

Thanks,
Connor

@theomegapixel
Copy link
Author

theomegapixel commented Jan 4, 2020 via email

@ryanjjennings
Copy link

Makuna,

Thanks for taking a look at this. I have some I would like to run in Wled.

Ryan

@Makuna Makuna self-assigned this Jan 9, 2020
@Makuna
Copy link
Owner

Makuna commented Jan 9, 2020

I think I have a solution that doesn't require a bunch of code duplication; but it will take a bit to spread it through all the methods for all platforms. initial work shows a minor code increase for other methods/features that don't have these "settings" but no extra memory for them.

@theomegapixel
Copy link
Author

Thanks Michael for giving this a shot I'm looking forward to testing the code.

@Makuna
Copy link
Owner

Makuna commented Jan 12, 2020

#329
Esp32 Support is now checked in. I will continue to work on other platforms before creating a new release. Please try this out.
The normal way to define the NeoPixelBus to use Tm1814 is like the following (note, no invert hardware required, the normal signal is already inverted as required for this chip.

NeoPixelBus<NeoWrgbTm1814Feature, NeoTm1814Method> strip(PixelCount, PixelPin);

if you are using hardware to invert the signal, then you can use the following definition which will invert the signal from the normal required TM1814 signal.

NeoPixelBus<NeoWrgbTm1814Feature, NeoTm1814InvertedMethod> strip(PixelCount, PixelPin);

To set the constant current feature these chips support, use the following line once somewhere in setup or loop

// 16.5 ma for each RGB channel, and 38 ma for the white channel
strip.SetPixelSettings(NeoTm1814Settings(165,165,165,380)); // RGBW currents, in tenth milliamperes

Of course, change the numbers to the current requirements of your LEDs.

@Makuna
Copy link
Owner

Makuna commented Jan 12, 2020

I am also interested if using the settings could be used to dim all the LEDs, running them at half their rated current would mean 50% dimmer and might increase the effective range of the RGB values; where normally its hard to tell 200,200,200 from 255,255,255.

@Makuna Makuna added pending Pending new release; already merged but not released in a version under test Available on github, but needs testing before it is released labels Jan 13, 2020
@theomegapixel
Copy link
Author

Hi Michael,

thank you very much for adding the support. So far the tests work well there aren't any major problems. So far so good, I'll continue to test and see if any issues arise.

I've tried using the current controls it can be subtle the difference in mA output but yes you can you it to extend the range. I'm yet to do test with an accurate colour meter or spectrometer to see what the affects are.

Thanks again,
Connor

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 under test Available on github, but needs testing before it is released
Projects
None yet
Development

No branches or pull requests

3 participants