Replies: 5 comments
-
Wow thanks a lot!! About that (8-bit vs 0-100%) - I first started to use 255 bits and a slider in the app going from 0-255. The problem is that sometimes moving from a position to another was creating some flickering: I do not explain that but using "baby steps" was not creating a smooth brightness (I am saying brightness because I am testing with light bulbs) compared to using 0-100% and consequently have bigger steps. I tested both with the Robodyn (BTA16 and a Random SSR 60DA) and in both case I have sone little flickering at some position I do not have otherwise. I didn't research further as to why. I need to fix first this 550us delay that must be added to correct match the triac firing time with the zero cross. The Please note that these V3 algorithm are the ones used in the Dimmable Light lib where the discussion started ;-) |
Beta Was this translation helpful? Give feedback.
-
When you say:
Yes I agree. |
Beta Was this translation helpful? Give feedback.
-
Adding as references discussions related to this: |
Beta Was this translation helpful? Give feedback.
-
I don't understand your You are probably aware, but the perceived brightness is not linear like the power. If it's related to the slider then maybe the requests are piling-up and are delaying the interrupts handling the dimming. Make sure that the slider's events are throttled by a timer to limit the requests. Use your scope in persistence mode I opened an issue with the library about the usage of IRAM:
Flickering can have multiple causes:
It should be as simple as adding 550 to each value in |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tips! I will have look at all that soon. I was talking about the discrete values used in my case as indexes in the table. I need to fix my algorithm to account for all that, plus do an interpolation between each indexes also. Thanks for the pointers I will have a look at these issues. I saw the one with the IRAM already. Like you said, a lot of things to verify ;-) |
Beta Was this translation helpful? Give feedback.
-
I had a quick look at your LUT.
They are close to the ideal model:
One thing I don't like is that the duty level is only 8 bits.
It's a 7.8 watts step/error for a 2000 watts heating element.
The step would be negligible with a 12bits resolution or over.
The code I use to convert the duty to a phase delay:
The 0% and 100% needs to be handled separately.
The lookup is interpolated without FPU.
The error is under 0.001 compared to the ideal model.
Beta Was this translation helpful? Give feedback.
All reactions