Hi. I’m wondering if it’s possible to do 60 Hz AC mains phase control (i.e. incandescent light dimming) using the T3.x FlexTimer Module (FTM) without direct software intervention at the per-cycle time scale.
I’ve scanned the FTM section in the datasheet and see that it has lots of different modes that I’ll go back and study in detail. But, if someone can say for certain that it CAN’T do what I’m proposing, then I’ll save the effort for now.
My basic idea is to start the FTM counting (from 0) when the AC cycle zero crossing is detected. The match value (CnV) and terminal count (MOD) will have already been set up by software based on the amount of dimming desired. When the FTM counter reaches CnV, an output pulse will be begun to trigger the triac’s gate at the desired phase of the AC cycle. Shortly thereafter, MOD count will be reached, and the timer will overflow. This will terminate the output pulse so that the triac’s gate is not asserted for when the current half cycle ends.
Key to this idea is being able to sync the start of FTM counting to the AC cycle zero crossing and to ensure that counting does not start again after overflow until the next crossing occurs.
As an alternative, I’m wonder if I could sync one of the PWM modes to the AC cycle zero crossing and adjust the PWM output characteristics to get the same behavior.
So, does anyone know for sure that this is not possible?
Thanks.
I’ve scanned the FTM section in the datasheet and see that it has lots of different modes that I’ll go back and study in detail. But, if someone can say for certain that it CAN’T do what I’m proposing, then I’ll save the effort for now.
My basic idea is to start the FTM counting (from 0) when the AC cycle zero crossing is detected. The match value (CnV) and terminal count (MOD) will have already been set up by software based on the amount of dimming desired. When the FTM counter reaches CnV, an output pulse will be begun to trigger the triac’s gate at the desired phase of the AC cycle. Shortly thereafter, MOD count will be reached, and the timer will overflow. This will terminate the output pulse so that the triac’s gate is not asserted for when the current half cycle ends.
Key to this idea is being able to sync the start of FTM counting to the AC cycle zero crossing and to ensure that counting does not start again after overflow until the next crossing occurs.
As an alternative, I’m wonder if I could sync one of the PWM modes to the AC cycle zero crossing and adjust the PWM output characteristics to get the same behavior.
So, does anyone know for sure that this is not possible?
Thanks.