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

KP18058: LED current setting, PWM dimming #906

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

miegl
Copy link
Contributor

@miegl miegl commented Aug 19, 2023

  • RGB LEDs at full power
  • LED current now configurable (0-31)
  • PWM dimming instead of analog

@openshwprojects
Copy link
Owner

That's very interesting, can you say few words about how it works?

Also, is full power always preferred on all devices?

@miegl miegl reopened this Aug 19, 2023
@miegl miegl changed the title KP18058: full RGB power, PWM dimming KP18058: LED current setting, PWM dimming Aug 19, 2023
@miegl
Copy link
Contributor Author

miegl commented Aug 19, 2023

  • Previously, the RGB LED current was very low (set to 1 in fact), after looking at https://www.elektroda.com/rtvforum/topic3985037-30.html#20663929 I figured out setting the RGB LED current. It can be set to 0-31, seems like the value is in mA.
  • I've set the default RGB LED current to 14, which corresponds to the red color sample in picture on forum. (Blue and green colors have slightly lower current, I guess that the original firmware does this because of human eye color perception?)
  • The default CW LED current of 30 also corresponds to the intercepted I2C communication on forum.
  • CW LED current and RGB PWM mode referene taken from http://www.kiwiinst.com/newsinfo/2765480.html?templateId=510705 and this image.

Also, KP18058 and KP18068 share the same exact protocol, so the unfinished KP18068 driver can be probably removed.

@openshwprojects
Copy link
Owner

Thank you, that's a great progress. How do you know that they share the same protocol? The linked page doesn't seem to specify it, was it tested?

@miegl
Copy link
Contributor Author

miegl commented Aug 20, 2023

I have and tested the driver on KP18068, findings on forum for KP18058 (protocol and values) seem to correspond. Also the linked page contains this image:
obrazek

The only difference between KP18058 and KP18068 seems to be the Power factor (0.5 vs 0.7), so I think it's pretty safe to assume the protocol is exactly the same.

@openshwprojects
Copy link
Owner

Love it! Thank you!

@openshwprojects openshwprojects merged commit 323d4e9 into openshwprojects:main Aug 21, 2023
16 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.17.225 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants