Step motor being run at 80 kHz

Thread Starter

cmartinez

Joined Jan 17, 2007
8,253
I intend to drive a step motor at close to 80 kHz using a 5V TTL signal. The source of the pulses (the controller) is about 1 meter away from the driver. Are there any special precautions that I should take in the wiring? Should I use twisted-pair, shielded cable? Should I add an RC filter or pull-up and pull-down resistors at the source and receiver?
 

nerdegutta

Joined Dec 15, 2009
2,684
I'm using a flat ribbon cable between my LinuxCNC pc and my cnc machine. I do not recall the step rate, but the step motor controllers are homemade L297/L298 based.

The cable is appx 50 cm long, and it seems to work fine. I do not have any pull-up resistors.

I used to have a shielded twisted pair cat-5 cable, but that was to stiff.
 

JohnInTX

Joined Jun 26, 2012
4,787
It should work but if it were me, I'd use a balanced driver/receiver like RS485 over a shielded twisted pair. TTL isn't really great for noise margins and its not balanced (V-I for a 1 is way different than V-I for a 0). That said, TTL would probably work, RS485 would definitely work.
 

OBW0549

Joined Mar 2, 2015
3,566
I've been out of it for a while so maybe I'm behind the times, but I had NO IDEA there were stepper motors that could run at anything near 80k steps per second. What motor are you using, and what RPM does that translate to?
 

GopherT

Joined Nov 23, 2012
8,009
@cmartinez
I think most stepper motors are rated at 600 to 2000 rpm. Any faster and you have virtually no torque and miss steps. Also, to get to (or above) 2000 rpm, you generally need to greatly exceed design voltage (which is allowed and fine but follow manufacturer's data on duty cycle and so on.
 

ronv

Joined Nov 12, 2008
3,770
You often see opto isolaters used to kind of eliminate the possible problems with ground shift caused by the higher current of the step motor.
 

DickCappels

Joined Aug 21, 2008
10,180
That would be 6 nanoseconds per round trip.Your motor drive circuit will probably never notice any reflections. If the signal comes from a low enough impedance, you probably don't have to worry about crosstalk either.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,253
This is the driver-stepper package that I plan to use.

Maximum frequency is 250 kHz when driven through open collector, 500 kHz using a push-pull circuit. It already has optoisolated inputs.

stc-ar911aa-3.jpg

The above graph shows data for a 1,000 pulses per revolution setting, I plan to use 5,000 pulses per revolution. So the x-axis (frequency) needs to be scaled accordingly.



Maybe this sort of filtering applies to the signal, since it's also 5V? :

SPI noise filtering.JPG
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,253
Stupid me... I cannot use the SPI filter above because the inputs are opto isolated and they need far more current to be driven:

Capture.JPG
 

JohnInTX

Joined Jun 26, 2012
4,787
I was wondering about that - SPI clocking??
Anyway, since you are driving optos and don't have the RS485 receiver easily available, I'd consider using TTL levels to drive the opto but use a buffer/line driver to push the signals. TTL on its own has a high source impedance driving high that can be problematic. Searching TI brought up several tiny-logic and TTL line drivers. I'd look for push pull output rather than open drain. I'd expect that with the optos, you wouldn't need much if any RC filtering.

EDIT: Fairchild has lots of this sort of thing - like the NC7WZ17. 3.6ns, +/-24ma drive. A quick parametric search at Mouser brought up even more.
 
Last edited:

ronv

Joined Nov 12, 2008
3,770
Stupid me... I cannot use the SPI filter above because the inputs are opto isolated and they need far more current to be driven:

The optos are probably enough. The nice thing about them is that if the controller is quite a ways away from the logic it may have a long (and different)ground wire with quite a bit of motor current flowing thru it, thus the grounds for the logic and controller drift apart. So with the opto you send the logic ground over to the diode so the ground shift is gone.
The noise imunity is pretty good as the forward drop of the diode is 1.2 volts or so and they are kind of slow by nature.
I think I would still twist the wires or run them side by side in a flat cable.

What I have never been able to figure out is if you can just start out going at 5000 steps per second or have to ramp up to it. So I watch with anticipation. :D
 

JohnInTX

Joined Jun 26, 2012
4,787
What I have never been able to figure out is if you can just start out going at 5000 steps per second or have to ramp up to it. So I watch with anticipation.
The controller seems to have ramping built in - send it an N*pulse stream and it goes there with accel/decel determined by a setting - presumably to account for mechanical inertia etc. At least, that's how I (quickly) read the manual. But yeah, no way the motor goes from 0-5000 instantaneously.
 

strantor

Joined Oct 3, 2010
6,798
What I have never been able to figure out is if you can just start out going at 5000 steps per second or have to ramp up to it. So I watch with anticipation. :D
The controller seems to have ramping built in - send it an N*pulse stream and it goes there with accel/decel determined by a setting - presumably to account for mechanical inertia etc. At least, that's how I (quickly) read the manual. But yeah, no way the motor goes from 0-5000 instantaneously.
5000 steps/sec = 1rev/sec = 60RPM.
I wouldn't expect the ramp-up from 0-60RPM to be excessively long.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,253
I see your point. Plus there's this from the motor data:
yup... that's exactly why I chose them. A little expensive for a step motor (almost the price of a servo) but they're worth every penny. I've been using them for more than 10 years, actually.

Motion profiling and control is something that I already have solved. But sometimes I get sporadic false steps, and I think I'm beginning to learn why. In the manual it says it's recommended to use a filter at the power lines:

Capture.PNG
What sort of filter is that? Where can I buy it, and is it rated for power, or voltage?
 
Top