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

100 to 0 switching not proper #67

Open
fenilGhoghari opened this issue Apr 12, 2023 · 1 comment
Open

100 to 0 switching not proper #67

fenilGhoghari opened this issue Apr 12, 2023 · 1 comment

Comments

@fenilGhoghari
Copy link

We are facing an issue with a library while using the code to dim an AC fan. When we try to set the power to 0 at once, the fan does not stop. On the other hand, if we set it to 100 at once, the fan generates too much flickering. We have defined a few steps for dimming, where 0 represents 0% dimming, 1 represents 25%, 3 represents 50%, 4 represents 75%, and 5 represents 100%.

However, when we try to directly switch from 100% to 0%, the library does not generate the proper signal to handle the AC load, which leads to flickering. We are facing this issue and would appreciate any help to resolve it.

@yuguar
Copy link

yuguar commented Dec 7, 2023

I'm having same issue using pid controller output as dimmer power setting.
I've limited pid output to max 98% and now it's ok . This line in RBDmcuESP32.cpp made me to try with max 98% power but it's above my knowledge why it works.

void dimmerLamp::setPower(int power)
{
if (power >= 99)
{
power = 99;
}
dimPower[this->current_num] = power;
dimPulseBegin[this->current_num] = powerBuf[power];

delay(1);

}

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

No branches or pull requests

2 participants