Shop OBEX P1 Docs P2 Docs Learn Events
Stepper Motor Control - Different approaches using TB6600 Stepper Motor Controller — Parallax Forums

Stepper Motor Control - Different approaches using TB6600 Stepper Motor Controller

I'm trying to teach myself stepper motor control and need some input. The TB6600 controller accepts a pulse stream as input while taking care of micro-stepping, current limiting, etc. I'm experimenting the different methods to generate the pulse stream from a Propeller activity board programming with BlocklyProp.

I started experimenting with a loop containing makepin blocks with pause statements to create a pulse stream. That was unsuccessful as the pause values are in milliseconds and the controller expects micro seconds.

I then experimented with a simple loop using pulse-out blocks to generate the pulse string. Using that approach, I can control the motor speed and direction and send a fixed number of steps to control the rotational position.

My next thought is to try the PWM blocks sending 50% duty cycle pulses.

Ultimately, what I want is a stepper motor control library that allows me to specify motor enable/disable, motor speed, motor direction, steps or displacement in degrees, and acceleration/deceleration. I've seen references to arduino based libraries with this functionality. Is there anything available for the Propeller? Is it worth it to convert the arduino library? Anyone got any better ideas for generating the pulse stream? Is there a better approach than using the TB6600?


  • Most of these libraries are written in C code. I have been working with the A4988 but the TB6600 should work as well.

    I have been working with a SCARA robot that requires a set number of pulses to position the arms.

    So what you need is a library that takes a set number of pulses that will result in a movement of the motor.

    The library that I wrote takes into account that the motor needs to accelerate up to speed and then down to provide smooth operation and not skip steps in the process. Torqueing the motor too fast will cause it to skip step.

Sign In or Register to comment.