Troubleshooting odd WPM333/TB6560 driver and stepper behaviour

I am working on a y axis splitter circuit, and purchased two new WPM333/TB6560 3A
drivers to test it. Prior to testing the board, I am testing each driver with one stepper at a time. Here are the details of my test setup:

Wiring

Power supply is 24V 5A straight to VCC and GND of driver
I have DIR+ and DIR- coming directly from A axis outputs of Masso G3 controller to CW+ and CLK+ respectively of driver
I have CW- and CLK- of driver to Comm- terminal block (I have a star configuration for GND, Comm-, and VCC+ in my enclosure)
The stepper wires are connected to respective driver inputs A+, A-, B+, B- Stepper motor is 23HS22-2804S - see attached data sheet
I have EN- also to Comm-.

Driver settings

SW1=on
SW2=off
SW3=on
S1=off
This should set current to 2.0A
S2=0n
This should be 20% holding/stop current
S3=on
S4=on
This should set 1/8 step (micro stepping)
S5=off
S6=off
This sets decay setting to 0%

Masso A axis settings

Microstepping to 1/8

The issue

The odd behaviour is that the stepper motor will move on its own without any DIR+ or STEP+ signal generated by the Masso G3. Sometimes the driver’s RUN LED will flicker on when this happens, but usually not.

When I touch the shaft it feels like it is rotating in single steps, other times the rotation is greater and easily seen by the tape ‘flag indicator’ attached to the shaft.

From the TB6560 manual, it looks like I have it set up as ‘common cathode’, which I think is correct for Masso and this driver.
The only thing I did not do is connect the EN- as well to the Comm- as I did the CW-/CLK-, so I am not sure if this is the cause.

The stepper seems to be working, CW and CCW, responds to G0 and G01 MDI commands as well as A+ and A- jogging.
I thought the stepper would run silently, but perhaps this is a function of the micro steps chosen, and the fact that it is running with no load.
I should also mention that my X, Y/B, Z axes are all working as expected (different stepper motors/drivers), and that the A axis was working as expected when it was controlling my tangential knife rotary axis.

I would appreciate any insights as to what is happening and why, and how it may be resolved.

Thank you,

Tom

Hello @TMToronto,

We have checked the manual and your complaint about the WPM333 / TB6560 driver.
The manual is correct, all functions are working.

Maybe a wiring problem in function of the Masso G3. You can take best contact with Masso G3 support

Depending on what you’re describing here “see quote below”, I think it’s a wiring problem, or not all grounds, or EN - / + pins are connected correctly.

the odd behaviour is that the stepper motor will move on its own without any DIR+ or STEP+ signal generated by the Masso G3.>

This can be the result that the EN+ pin is not connected (floating).
Or if EN- and EN+ are disconneted, this means that the Enable pin is always at LOW level and the thriver is enabled.

So check your connections and try this example sketch via Arduino first to check if the WPM333 are working. If this is working correctly, then you can check with Masso G3 or you can contact Masso G3 support.

