Skip to content

Conversation

@stefanbode
Copy link
Contributor

@stefanbode stefanbode commented Nov 24, 2022

Description:

AC-Dimmer was not linear on power because of the behavior AC-current to calculate the power through the integral over SINUS. Lookup table fix the linearity issue.
Related issue (if applicable): fixes #

Checklist:

  • [] The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.5
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

Power on AC-Dimmer is based on integral over the sinus. Implement mapping table to get a more linear power behavior.
change to linear power distribution on PWM
{ 99, 936 },
{ 100, 1000 },
{ 0xFFFF, 0xFFFF } // fail-safe if out of range
{ 0xFFFF, 0xFFFF } // fail-safe if out of range
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to put it twice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a copy&paste issue.....

@s-hadinger
Copy link
Collaborator

Nice!

@arendst arendst merged commit f0f1a85 into arendst:development Nov 24, 2022
@stefanbode stefanbode deleted the patch-1 branch November 24, 2022 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants