From d281e59f3a317019dbf41d742458c4e42f3b3800 Mon Sep 17 00:00:00 2001 From: Guillermo Ruffino Date: Wed, 15 Sep 2021 08:40:52 -0300 Subject: [PATCH] ac_dimmer increase gate time for robotdyn (#1708) * ac_dimmer increate gate time for robotdyn * add explanation on longer gate enable time --- esphome/components/ac_dimmer/ac_dimmer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esphome/components/ac_dimmer/ac_dimmer.cpp b/esphome/components/ac_dimmer/ac_dimmer.cpp index 9a71f0e224..e86703bfe1 100644 --- a/esphome/components/ac_dimmer/ac_dimmer.cpp +++ b/esphome/components/ac_dimmer/ac_dimmer.cpp @@ -17,7 +17,10 @@ static AcDimmerDataStore *all_dimmers[32]; // NOLINT(cppcoreguidelines-avoid-no /// Time in microseconds the gate should be held high /// 10µs should be long enough for most triacs /// For reference: BT136 datasheet says 2µs nominal (page 7) -static const uint32_t GATE_ENABLE_TIME = 10; +/// However other factors like gate driver propagation time +/// are also considered and a really low value is not important +/// See also: https://github.com/esphome/issues/issues/1632 +static const uint32_t GATE_ENABLE_TIME = 50; /// Function called from timer interrupt /// Input is current time in microseconds (micros())