/*

  @@@@@@@@@@@@@@@@@@@@@@                                                                                                                               

  @@@@@@@@@@@@@@@@@@@@@@             @@@.    @@@    @@@.     @@@@    @@@@        @@@@@@@@@        @@@@@@@@@@@@@.     .@@@@@@@@@@@@@        @@@@@@@@@  

  @@@@@%%@@@%%@@@%%@@@@@             @@@@    @@@    @@@@     @@@@    @@@@       @@@@@@@@@@        @@@@@@@@@@@@@@     @@@@@@@@@@@@@@        @@@@@@@@@  

  @@@@@  @@@  @@@  @@@@@             @@@@    @@@    @@@@     @@@@    @@@@       @@@@   @@@@        @@@@@   @@@@@       @@@@@   @@@@       @@@@   @@@@ 

  @@@@@            @@@@@             @@@@   @@@@    @@@@     @@@@@@@@@@@@       @@@@   @@@@        @@@@@   @@@@@       @@@@@   @@@@       @@@@   @@@@ 

  @@@@@   @    @   @@@@@             @@@@   @@@@    @@@@     @@@@@@@@@@@@       @@@@@@@@@@@        @@@@@   @@@@@       @@@@@   @@@@       @@@@@@@@@@@ 

  @@@@@            @@@@@             @@@@###@@@@@##@@@@@     @@@@    @@@@      @@@@@@@@@@@@       #@@@@@###@@@@@     ##@@@@@###@@@@       @@@@@@@@@@@

  @@@@@@@@@@@@@@@@@@@@@@             @@@@@@@@@@@@@@@@@@@     @@@@    @@@@      @@@@    @@@@@      @@@@@@@@@@@@@@     @@@@@@@@@@@@@@      @@@@     @@@@

  @@@@@@@@@@@@@@@@@@@@@@

  

  This Whadda WPM33 module is stepper motor driver controller.

  The controllor board uses the TB6560AHQ microstepper driver chip from Toshiba.

  It can be used to drive two-phase bipolar stepper motors.

  The Driver is easy to use, and can control large stepper motors like a 3A NEMA23

  Datasheet of TB6560AHQ:                            https://www.velleman.eu/downloads/29/infosheets/tb6560ahq_datasheet.pdf

  Pinout & function descprition of WPM333 / VMA333:  https://www.velleman.eu/downloads/29/infosheets/tb6560_connection.pdf

  The chip has several safety functions built-in like over-current, under-voltage shutdown, and overheating protection. 

  However, it does not have reverse-voltage protection, so make sure that you connect the power supply correctly. 

  You can find more specifications in the table below.

  

  This example code allows you to control a stepper motor with Arduino and without a library. 

  For more information about the Whadda Stepper controller board, consult the manual at the WPM333 product page on: 

  https://whadda.com/product/tb6560-3a-stepper-motor-driver-board-wpm333/ 

  Specifications:

  ------

  Operating voltage:    10 – 35 VDC, 24 VDC recommended

  Max output current:   3 A per phase, 3.5 A peak

  Microstep resolution: full, 1/2, 1/8 and 1/16

  Protection: Low-voltage shutdown, overheating and over-current protection

  Pin connections:

  ***************

  VCC     10-35V  (24 VDC recommended)

  GND     Power supply ground

  EN-     Arduino GND

  EN+     Arduino PIN 8 

  CW-     Arduino GND

  CW+     Arduino PIN 2

  CLK-    Arduino GND

  CLK+    Arduino Pin 5

  A- | A+ Coil 1 Stepper motor

  B- | B+ Coil 2 Stepper motor 

  Note:

  -----

  If the Enable pins (EN- and EN+) are disconnected. 

  This means that the enable pin is always LOW and the driver is always enabled.

  

  Current Settings in function of stepper motor:

  ----------------------------------------------

  You can adjust the current that goes to the motor when it is running by setting the dip switches SW1, SW2, SW3, and S1 ==> on or off.

  

  It's recommended to start with a current level of 1 A. If your motor is missing steps or stalling,

  you can always increase the current level later.  Or check the datasheet of stepper motor you are using.

  To set the switches in function of the current, see the "Runninf Current" table, metioned in this PDF sheet:

  https://www.velleman.eu/downloads/29/infosheets/tb6560_connection.pdf 

 */

// defines pins numbers

#define dirPin  2      // CW+

#define stepPin 5     // CLK+

#define enPin   8    // EN+

// define the steps per revolution

#define stepsPerRevolution 2000

void setup() {

  

  pinMode(stepPin, OUTPUT);

  pinMode(dirPin, OUTPUT);

  pinMode(enPin,OUTPUT);

  digitalWrite(enPin,LOW);  // Enable the Driver

  

}

