PWM Frequency Below 1Hz - RNT Lab
Maybe your like
- Skip to main content
- Skip to primary sidebar
Hi Rui & Sara, I am trying to control my solid state relay using PWM, such that the relay stays ON for 5sec and OFF for 1sec but it seems that ESP32 LEDC function doesn’t allow for frequency below 1Hz. I have tried using millis() to time the ON and OFF, but that is not as accurate as using PWM. any idea?
Question Tags: PWM 6 Answers 0 Vote Up Vote Down Best AnswerHave you looked into using hardware timers with interrupt?
0 Vote Up Vote DownHi. I think this discussion answers your question: https://forum.arduino.cc/t/esp32-what-is-the-minimum-pwm-frequency/671077/4 Regards, Sara
0 Vote Up Vote DownTried that already before I posted my question here. Not working either.
0 Vote Up Vote DownHave you tried using delay() to control the relay on and off for a determined number of seconds? In some scenarios, you can use delay() if it doesn’t compromise the rest of the code. Regards, Sara
0 Vote Up Vote DownHi. Delay() is blocking function, just to many limitation by using it. Using millis() is much better approach, but that does not solve my problem either. Anyway, based on my experimentation, frequency below 1Hz is possible by setting the resolution to 16-bit. Testing it now. hopefully this is the solution to my problem
0 Vote Up Vote DownThanks Steve Mercer for the info and link. Could be a solution to my problem also. Appreciate it.
Primary Sidebar
Login to Ask or Answer Questions
This Forum is private and it’s only available for members enrolled in our Courses. Login »
Latest Course Updates
- [eBook Updated] Smart Home with Raspberry Pi, ESP32, and ESP8266 Version 1.7 November 28, 2025
- [eBook Updated] Smart Home with Raspberry Pi, ESP32, and ESP8266 V1.6 September 9, 2025
You must be logged in to view this content.
Insert/edit link CloseEnter the destination URL
URL Link Text Open link in a new tabOr link to existing content
Search No search term specified. Showing recent items. Search or use up and down arrow keys to select an item. CancelTag » Arduino Pwm Frequency 1hz
-
How To Set PWM Frequency To 1 Hz On An UNO - Arduino Forum
-
Simple PWM Frequency Sweep From 1Hz To 4MHZ - I´m Stuck In Nano ...
-
PWM At Low Frequencies (.12 Hz-10 Hz) - Science And Measurement
-
Help With Writing To Registers For 1Hz Pwm And Timer Interrupt
-
1Hz PWM - Interfacing - Arduino Forum
-
VERIABLE FREQUENCY 1HZ-500HZ - Arduino Forum
-
Pwm - Is It Possible To Obtain %0.05 Duty Cycle At 1hz In Arduino?(a ...
-
PWM Frequency Generator Signal Module From 1Hz To 150Khz Dc 3.3 ...
-
Arduino 1Hz-150KHz Adjustable PWM Frequency & Duty Cycle ...
-
1Hz-150Khz 3.3V-30V Signal Generator PWM Pulse ... - Arduino Tech
-
For Arduino Signal Generator PWM Pulse Frequency Duty Cycle ...
-
PWM Signal Generator Of Adjustable Frequency Generator 1Hz-153-30V
-
Lsisoft/arduino_frequency_generator_bluetooth: Arduino Frequency ...
-
LED Digital PWM Pulse Frequency 1HZ~100KHZ