pwm a stepper motor

  • would it be possible to use the pwm fan output to control a stepper motor with something like a L298N module? the thing is, i do not plan to use arduino to control it. i was hoping to send the PWM signal from the pwn output to the module to have position control of the stepper motor. reason why i want to do this is because i can find stepper motors with a much smaller physical size with all metal gears compared to a RC servo.

    or would a DC servo motor be just as accurate?

  • @tekstyle PWM mean pulse width modulation and means, the signal is rectangular: the plus signal says how much percentage the signal has. If plus has 70% and 0 signal has 30% of the time, you get 70 % position for a servo e.g.

    But this is different from how a stepper works: a stepper is controlled by a stepper driver which expects step signals, this are also rectangular signal, but they have the same length each. The signal ist not the length of the signal, but the number of the plus signals (thousands every second). So to use Duet with an external driver stepper, you need to use the connections which are meant for this at the break out pins (50 pins, E4_STEP eg). Or easier, use the Duet Expansion Header Breakout which has some extra chips to supply a good signal. Some of the Pololu chips are programmed through SPI, which would make the thing complicated, but I think at L298N the current is controlled by a trimmer. You should consider buying the Duex 2 for 2 stepper drivers or Duex 5 for 5, because it has the advantage of being integrated into the firmware (statistics M122 eg) very good.

  • @JoergS5 i have the duex5. which pin would i use? i am already using all 10 motor ports

  • @tekstyle I also have a Duex5, but I am not an expert yet 😉 no time yet. If I remember well, the Duex has 2 additional stepper connection in reserve.

    Please check:
    for steppers 11 and 12.

    In the documentation the TMC2130 is documented, I think this would be a very good driver and preferable to the L298N, if the current is sufficient it provides.

Log in to reply