Hello,
I have a question. I'm planning a project that requires up to 12 stepper motor drivers
I plan to use Klipper as the firmware. Klipper's configuration file can remap the MCU's pins, allowing the use of unused pins on the controller board, which typically doesn't support 12 stepper motors.
As I understand it, only `step_pin` and `en_pin` are needed to control the stepper motor drivers. My question is, does `step_pin` have to be a special pin (e.g., a hardware PWM pin)?
I tried looking at the port mappings for the RADDS expansion board and the Arduino Due, but couldn't find any common ground.
Thank you for your help.
Which pin should be used for the MCU's stepper signal?
Re: Which pin should be used for the MCU's stepper signal?
Hi,
Can you post more details about your project? Are you going to use the ESP32?
Assuming you're using ESP-IDF, you can use the RMT pripheral for the step pin. Depending on the ESP32 you're going to use, you need to check the RMT peripheral and how many channels are available on the series you will use.
However, for 12 motors, I'm afraid you will need another solution due to the number of pins required. Please check is the driver you're going to use have any other interface.
Here is one example you can follow.
You might also need the direction pin.
Can you post more details about your project? Are you going to use the ESP32?
Assuming you're using ESP-IDF, you can use the RMT pripheral for the step pin. Depending on the ESP32 you're going to use, you need to check the RMT peripheral and how many channels are available on the series you will use.
However, for 12 motors, I'm afraid you will need another solution due to the number of pins required. Please check is the driver you're going to use have any other interface.
Here is one example you can follow.
You might also need the direction pin.
-
MicroController
- Posts: 2661
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Which pin should be used for the MCU's stepper signal?
Usually, each motor driver is controlled via two signals, "step" and "direction". One doesn't usually actually need to control multiple stepper motors at the exact same time; a few microseconds of difference between the motors won't be detectable anyway. Thus, you can save on pins by using the same "direction" signal for all drivers plus one "step" signal per driver. For 12 drivers, that's 1+12 pins needed.I'm planning a project that requires up to 12 stepper motor drivers
...
As I understand it, only `step_pin` and `en_pin` are needed to control the stepper motor drivers. My question is, does `step_pin` have to be a special pin (e.g., a hardware PWM pin)?
Also, you likely don't want to drive the individual motors at several (tens of) thousands of steps per second, so generating the "step" pulses in software should be entirely feasible, in which case you're not limited to any number of "channels" a hardware peripheral like the RMT may support.
Who is online
Users browsing this forum: Bing [Bot], YisouSpider and 15 guests
