LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running and Controlling a stepper through Labview software

Hi ,

 

I need to get a stepper motor spinning and be able to control it through labview.

I have a myDAQ, the stepper motor is 28byj-48, the control board that connects to the motor in a ULN2003 board.

How can i get this spinning , how do i connect to Daq and what Vi do i need to use.?

 

 

Cheers,

 

Niall

0 Kudos
Message 1 of 5
(3,046 Views)

Typically, a stepper has 4 phases in which they can step full or half steps.  Your controller may handle this automatically and should mention the controlling routines in the documentation.  If not, here is how to step  through a typical stepper.

 

Power needs to be applied to the common(s) and only one or two adjacent phases.  When a stepper has two commons, they power the two opposite poles (A/C or B/D).  To step through with whole steps (90 degree angles), one of the phases will need to be grounded allowing a current path then release that and power the next adjacent phase and continue (A > B > C > D > A...) to move in one direction and (A > D > C > B > A...) in the other.  Half stepping works by leaving the previous adjacent phase grounded while grounding the next phase then releasing the previous phase.  This also works in both directions (A > AB > B > BC > C > CD > D > DA > A...) or (A > AD > D > DC > C > CB > B > BA > A...) for half stepping.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 5
(3,032 Views)

I presume you've read the instructions for the Stepper Motor and its control board.  I also presume you've read how to hook it up to an Arduino.  Did you notice that you use four Digital Outputs on the Arduino?  What kind of outputs do you think you'd want to use on a myDAQ, substituting for the Arduino?  Do you know anything about the myDAQ?  Do you know any LabVIEW?  Are you familiar with MAX (the Measurement and Automation Explorer)?

 

The VI that you need to use is the one that you write.  Write your VI (don't ask us to do your work for you -- there is plenty of material on Getting Started with LabVIEW (see the first page of this Forum) and on Getting Started with myDAQ (see the Web)).  If your VI doesn't work, come back here, attach your VI, and ask questions.

 

Bob Schor

 

P.S. -- it is perfectly acceptable (unless your school expressly forbids it!) to ask your fellow students for help and advice.  Sometimes working as a team brings everyone along ...

0 Kudos
Message 3 of 5
(3,028 Views)

Hi bob,

 

I have the motor running through the Arduino UNO. I have never used labview before , I'm doing a level 8 project i have a DC motor running through labview on out AO1 , i have only one output left on my daq AO0 to run stepper motor. I have the Arduino pins 2-5 going to the driver board. How do i hook up the 4 wires to myDAQ, is it through 4 separate Digital outputs and write a VI.?

 

Cheers,

 

Niall

0 Kudos
Message 4 of 5
(3,012 Views)

Nail,

 

I have given you the tools to understand how a stepper functions.  Check the specifications of the digital outputs.  Can they carry the necessary current?  The off-state of a stepper phase requires that it be either disconnected (Open) or at the same voltage as the common (0V dropped across the phase).  Does the digital on-state meet this requirement for how it is connected in your case?  If not, a FET or some open collector logic may need to be driven for each phase by the digital outputs. 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 5 of 5
(3,006 Views)