-
Notifications
You must be signed in to change notification settings - Fork 118
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
Output pin uncertain state #8
base: master
Are you sure you want to change the base?
Conversation
Between the two if branches at the end, the state of output pin is inconsistent. Changed this: Added else clause Set timer counter to 32, in order to cover time between zero cross on 50Hz Increase pulse width to 10 This solved for me the issues with flickering and bad load control.
I tested the fix, and it indeed fixes all the problems I had with blinking and inconsistent controll. Thanks Mesmer88 |
Any Idea about the fix with ESP8266? |
I think it should also work fro ESP8266. Basically this one: RBDDimmer/src/esp8266/RBDmcuESP8266.cpp |
Yeap I tried. But the problem is i can only change the pulse width to 10. And not sure about "Set timer counter to 32," There are no option like esp32, "timerAlarmWrite(timer, 32, true)" |
Actually that part is not that important. During my own calculations i thought that the original ones was a bit off, but it shouldn't matter much. Can you try just changing the PIN loop to this one?? Replace
with
On line 185 for ESP8266 file? |
Sure, will try. |
Update:: Doing so didnt solve flickering :( |
while the fix fixed flickering on esp32 for my lamp when I tested it with a heater element it seems that it still doesn't work properly. Setting the power level to 0 seems to not shut down AC on the load, so I am guessing the light thing is just fortunate but the actual range of output is not covered. |
I just tried the changes you recommended with the ESP8266 and still got mad flickering (it's probably best if you mute before watching, the robot vacuum was buzzing around me): https://www.dropbox.com/s/67gne6dozlg0s8e/Video%2017-05-2019%2C%2017%2027%2041.mov For context, I have a capacitive touch lamp that I'm modding to be a smart lamp. The touch/light level logic is all working fine (tested with an LED), that's what you can see in the serial monitor. It doesn't matter what level I set it to, it's chaos. Even setting it to 0 causes flashing. Here's the slightly different flashing with the original version of the code: https://www.dropbox.com/s/9bd4i49j05g0xrk/Video%2017-05-2019%2C%2017%2039%2037.mov I'm going to keep digging into RBDmcuESP8266.cpp, try to understand it more and see if there's anything I can tweak. If anyone has any ideas though... |
Between the two if branches at the end, the state of output pin is inconsistent.
Changed this:
Added else clause
Set timer counter to 32, in order to cover time between zero cross on 50Hz
Increase pulse width to 10
This solved for me the issues with flickering and bad load control.