I’ve seen a number of comments recently about strange dimming issues with the new trailing edge update in FW 2.14, so I broke out my oscilloscope to look at the waveforms. There is definitely a limitation with the trailing edge dimming implementation in the latest firmware.
(EDIT: the asymmetric trailing-edge dimming waveform seen here is apparently deliberate, and is necessary due to limitations in the current switch hardware - see discussion below this post)
My test setup is a single switch powering a 50W incandescent bulb (a purely resistive load that won’t distort the output waveforms). The switch is on the latest 2.14 firmware. Neutral is connected to the switch. I’m using Home Assistant with zigbee2mqtt for configuration.
Here is what the output looks like at 100% brightness in trailing edge mode:
The waveform is very asymmetric - the bottom half looks fine, but the top half is cut off at about 70% of max.
Here is a video of the waveform, as the switch ramps from off to 100% and back down:
It behaves correctly up until about 70% brightness, then the top half stops growing. This is wrong - the top half should behave identically to the bottom.
Not all bulbs seem to be bothered by the weird trailing edge waveform. Incandescents will always be dimmer. My test bulbs (Satco S29431) don’t seem to mind, and still reach 100% brightness (measured with a lux meter). But I could definitely imagine that other LED bulbs would be confused by this waveform (at best, they might just be dimmer - at worst, they might flicker badly).
This bug likely also explains the reports of switch failures when powering non-approved magnetic ballasts with FW 2.14. This waveform is doubly bad with transformers - the asymmetric nature of it may cause saturation of the transformer core, resulting in higher current draw - and the abrupt cutting of current in the top half of the waveform could result in large voltage spikes.
And one more minor observation: the bottom half of the waveform never reaches 100% either (it is still cut off a little). With a neutral connection, I’d expect a dimmer to go to full 100% duty cycle. I’m not sure how many bulbs will actually care about this (my Satcos don’t care), but I imagine at least a few won’t be able to reach true 100% brightness with this slightly truncated waveform.
For comparison, here is what it looks like in leading edge mode (forced by setting the switchType to “3-Way Dumb Switch”):
These leading edge waveforms look fine - exactly what I’d expect from a non-neutral dimmer.
I also tested the full sine wave mode, and it does indeed produce a genuine 100% duty cycle sine wave:
Surprisingly, you don’t get this full sine output in the switch’s default config. You have to set both outputMode = “On/Off” and switchType = “Single-Pole Full Sine Wave”. If you leave switchType at “Single Pole”, you’ll get the buggy trailing edge waveform. It would be better if the switch produced a full sine wave whenever possible. I’m not sure there is any reason to actually have a separate full sine wave mode - it should just be implicit when switchType = “Single Pole” and outputMode = “On/Off” and you have a neutral.
Here’s my list of recommended changes based on this testing:
- fix the top half of the trailing edge waveform (most important)
- make the switch go into true sine wave mode by default - so even if people do use it with a non-approved load, it stands a higher chance of working reliably
- add an explicit option for selecting between trailing and leading edge dimming, so people can select the best mode for their specific bulbs (relying on the 3-way mode to force leading edge is a bit of a hack, and has the downside of producing relay click noises)
- if possible, improve the trailing edge mode so that it can actually reach 100% duty cycle (i.e. the output should look identical to the full sine wave mode when set to 100% brightness)