LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control a stepper motor using a4988 driver board and a myRio?

A finer micro-step resolution will normally result in smoother running, but often at the expense of maximum speed. 

Running at 1/2 step rather than full will give you a 50% reduction in speed for a given step pulse frequency, and there usually a limit to how fast you can pulse the step input, around 100kHz for many stepper driver chip-sets I have used.

 

You can check the datasheet, but I have seen misleading figures in the past on some, the digital input side can accept a faster pulse train but the H bridges on the output side cant keep up.

 

Some other things to check, if the board has some extra inputs that you don't use, make sure they are not floating. Some may have internal pull up/down, if not you would need to tie them to Vcc or Gnd.

 

I have seen some board react erratically when the enable or direct pins were floating.

 

0xDEAD

 

0 Kudos
Message 11 of 13
(458 Views)

So everything is running smoothly now thanks to your help! 

 

I have another question. Is it possible to specify the number of pulses being sent to the stepper motor so that i can exactly control the number of steps and if it is how would I go about that. 

 

The code controlling the motors currently looks like this. Could I adapt it to control the exact number of steps?

 

Thanks Rory

0 Kudos
Message 12 of 13
(440 Views)

I would recommend digging a little deeper into programming with LabVIEW for the FPGA.

It's perfectly feasible to set a line high, then delay a certain amount of time, then set the line low again (repeated a certain number of times to give a movement to a precise location).

Varying the delays can even allow the stepper to accelerate or decelerate allowing higher top speeds without stalling. 

 

0xDEAD

0 Kudos
Message 13 of 13
(436 Views)