Why esp32s3 only supports 4 steppers? #211
-
According to this section of the documentation, esp32s3 can only support 4 steppers using step/dir/en pin control. Whilst a esp32 can support 14 steppers at a time. Why is that? What's the limiting factor? From my understanding, ESP32s3 has 2 pcpwm unit, each has 3 channels, so, shouldn't it be able to control 6 steppers independently? Or is some of the channel preoccupied? I am going to use an esp32s3-devkit-c for a project that involves atleast 6 steppers, controlled by step/dir/en pins, will this library work for the above hardware configuration? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
FastAccelStepper uses for esp32 derivates either rmt-module or a combo of pcpwm/pcnt-modules, In case of esp32s3 the limiting factor is not the 2 mcpwm-modules a 3 channels, but the pcnt-module with only four counters. As mentioned in the Readme, there are chances, that the four rmt-TX channels can be supported, too. This would ramp up the number of supported steppers for esp32s3 to 8. Fron the overview the best chip is esp32 for stepper applications. |
Beta Was this translation helpful? Give feedback.
-
As mentioned before, esp32s3 and esp32c3 has similar rmt module (with different num of channels), if i want to try implementing the 4+4 stepper setup for esp32s3, i plan to modify the following parts of the code
Just want to know if i am completely off or not, before i fork and modify the code. Please point me at the right direction. i have the hardware to test the code, and i will PR the code if it works. (Big if) Most of my time of arduino coding, i have lived under the protection of the arduino framework, basically never directly touched peripherals before. Now that i have a project that invovles 6 steppers, limit switchers and magnetic encoder with 1 esp32s3 (only esp32s3 has enough pins), i have no choice but to probably fork this library and modify it. (its a 6-axis robotic arm.) Thank you for your time and guidence. |
Beta Was this translation helpful? Give feedback.
-
Hello, good news, i am able to get the rmt modules to work as a pulse generator for the steppers. I am still trying to understand the code, if possible, can you explain what does the (Edited after 36 minutes) |
Beta Was this translation helpful? Give feedback.
-
Sure, i can do a PR. Btw, thank you for the explanation. |
Beta Was this translation helpful? Give feedback.
-
as the pr has been merged, the discussion can be closed |
Beta Was this translation helpful? Give feedback.
FastAccelStepper could support 4+4 steppers with esp32s3, if implementation is done. Currently only 4.
In more general terms: The hw can support using mcpwm/pcnt and rmt-modules in total 8 high speed pulse generators. So it is able to drive 8 steppers simultaneously. With dynamic allocation of pulse generators to steppers, there would be no limit on the number of supported steppers (except RAM). I had this dynamic scheme in mind from the beginning, but never completed this. I assume most applications need the steppers simultaneously.