Pulses for a stepper motor

Hello all

I have attached a screen shot of my pulses read from step pin of stepper driver to move a stepper motor.

Should the timing of these not be consistent? I am thinking it is messing up my accelerating code which is keeping me from achieving the speeds i need. Am i off my rocker or is this a correct assumption.

You don't say which stepper driver that you are using so I can only offer a generality. Most stepper drivers need a step pulse only a few microseconds wide. The data sheet for your stepper driver should list the minimum pulse width. The time between the pulses sets the speed of the stepper.

What speed are you trying for (in steps per second)? What library are you using, if any?

Stepper basics.
Stepper basic code.

It was a general question on whether the pulses should be in uniform spacing.

Please display your image(s) in your post so we can see it(them) without downloading it(them). See this Simple Image Guide

Also please post the program that generated the pulses in your picture.

If the motor is to run at a constant speed then I would expect the pulse interval to be constant.

...R

I have placed the picture in my OP. I guess my question is a general one, will/could missing pulses during ramping cause the motor to stall?

ultratec:
I have placed the picture in my OP. I guess my question is a general one, will/could missing pulses during ramping cause the motor to stall?

Without seeing the program that is generating the pulses it is impossible to know what's going on.

Also, what stepper motor driver are you using?

...R

Robin and all

Motor is MT2303HS280AW-0B and driver is robotshop.com Product Code : RB-Dfr-727. 24VDC to motor and a current setting of 2.0 and Pk 2.2 on the driver. Full step 200/ rev.

When i try to post the code it says i exceed the 9000 character limit.

My wonder is , if there are too many things going on at once (reading an encoder, writing to outputs, etc) would that block the arduino from generating a consistent pulse stream. and would a pulse stream with gasps in it (especially during an acceleration ramp) cause a stall.

For long programs just attach your .ino file

And please post links to the datasheets - part numbers are meaningless.

...R

Robin, of course,here are links to the driver Driver Webpage and motor Motor Specs

Code is attached.

IO.h (1.6 KB)

Motor.h (4.13 KB)

Timer.h (372 Bytes)

Winder20190108-05.ino (8.91 KB)

There's an awful lot of code in your collection of program just for a query about the consistent timing of step pulses. Can you make a short program that illustrates the problem?

...R

Robin it is a lot of code, and unfortunately i am working with a programmer from a "for hire" website so I don't know if i can meet your request.

My question , at least at this point, isn't why the pulses are being generated this way, but rather would a motor behave incorrectly (stall) if this is what is being generated as the acceleration ramp profile.

When I showed the scope output and inquired to the programmer about the missing steps he replied "why would that be bad?".

To me a series of dropped steps could cause the motor to stop, especially during acceleration.

This is what I am trying to verify with this post.

Thanks in advance and for your time so far.

Mike

ultratec:
When I showed the scope output and inquired to the programmer about the missing steps he replied "why would that be bad?".

Maybe you chose the wrong programmer ? :slight_smile:

Seriously, you need to work with a Professional who can deal properly with your queries no matter what his/her area of professional expertise and no matter how little you know about the subject.

And sorry, but I am too lazy to try to figure out all the code you posted and figure out what might be causing the problem and whether it might be harmful.

...R