Closed mathieucarbou closed 11 months ago
Hello again,
I took some measurements this evening (Owon HDS2202S) and it turns out the Robodyn ZCD pulse is really short in duration: still 5V, but really short, like 0.5 ms, compared to the 1.5 ms duration of the pulse of the dedicated ZCD.
I am wondering if there are some issues detecting that in the code ?
Hi Mathieu, which mcu are you using?
Hi Mathieu, which mcu are you using?
ESP32 NodeMCU devkit
This one: https://www.az-delivery.de/en/products/esp32-developmentboard
I've read the Wiki and learned about some ESP32 issues to detect short pulses, I am trying to activate filters now...
I added -D FILTER_INT_PERIOD
and everything works fine with both the Robodyn and the other ZCD module.
Thanks a lot for this library by the way: far better written than most others, and goes deeper in the details 👍
ESP32 NodeMCU devkit
I was supposing it, ESP32 gave quite few troubles, especially when combined with the RobotDyn dimmer. 😅 Glad that you quickly solved it!
Thanks a lot for this library by the way: far better written than most others, and goes deeper in the details 👍
Many thanks!
... And feel free to use the images above if you need, to illustrate your wiki page or put another ZCD module in ref ;-)
That's a good point, in the next days I hope to continue the work with this lib.
Add the reference and the images to the wiki page, thanks again!
8_set_frequency_automatically.ino
My code:
Calling after, each 5 sec:
DimmableLight::getDetectedFrequency()
Returned value is 122.
I have another ZCD module (https://www.pcbway.com/project/shareproject/120_220VAC_Opto_Isolated_Zero_Cross_Detector_Module_for_DIN_Rail_Carrier_Mount_w_57a9f83e.html) and this one works perfectly.
Note: if I set
FILTER_INT_PERIOD
,getDetectedFrequency ()
return 0 for both Robodyn and this ZCD module.