Help - NEMA 23 stepper motor works fine for a few hours, then stalls and grinds

Hello everyone - I am trying to figure out an odd issue with my NEMA 23 motor. I am using an Arduino Mega to control a NEMA 23 stepper motor (https://s3.us-east-2.amazonaws.com/stepper-motor-driver/TB6600/MYSWEETY+TB6600+Stepper+Motor.pdf) which in turn is driving a linear translocation stage (Optics Focus MOX-06-400). I am using Python to run the driver/stage - code at the end of this post.

Essentially all I need the driver to do is move the stage one "block", which is a predetermined distance. What has been happening lately is, I would run the code and the driver+stage would work perfectly fine (moves quickly and is generally responsive) for a limited time, anywhere from 30 minutes to 2-3 hours of almost-continuous but light use (I have it move maybe 20-30 blocks per hour). Then, suddenly, the motor begins to grind significantly, slowing down the stage movement to a crawl. The manual knob of the motor, when powered in this state, seems to be grinding and clicking against something. There is no predicting of this behavior as it seems completely random. The issue will then resolve itself randomly as well, as operating the motor in this broken grinding state for another 30 mins to an hour will "reset" the motor and then it begins moving fine again, until the next time the motor inevitably grinds.

I have tried all of the following to attempt to resolve this; none of these steps work:

  1. Switched power supplies for the driver from 9V, 12V, or 24V
  2. Restarted my computer
  3. Unplugged the NEMA motor, then plugged it back in, with or without manual adjustment of the knob
  4. Checked all connections on the motor
  5. Checked the code (I am a novice at Python but at first glance, it looks fine to me)

Any help on this issue is greatly appreciated. Let me know if additional information is required.
Thank you!

Here is the control code:

import serial
import time
from serial.tools.list_ports import comports
from pyfirmata import ArduinoMega
 
for comport in comports():
	SN = comport.serial_number
	if SN == '55739323637351517151':
		board_port = comport.device 
 
# Create the Serial port for ArduinoMega board
board = ArduinoMega(board_port) 
# Wait for 2 seconds for the communication to get established
time.sleep(2) 
 
PinDir = board.get_pin('d:7:o') # output digital pin
PinStep = board.get_pin('d:8:o') # output digital pin
 
pulseWidthSec = 1/1000000000.0 # unit second, this is 1 microsecond
SecBetweenSteps = 2/1000000000.0 # larger results in slower steps
block_steps = 4060 # number of steps the motor needs to travel one block
 
 
# start by not moving the stage
PinStep.write(0)
 
# ask the user the moving direction
direct = input('Which direction to move? \n0. Away from motor\n1. Towards motor\n')
 
# start moving the stage for one block
numOfSteps = block_steps*1 # one block

if int(direct) == 0:
	print('away from motor for '+str(block_steps)+' blocks')
	PinDir.write(0) # away from the motor
	for n in range (numOfSteps):
		PinStep.write(1)
		time.sleep(pulseWidthSec)
		PinStep.write(0)
		time.sleep(SecBetweenSteps)
elif int(direct) == 1:        
	print('approach to the motor for '+str(block_steps)+' blocks')        
	PinDir.write(1) # approaching to the motor
	for n in range (numOfSteps):
		PinStep.write(1)
		time.sleep(pulseWidthSec)
		PinStep.write(0)
		time.sleep(SecBetweenSteps)
 
board.exit()

What stepper driver are you using? Does the driver have coil current limiting? If so, is the coil current limit set correctly?

Please try posting schematics. Without a solid base all analysis are a waist of time.

1 Like

How about the Mega code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Though there may be someone versed in Python here, this is an Arduino forum so you may have better luck asking about the Python code on a Python forum, too.

I am curious about the resulting value of pulseWidthSec

Here, you are waiting for a full nanosecond(not a microsecond as mentioned in the script comments)

Is this what you want to do?

Hello:

I am a new user and so am still prevented from uploading attachments. So, I can only provide links to the schematics two at a time. Sorry in advance.

For the stepper motor driver, I unfortunately only have this manual which might as well not even be in English. My understanding is that it uses a Toshiba TB6600 IC.

My wiring is identical to the image in this setup.

The NEMA 23 motor is attached directly to the linear stage. Here is a datasheet containing schematics for the motor.

And here are schematics and CADs for the stage.

Here is the pin diagram for the stage.

Thank you!

Hi: the stepper driver I am using is in the PDF manual I linked in the original post.

I'm not sure if the driver has coil current limiting as this is not mentioned specifically in the manual. I know that you can use the dipswitches on the side of the driver unit to change the current. The maximum current allowable is 4.0 A. I currently use 1.0 A since this is what worked for my previous colleague who has since left. I did try increasing the current to its maximal value and the problem still persists. So, I went back to 1.0 A.

Right, that is a typo I think. This line

should read
pulseWidthSec = 1/1000000.0 # unit second, this is 1 microsecond

The symptoms sounds exactly like those of a stepper motor that has some grit or swarf trapped in it. Steppers combine very fine tooth rotors with very small air gaps and strong magnetic fields. They need to be assembled in very clean conditions but sometimes a foreign body can get left inside or perhaps result from wear. Then it can get caught between the teeth and cause such symptoms. Only solution is to scrap the motor and replace it with a new one. Attempting to open them and clean up usually results in the magnetic properties being severely impaired. I've had this just once on a NEMA08 bought through AliExpress, taught me to buy from a specialist supplier with a decent warranty. Steppers are cheap enough.

Did you sort this out?

Hello - thanks for your insight. I have contacted the stepper motor manufacturer and they suggested using a lower current using the DIP switches on the stepper driver. The motor is rated for 2.8 A but the DIP switches only allow for either 2.5 or 3.3 A. I have been using 3.3 A. Right now the stepper motor is working fine, so I can't confirm if changing the current would help prevent the grinding. I also certainly don't have the know-how or competence to open up the stepper motor and clean it; that sounds like a bad idea anyway. I'll probably see if we can change the driver and/or just the motor portion of the stage if that is the least painful route if the issue persists. Thanks again!

My point was that the motor can't be repaired. Ive used steppers for years and i can't think of an electronics or software problem that would give these symptoms. Reason that it's intermittent is the bit of grit moves around inside the motor and occasionally gets caught.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.