void loop() {

  // Set the spinning direction clockwise:

  digitalWrite(dirPin, HIGH);

  // Spin the stepper motor 1 revolution slowly:

  for (int i = 0; i < stepsPerRevolution; i++) {

    // These four lines result in 1 step:

    digitalWrite(stepPin, HIGH);

    delayMicroseconds(2000);

    digitalWrite(stepPin, LOW);

    delayMicroseconds(2000);

  }

  delay(1000);

  // Set the spinning direction counterclockwise:

  digitalWrite(dirPin, LOW);

  // Spin the stepper motor 1 revolution quickly:

  for (int i = 0; i < stepsPerRevolution; i++) {

    // These four lines result in 1 step:

    digitalWrite(stepPin, HIGH);

    delayMicroseconds(1000);

    digitalWrite(stepPin, LOW);

    delayMicroseconds(1000);

  }

  delay(1000);

  // Set the spinning direction clockwise:

  digitalWrite(dirPin, HIGH);

  // Spin the stepper motor 5 revolutions fast:

  for (int i = 0; i < 5 * stepsPerRevolution; i++) {

    // These four lines result in 1 step:

    digitalWrite(stepPin, HIGH);

    delayMicroseconds(500);

    digitalWrite(stepPin, LOW);

    delayMicroseconds(500);

  }

  delay(1000);

  // Set the spinning direction counterclockwise:

  digitalWrite(dirPin, LOW);

  // Spin the stepper motor 5 revolutions fast:

  for (int i = 0; i < 5 * stepsPerRevolution; i++) {

    // These four lines result in 1 step:

    digitalWrite(stepPin, HIGH);

    delayMicroseconds(500);

    digitalWrite(stepPin, LOW);

    delayMicroseconds(500);

  }

  delay(1000);

}

Hope this will help you further,

Best Regards,
Velleman Technical Support


Thank you for your reply and my apologies for the delayed response - I was unable to do further testing until now.
I have attached a picture of the driver module showing my wiring. Unfortunately I am still experiencing the same issue where the stepper motor turns on its own in a CW direction. It makes a clicking/grinding sound when it does so, and advances very slowly - almost like a step or two every second or so.

It made no difference whether the EN+/EN- pins were connected or not, either both to comm-, none, or just EN-.

The PSU connected to the driver is 24 VDC. The blue and yellow wires are DIR+ and STEP+ respectively, coming directly from my Masso G3 A axis outputs.

MDI commands from the controller operate the motor in both CW and CCW directions. Steps per revolution are set to 3200 for the axis.

Multimeter readings (with comm- probe to star comm-) when the MDI signals a CW rotation show DIR at +3.53 VDC and STEP at +2.68 VDC. During CCW rotation the DIR reads +0.1 VDC and STEP +2.68 VDC. The pos probe was at the CL+ and CLK+ screw connector for these tests.

I hope this will help shed some light as to where the issue may lie. This odd behaviour was the same for the second driver module, and for a second identical motor.

Any insights others can provide is appreciated.

Thank you,

Tom

I think I found the issue by more thoughtfully examining my test setup wiring.
I was not thinking ground loop, as I worked very hard to avoid them when designing and building my control enclosure. However, I clearly did not when setting up my temporary test circuit for my y axis splitter.

I used a star configuration for all AC/DC circuits in my panel, but made the following mistake in my test set up:

I had 24VDC VCC+/Comm- going into a temporary DIN rail terminal block setup. The VCC+/Comm- then split from there to feed the two driver modules.
BUT, because I needed 5VDC for my y axis splitter board, I had run a second set of 5VDC VCC+/Comm- wires from the panel into a different set of terminal blocks. It was into these Comm- that I connected the CW-, CLK-, and EN- of the two drivers.

I think that was the problem, because when I now tied all the Comm- connections together in one set of terminal blocks, and had only one Comm- wire going back to my star Comm- in the panel, the random clicking/movement of the stepper motor stopped.