SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By rohrs.eric
#156929
I want to use National Instument's LabVIEW and cDAQ-9188 with module NI-9403 to control an EasyDriver and a 5V Unipolar Stepper Motor (42L048D1U). I have seen the Arduino examples with LabVIEW, but I am trying to avoid buying Arduinos and learning how to program them, since I have a cDAQ module that can output Digital waveforms.

I have tried just plugging everything in exactly how it is in the Quickstart Arduino example (plugging in the brown and black wires to Motor A and the orange and yellow wires to Motor B) and running an example code from NI, controlling the stepper motor by outputting a direction (Low or High) and a Low to High step. I assumed I could control the EasyDriver with just these two lines, but I am having some issues.

The code can vary the low and high pulse width from 1mseconds and up.

Some symptoms are:

The motor steps rarely and inconsistently
The motor only steps in one direction
The motor is receiving the Input power when it is a 5V motor. I believe there is a way to regulate this through EasyDriver but I cannot find out how. This is an issue because I believe EasyDriver requires between 7 and 30V, which is sent to the 5V motor.

Thanks for your help!

*Edit- Motor is rated for 960mA/phase so I am safe on the 'supplying more voltage than necessary' problem according to the ED FAQ I can set the current to max on the pot and be safe then.

And if anyone is familiar with LabVIEW and think it is a software problem here is the example I use
https://decibel.ni.com/content/docs/DOC-6385

I have also created my own test programs to make sure it is indeed outputting a 0-5V step and dir and yes it is, but sometimes the ED shorts the High signal and it will end up Low.
By EmbeddedMan
#157056
You will need to supply the ED with more than 5V. It's minimum is 7, I suggest 12. Don't worry, it can't supply more than 750mA/coil, and your motor can handle that just fine. Hopefully that will help.

Also, the step is taken on the rising edge of STEP, not the falling edge. But that probably doesn't make much difference.

Make sure to scope out (or use a logic probe) the STEP and DIR signals to make sure you're getting smoothly timed pulses. You should have no problem controlling the stepper with just the 2 lines from your DAQ.

Also, make sure that all of the grounds in the system (power supply, ED, and DAQ are all tied together niccely). And make sure your power supply can do at least 2A.

*Brian
By rohrs.eric
#157136
In case anyone is searching for the answer to this I fixed it.

I attached a 10M ohm resistor to the step output of my DAQ to ground. That is all.

I guess the digital output of the DAQ needed something to clean up the signal (Edit: It may have needed a load resistor?). I threw in a capacitor too for fun. Problem solved!

Thank you for your reply!