LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepper Motor Reverse Direction

Solved!
Go to solution

Hello

I've been working on a project with LIFA and a stepper motor. I have been able to get the stepper to sucessfuly turn clockwise using the stepper example provided with LIFA. For my project I need to be able to reverse the direction of the stepper. I have not been able to figure this out even after exploirng the configure stepper VI. I'm under the impression that I need to change the value to the direction pin but I am not sure how to do this. Any help would be much appreciated. I am using the EasyDriver stepper motor driver board for motor control.

On another note. The stepper heats up very quickly even when just stationary. I presume this is because it is being supplied current to keep the shaft in place and this is being almost directly converted to heat. Has anyone had this issue or found a wrok around?

Thank You

- Jason

0 Kudos
Message 1 of 6
(11,005 Views)

Let me know if you figure this out. Im also interested in this. I have a continous servo and I can initiate the servo and I have gotten it to run clockwise but I can't get it to go counter clockwise.

-Chris

0 Kudos
Message 2 of 6
(7,769 Views)

In my experience, servo's are not stepper motors.  Do you have an actual stepper motor?

0 Kudos
Message 3 of 6
(7,769 Views)

I do but I would like to avoid using a stepper motor because the programming seems more difficult. I have very limited programming experience especially with the Arduino Toolkit so i would like to continue to use the continous servo.

Is there a way to get the servo moving in the oposite direction?

-Chris

0 Kudos
Message 4 of 6
(7,769 Views)

A servo should go backward when it is given anything less than 50% duty cycle and it should go forward when given more than 50% duty cycle.

Also, since your question is about servo's, it needs it's own thread so that we don't hijack the discussion about stepper motors.

0 Kudos
Message 5 of 6
(7,769 Views)
Solution
Accepted by topic author JPhillip

Hello

I have been able to sort out forwards and backwards for the stepper. I tried many things including modifying base VIs but nothing worked. Finally I gave it a last ditch effort and put the number of steps as negative and lo and behold it worked. So for steppers at least setting the number of steps to a negative integer runs the motor backwards. The LIFA examples are very easy to use and modify and they are also pretty easy to understand. If you cannot get the servo working try a stepper it is much easier that you might think.

Also NOTE****

The wiring diagram for the easy stepper driver provided with the stepper example VI has an error. The pinouts for DIR and STEP need to be switched for it to work properly. Took a while to realize this but the stepper will not work if connected as shown. You need to swap the arduino pins for DIR and STEP. Also you could just define your own pin numbers and modify the VI accordingly.

- Jason

0 Kudos
Message 6 of 6
(7,769 Views)