Page 1 of 1

12 PWM channels

Posted: Thu Aug 01, 2024 10:10 pm
by EspAndrew
I have an existing product design with 3 LEDs and 8 servos, all with independent PWM channels, based on the ESP32-WROOM -1 Devkit. I need 1 more PWM channel for a fan, and more IO lines for other things, making a total of 36 I/O lines. The ESP32-S3-WROOM-1 looks ideal, but I am having trouble modifying my existing code to work. It complains that there are not enough PWM channels. The ESP32-S3 datasheet says it only has 8 PWM channels, but it does have enough I/O lines.
Is there a better choice of processor, or must I limit the number of I/O lines if I want 12 PWM channels?

Re: 12 PWM channels

Posted: Fri Aug 02, 2024 5:25 am
by ESP_Sprite
You could potentially use MCPWM for some more PWM channels.

Re: 12 PWM channels

Posted: Fri Aug 02, 2024 7:31 am
by EspAndrew
The ESP32-S3 datasheet shows among other bits:
• 45 × programmable GPIOs
• Digital interfaces:

LED PWM controller, up to 8 channels

2 × MCPWM
That makes a total of 10 PWM channels, whereas I need 12.
Which version of the ESP32 has at least 12 PWM channels?

Re: 12 PWM channels

Posted: Fri Aug 02, 2024 12:53 pm
by username
you could use a MCP23017 I/O Expander via I2c to get more I/O pins.

https://www.digikey.com/en/products/det ... -SS/964185

Re: 12 PWM channels

Posted: Fri Aug 02, 2024 1:23 pm
by MicroController
Recently saw PCA9685 "shields" pop up in stores: 16 I2C-controlled, 12-bit PWM channels at 40-1000Hz.

Re: 12 PWM channels

Posted: Sat Aug 03, 2024 1:02 am
by ESP_Sprite
One MCPWM contains two PWM channels, if memory serves, so you would have 12 in total.