LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepper motor vibrates but does not turn

http://iosrjen.org/Papers/RDME-2018/Volume-1/2.%2009-13.pdf

Following this paper, I am now using NEMA 17 stepper motor, a microstep driver and myRIO to operate a stepper motor. However, after I develop a VI that's exactly the same to the one in the paper above, my stepper motor only vibrates and does not turn. I think my wire connections between the 4 wires in the stepper motor and the microstep driver is correct. Other wire connections between myRIO, stepper motor, driver and the battery are in good conditions too.

 

The thing that I don't understand is which pin do I use in myRIO, as shown below, to connect the motor driver pins in blue part (ENA-, ENA+, DIR-, DIR+, PUL-, PUL+)

Annotation 2019-09-12 005852.png

Which pin in myRIO should I use? I am a beginner and I don't really understand what is the function of each different pin, perhaps anyone can provide some links on this? The VI I used is attached below.

 

0 Kudos
Message 1 of 3
(2,796 Views)

I have attached the myRIO device pinout below. DIO 8 is pin 27, DIO 9 is pin 29, and +5V is Pin 1. 

 

http://www.ni.com/pdf/manuals/376047c.pdf#page=4 

0 Kudos
Message 2 of 3
(2,710 Views)

Very basics: Digital control signals (PULse, ENAble, DIRection) have high and low state. If you connect 0V to "-" terminal and +5 V to "+" terminal, it is ON state - Direction will be clockwise, Enable will tell driver to turn on. If there is no difference (both 5V, This driver recommends to keep "+" terminal at 5V and you change voltage on "-"), terminal will say opposite: anticlockwise direction, turn motion off

PULse is continuously running pulses, they determine speed of rotation. 100 Hz = 100 steps/s, check driver and motor specs for range.

They do not control ENAble state from program and connected ground to "-", 5V to "+". Motor will stop if you stop running PULses for it. Normally you would switch this line on or off to start/stop motion.

So your program should generate continuous pulses at DIO8 (PWM0) and switch line DIO9 to change direction.

As the simplest tutorial of myRIO basics this is fine, but for general control of the stepper motor it is super expensive overkill. I did not know this is worth an article.

0 Kudos
Message 3 of 3
(2,694 Views)