PWM frequency esp32

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

PWM frequency esp32

#1 Post by dr.zorg82 » 20 Jan 2024, 09:37

Good afternoon. I have a simple simple question that doesn't require a long discussion. Since I couldn’t find a topic where I could ask such questions, I decided to create one.
here is my question: what is the maximum PWM frequency that the esp32 can provide? Is it possible to use esp32 with espeasy to operate an induction cooker?
Last edited by dr.zorg82 on 20 Jan 2024, 13:17, edited 1 time in total.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: simple questions

#2 Post by chromo23 » 20 Jan 2024, 10:17

The simple answer can be found in the wonderful documentation of ESPEasy:
https://espeasy.readthedocs.io/en/lates ... ernal-gpio
Frequency (in Hz) will be set to 1000 Hz when not given. Frequencies above 30 kHz are not stable and will likely crash the ESP.
Edit:
dr.zorg82 wrote: 20 Jan 2024, 09:37 Is it possible to use esp32 with espeasy to operate an induction cooker?
Probably yes...

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: simple questions

#3 Post by TD-er » 20 Jan 2024, 11:35

That 30 kHz limit was from the ESP8266 age, which dpes it all in software.
The ESP32 does use hardware operated PWM which is much more capable.
It can do higher frequencies, but as always it will reduce the granuality of how many steps you can make between 0 and 100%.

N.B. there is very likely a difference between "LittleFS" builds and "SPIFFS" builds as recently the LittleFS builds are using ESP-IDF5.1 code which does things a bit different. (actually quite a lot different....)

User avatar
Ath
Normal user
Posts: 3522
Joined: 10 Jun 2018, 12:06
Location: NL

Re: simple questions

#4 Post by Ath » 20 Jan 2024, 12:08

dr.zorg82 wrote: 20 Jan 2024, 09:37 I have a simple simple question
What makes it less simple is that the subject doesn't have a subject: When including some of the key terms of your question in the subject, it is much (ESP)easier to recognize it later ;)
dr.zorg82 wrote: 20 Jan 2024, 09:37 Since I couldn’t find a topic where I could ask such questions, I decided to create one.
For new questions, please start a new thread/topic, as 'piggy-backing' on other questions just makes it impossible to find it when trying to continue a thread.
/Ton (PayPal.me)

dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

Re: PWM frequency esp32

#5 Post by dr.zorg82 » 20 Jan 2024, 13:22

ок. Thank you. The question is related to the fact that I have an induction cooker, but its power adjustment has a wide step (1000-1300-1500-1800-2100-2500-3000-3500) and I want to make a smoother power adjustment. I'm wondering whether it will work or not

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: PWM frequency esp32

#6 Post by TD-er » 20 Jan 2024, 15:48

What frequency does the current controller of the induction heater currently use?
Does it also the same frequency for all steps?
When using a pan which isn't the optimal size, or positioned slightly off-center, I can hear the induction coils, so it probably isn't running at several 10's of kHz.
Or is it some mechanical resonance frequency I'm hearing and does the induction heater actually use much higher frequencies?

dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

Re: PWM frequency esp32

#7 Post by dr.zorg82 » 20 Jan 2024, 21:03

I haven’t taken frequency measurements on my induction cooker yet. but there is a desire to buy an inexpensive induction cooker and do experiments on it, and if the experiment is successful, then modify my cooker.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: PWM frequency esp32

#8 Post by chromo23 » 21 Jan 2024, 00:30

dr.zorg82 wrote: 20 Jan 2024, 21:03 I haven’t taken frequency measurements on my induction cooker yet. but there is a desire to buy an inexpensive induction cooker and do experiments on it, and if the experiment is successful, then modify my cooker.
As far as i understand you´ll also need a form of feedback? If so i guess a ESPEasy only solution is out of the question since the analog input would be too slow (@TDer correct me if i am wrong).
Here is a very simple project with an Arduino Uno:
https://www.electronicsdna.com/simple-q ... duino-uno/
Used frequency there is 17Khz.

But is this exactly what you want? Somehow i think you only look for a way to control the excising circuitry.
dr.zorg82 wrote: 20 Jan 2024, 13:22 but its power adjustment has a wide step (1000-1300-1500-1800-2100-2500-3000-3500)
What do these values mean?

dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

Re: PWM frequency esp32

#9 Post by dr.zorg82 » 21 Jan 2024, 06:55

chromo23 wrote: 21 Jan 2024, 00:30 What do these values mean?
These are power values in watts. The induction cooker operates at these values. but I need smooth power control. for example, I want to get a power of 2250 watts or 1920 watts. that is, I need to expand the adjustment range.

dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

Re: PWM frequency esp32

#10 Post by dr.zorg82 » 21 Jan 2024, 07:00

chromo23 wrote: 21 Jan 2024, 00:30 As far as i understand you´ll also need a form of feedback?
Is this feedback to maintain a given power? if so, it would be desirable, but i can do without it.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: PWM frequency esp32

#11 Post by TD-er » 21 Jan 2024, 13:25

I think what he meant is that you likely also need some feedback loop to keep the oscillation stable.
I don't know how exactly those induction cooking heaters work, but I can imagine that the coil will have some resonance frequency which will be changed when placing a pan on it.
Exactly like how a metal detector operates.
And you also need to stop feeding large currents when the pan is no longer present or misplaced or else your induction plate will get damages.

Like I said, I have no clue how they actually operate, just thinking out loud.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: PWM frequency esp32

#12 Post by chromo23 » 21 Jan 2024, 13:33

TD-er wrote: 21 Jan 2024, 13:25 Like I said, I have no clue how they actually operate, just thinking out loud.
Same here :)

dr.zorg82 wrote: 21 Jan 2024, 06:55 The induction cooker operates at these values. but I need smooth power control. for example, I want to get a power of 2250 watts or 1920 watts. that is, I need to expand the adjustment range.
Regarding that i might be worth to investigate how the signal of the powerlevel selector is read and maybe piggyback on that with a microcontroller rather than invent the wheel new and building a hole new circutry...
Last edited by chromo23 on 21 Jan 2024, 13:50, edited 1 time in total.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: PWM frequency esp32

#13 Post by TD-er » 21 Jan 2024, 13:43

Yep this sounds like a project with high failure rate with severe consequences.

Maybe using a variac is easier?
But I have no clue what high frequency switching will do to a transformer like being used in a variac.
It may introduce seriously high voltages due to interrupting current in a transformer coil.

dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

Re: PWM frequency esp32

#14 Post by dr.zorg82 » 22 Jan 2024, 06:30

thanks for support. I think that a variac is not suitable for these purposes, and power adjustment is performed using a microcontroller using control buttons. Therefore, in order to change the adjustment step, I need to change the microcontroller firmware, and I’m unlikely to succeed. first I need to take the frequency readings from my induction cooker and then make a decision. but as usual there is not enough time to pursue my hobby. :)

dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

Re: PWM frequency esp32

#15 Post by dr.zorg82 » 24 Jan 2024, 08:13

I read about the principle of operation of an induction cooker and concluded that not everything is so simple. and adjust frequency, voltage and duty cycle. All this can be done, but in my case the result is not worth the effort. I decided to do without the ESP, and just install a variable resistor and this adjustment should be enough for me.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: PWM frequency esp32

#16 Post by TD-er » 24 Jan 2024, 09:02

Hmm where is this variable resistor being placed?

If it is just in the low voltage controller circuit, then I guess it's probably not really dangerous.
But maybe best to use one with plastic to the outside as it is probably not isolated from mains.

If it is in the high voltage circuit, then please reconsider as it is likely at least a fire hazard or it may not work at all as it may interfere with the sensing part to see if there's a pan placed on top of the induction coil.

dr.zorg82
Normal user
Posts: 81
Joined: 02 Feb 2023, 07:32
Location: russia

Re: PWM frequency esp32

#17 Post by dr.zorg82 » 24 Jan 2024, 11:56

There is a 500 ohm trim resistor on the motherboard. it is replaced with a variable resistor and installed on the panel of the induction cooker. the resistor is set to low voltage. with its help I can smoothly adjust the power at each stage, that is, at the 2500 watt stage can regulate from (approximately) 2600 to 2000 watts.

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests