LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Smooth stepper motor velocity profiles

Hi hrh1818

what if one uses a stepper motor shield. Would that work?

Barddya

0 Kudos
Message 11 of 18
(1,497 Views)

If the stepper motor shield handles all the stepper motor timing and such and you simply communicate with it via I2C or something (and it can do 4 steppers) then yeah.

0 Kudos
Message 12 of 18
(1,497 Views)

Your Question.

"what if one uses a stepper motor shield. Would that work?"

The version 2 of the Adafruit Motor Shield can drive two stepper motors and uses I2C to interface an Arduino board with the shield.  In addition the shield is stackable.  You can stack up to 32 shields and drive as many as 64 stepper motors. See:

<http://www.adafruit.com/products/1438>

However, the supplied software is designed to run on an Arduino board.  If you need to use LIFA or LINX with a version 2 Adafruit Motor Shield then you need to examine the source code to extract the appropriate I2C commands.  This is not a trivial task. 

I had forgotten about the version 2 Adafruit Motor Shield when I wrote yesterday you can only use 1 stepper motor with LIFA.   Nathan jogged my memory when he mentioned I2C.  With respect to other brands of stepper motor shields most are not compatible with LIFA.

hrh1818

0 Kudos
Message 13 of 18
(1,497 Views)

Hello cterill,

What hardware and software are you using to interface Labview to 4 stepper motors and to run the stepper motors simultaneously?

hrh1818

0 Kudos
Message 14 of 18
(1,497 Views)

hrh1818, here is a photo of my setup. Ignore the 5th power supply and extra stepper motor, those are for a different application. I know for a fact that this setup runs all 4 stepper motors. I don't know much about the software, since I inherited this project, but I'm reluctant to mess with what's on the Arduino, if anything, since I remember the guy who had the project before me having a lot of trouble with it.

photo (5).JPG

It is worth mentioning, however, that just running my current setup with all 4 motors running on the standard trapezoidal profiles seems to cause some variation in the loop timing. The period of the motion has a range of about 100 ms (standard duration of the loop is around 6.5 seconds), which makes taking phase locked images for PIV (this is for fluid mechanics research) samples difficult. Would switching to Arduino fix or attenuate this? Would Arduino allow me to take force data from a DAQ and plot it against the time of the motion?

edit: I'm on LabVIEW 2012

0 Kudos
Message 15 of 18
(1,497 Views)

Also, Nathan_B., I'm working on implementing your method now. The reason I've been using the Wait Until Steps Complete function is that if I don't, the motor essentially skips to the final speed and travels only a step or two (some amount that is imperceptible to my eye) at each of the speeds before the last one.

0 Kudos
Message 16 of 18
(1,497 Views)

I understand why you were using it, it is necessary as you found out.

Are all four of your steppers running at the same time?

0 Kudos
Message 17 of 18
(1,497 Views)

All four motors run at the same time, yes. I'm not sure if they necessarily receive commands at the same time, but they are all in motion at the same time.

0 Kudos
Message 18 of 18
(1,497 Views)