12 PWM channels

EspAndrew
Posts: 3
Joined: Thu Aug 01, 2024 9:56 pm

12 PWM channels

Postby EspAndrew » Thu Aug 01, 2024 10:10 pm

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?

ESP_Sprite
Posts: 9773
Joined: Thu Nov 26, 2015 4:08 am

Re: 12 PWM channels

Postby ESP_Sprite » Fri Aug 02, 2024 5:25 am

You could potentially use MCPWM for some more PWM channels.

EspAndrew
Posts: 3
Joined: Thu Aug 01, 2024 9:56 pm

Re: 12 PWM channels

Postby EspAndrew » Fri Aug 02, 2024 7:31 am

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?

username
Posts: 542
Joined: Thu May 03, 2018 1:18 pm

Re: 12 PWM channels

Postby username » Fri Aug 02, 2024 12:53 pm

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

MicroController
Posts: 1756
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: 12 PWM channels

Postby MicroController » Fri Aug 02, 2024 1:23 pm

Recently saw PCA9685 "shields" pop up in stores: 16 I2C-controlled, 12-bit PWM channels at 40-1000Hz.

ESP_Sprite
Posts: 9773
Joined: Thu Nov 26, 2015 4:08 am

Re: 12 PWM channels

Postby ESP_Sprite » Sat Aug 03, 2024 1:02 am

One MCPWM contains two PWM channels, if memory serves, so you would have 12 in total.

Who is online

Users browsing this forum: No registered users and 73 guests