Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with NEMA 23 Stepper run by a DM542T driver

Status
Not open for further replies.

WillBetts

Mechanical
Jun 28, 2021
4
I am attempting to run a NEMA 23 stepper motor with a DM542T driver from a Raspberry Pi 3b+ using Python. I am supplying the driver with power from a 24VDC 10A Power Supply. The positive PUL and DIR terminals are being powered through a 5V buck converter(with a MAX output of 3A) from the same 24V 10A power supply mentioned previously. The negative PUL and DIR terminals are connected to GPIO pins on the Raspberry Pi. Whenever I pulse the PUL pin, the motor steps, but less that expected based on the micro stepping setting on the driver and the 1.8 degree step angle from the motor. Additionally, when the DIR pin on the Raspberry Pi is activated and I pulse the motor, the motor does not move and makes a high pitched squealing sound. The current setting on the driver is set correctly for the motor’s specifications, and I have made sure the voltages are correct at each terminal with a volt meter.

The driver manual indicates that the Logic Signal Current needs to be between 7 and 16 mA, and I am not sure what signal that is referencing. I feel like that parameter may be the issue, but I could be completely wrong. If you have any suggestions on how I could get the motor to run properly, they would be very much appreciated.
 
Replies continue below

Recommended for you

An oscilloscope would quickly show you exactly what's wrong.

From what you've described I suspect two possibilities.

1) The RP outputs not able to supply that much current to the drivers just as you suspect.

2) If you send the pulses to quickly for the driver/motor to respond you'll often get strange, partial, or no response.

Keith Cress
kcress -
 
Thank you for your feedback! I'll look into it. Also, is Logic Signal Current referencing the signal from the RP to the driver? I wasn't too sure what that term meant.

Thanks,
Will Betts
 
The "Logic Signal Current" is the current required to light the LED in the opto-isolator in the driver module. You say the buck convertor can supply 3 amps - that is far in excess of the requirement. The bigger question is if the buck convertor ground is the same as the R-Pi ground and if the R-Pi can withstand the full 5V on the pin when the pin is high.

The R-Pi should be (and seems to be) set to sink the output from the 5Volt drivers; I looked up the limits, but I think it's within the capacity of the R-Pi to sink that much current per pin (though there is a limit on the total amount it can sink, so not all pins can sink their individual max at the same time.)

The driver has an opto-isolator and an integral dropping resistor, so all that is required by the R-Pi is to pull the minus side of the drive to less than 0.5 Volt.

One might add a buffer chip to isolate the R-Pi pin and reduce the current sink demand on the R-Pi. If the R-Pi is not compatible with 5V then the buffer would help there as well.
 
Thank you so much for your input! There's so much about this process that I don't know and still need to learn. I am extremely new to this.

So am I using the Pi as a sink or an output? and is there a way to differentiate between these 2 states in code? I had previously thought the GPIO pins could only be used to supply current. Or am I activating the GPIO pin to reduce/eliminate the potential difference?

Also, if the output current of the buck converter is 3A and the signal current is supposed to be between 7 and 16 mA, could this damage the Opto-Isolator?

Again, thanks so much for your help. I'm learning lots!
 
The documentation from the Pi makers tells what the pins do.
The documentation from the driver shows the required wiring.

The series resistor limits current to the optoisolator based on the input voltage - the current capacity of the buck convertor has no effect unless it cannot provide enough current to maintain that voltage.

The comment from Keith/itsmoked is likely true - the software is sending changes too fast which is what creates the noise.
 
I believe that the problem is now fixed! Originally, I had wired the system based on the driver documentation for a controller with open-collector signals rather than PNP signals. I had also tried reducing the frequency of the pulses to around 200 Hz after itsmoked's comment, which I thought was safely low enough since the driver was rated for 20 kHz, and I faced the same problems. I decided to lower it even more after your comment, 3DDave, and found that the driver only works up to a max frequency of about 50 Hz. That was a very cheap driver though, and when I got a higher quality driver, I was able to drive the motor at reasonable frequencies and have complete control over direction and speed.

I just want to thank both of you again for all of your help! I appreciate it a lot.

Thanks,
Will Betts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor