ESP32 machine.PWM

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
marestudio2004
Posts: 16
Joined: Thu Sep 30, 2021 9:45 am

ESP32 machine.PWM

Post by marestudio2004 » Sat Dec 18, 2021 4:52 pm

Hi everyone, I have an ESP32 board for one home project, it is a pellet burner.

Since I use several time functions (for pwm control of the air turbine, for the servo motor that starts the burner valve and for delays in the execution of certain commands ...) I get an error with the servo. I guess the same timer is used for all these functions, and that makes it a problem.

Which timer (there are 4 in esp32 - 0,1,2,3) uses MACHINE.PWM and TIME module by default and is my supposition good?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 machine.PWM

Post by Roberthh » Sat Dec 18, 2021 4:57 pm

The PWM module has been rebuild recently to support more independent channels. Which firmware version do you use?

marestudio2004
Posts: 16
Joined: Thu Sep 30, 2021 9:45 am

Re: ESP32 machine.PWM

Post by marestudio2004 » Sat Dec 18, 2021 10:05 pm

I used esp32-20210902-v1.17.bin

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: ESP32 machine.PWM

Post by mattyt » Sun Dec 19, 2021 3:13 am

As Robert mentioned, PR #7817 added improved support for ESP32 PWM. It was merged on the 21st September (ie after v1.17) so, for now, you'll need to pick up a nightly build.

v1.18 - containing this change - should be released soon!

marestudio2004
Posts: 16
Joined: Thu Sep 30, 2021 9:45 am

Re: ESP32 machine.PWM

Post by marestudio2004 » Sun Dec 19, 2021 12:13 pm

OK, thanks, I will try new vesion!

marestudio2004
Posts: 16
Joined: Thu Sep 30, 2021 9:45 am

Re: ESP32 machine.PWM

Post by marestudio2004 » Sun Dec 19, 2021 12:20 pm

Is there a solution before the implementation of this version?

What's going on with this:

https://github.com/pycom/pycom-micropyt ... x/releases

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 machine.PWM

Post by Roberthh » Sun Dec 19, 2021 12:46 pm

These are firmware versions for Pycom devices, not generic ESP32 devices.

marestudio2004
Posts: 16
Joined: Thu Sep 30, 2021 9:45 am

Re: ESP32 machine.PWM

Post by marestudio2004 » Sun Dec 19, 2021 3:56 pm

That there is a solution?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 machine.PWM

Post by Roberthh » Sun Dec 19, 2021 4:01 pm

Do you have a Pycom module? If no, try the most recent daily build of the firmware.

marestudio2004
Posts: 16
Joined: Thu Sep 30, 2021 9:45 am

Re: ESP32 machine.PWM

Post by marestudio2004 » Sun Dec 19, 2021 10:09 pm

I have esp32-20210902-v1.17.bin.

Post Reply