Description
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Platform
- Hardware: ESP8285 device
- Core Version: v9.2.0
- Development Env: Arduino IDE
- Operating System: MacOS
Settings in IDE
- Module: Adafruit Feather Huzza ESP8266
- Flash Mode: dio
- Flash Size: 4MB
- lwip Variant:
- Reset Method:
- Flash Frequency:
- CPU Frequency:
- Upload Using: SERIAL
- Upload Speed: 115200
Problem Description
In the current version of Tasmota, when using two PWM outputs to control a CCT light, both PWMs have 0° phase shift, i.e., both go up or down in sync at the start of a cycle.
In some cases it would be better to spread out the PWM, so that at 100% brightness, the total power is distributed over the whole PWM cycle. This is relevant for tunable white COBs LEDs which usually are rated for a maximum combined constant current for both cold and warm channels.
E.g., For brightness slider at 100%, if the CCT slider is at 80%:
Currently: PWM1 is high between 0 and 80% of the cycle, PWM2 is high between 0 and 20% of the cycle. The power profile over time is 120% during 0-20% of the cycle, 80% during 20-80% of the cycle and 0% during 80-100% of the cycle.
This effectively halves the max current that a tunable white LED can be driven with. As in the case where the CCT slider is 50%, the LED would get 200% of the driving current in half the cycle and zero on the other half.
Alternatively, an option could be implemented so that - for the same example (for brightness slider at 100%, if the CCT slider is at 80%): PWM1 is high between 0 and 80% of the cycle, the PWM2 should be high between 80 and 100% of the cycle.
I this case the power profile is constantly 100% over the entire cycle.