12-09-2010 12:17 AM
I'm using the ni-usb-6009, and L293, and a stepper motor, using labview 8.2. The data sheet for the L293 is: http://www.parallax.com/Portals/0/Downloads/docs/prod/compshop/603-00019-L293D-Datasheet.pdf
I have my stepper motor connected to the L293, but I'm a little confused about how I'm supposed to wire the L293 to the 6009. I'm mainly confused with pins 1, 8, 9, and 16. Pin 1 is for enabling 3 and 6, pin 9 is for enabling 11 and 14, pin 8 and 16 are Vcc. So does this mean I just connect pins 8 and 16 to +5v supply? I'm assuming pins 6, 9, 11, and 14 go into the digital output of the 6009. So where does pin 1 and 9 go? I don't quite understand the "enabling" term.
Also, I'm a little unsure about how the vi will be constructed for this. I've been looking through threads but I'm still confused... I've seen some mention PWM. Is that the way I should go?
Thanks,
Nick
12-09-2010 12:52 AM - edited 12-09-2010 12:57 AM
Kudos are welcomed.:-)
12-09-2010 01:05 AM
Haha, thanks! I actually didn't have those wired like I said (thankfully), I just wrote in the wrong the number... so no 6009 explosion this time.
So I can wire pin 16 to the +5V on the 6009? Then, the data sheet for my motor says it's a 4-phase 12-volt motor: http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/Stepper_Motor_27964.pdf
so do I need another power supply for those 12 volts?
I have pins 2, 7, 10 and 15 going into p1.0, p1.1, p1.2, and p1.3. Since I also need to wire pins 1 and 9 into the 6009 outputs, should I move it so pins 2, 7, 10, and 15 are in p0.0, p0.1, p0.2, and 0.3, and pins 1 and 9 are in p0.4 and p0.5?
Once I have them all plugged in I'm still a little confused about how the signal will make it move. I understand the concept of the stepper motor, just not how I can do it with labview.
12-09-2010 01:18 AM
Kudos are welcomed.:-)
12-12-2010 09:01 PM
Hi,
So I decided to make a program with LEDs first to make sure that all of my VI was working properly. I have four LEDs, and made a VI that lights them up in the same sequence as my 4-phase 12 volt stepper motor would work, doing half steps (according to this link for my motor: http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/Stepper_Motor_27964.pdf)
The VI runs fine, lighting up the LEDs on the front panel, as well as the LEDs I connected to p0.0 - p0.3.
However, when I replace the LEDs with the wires for the stepper motor, nothing happens with my motor. Shouldn't this VI work for my motor?
I am using an L293 (http://www.parallax.com/Portals/0/Downloads/docs/prod/compshop/603-00019-L293D-Datasheet.pdf) driver with pins 1, 9, and 16 going to +5v, pin 8 going to a +12V supply, pins 4, 5, 12, and 13 going to ground, pins 2, 7, 15, and 10 going to p0.0 - p0.3 (in that order), and the four wires from the motor going to pins 3 (black wire), 5 (orange), 11 (yellow), and 14 (brown), and the fifth wire going to ground.
I've attached my VI
Thanks for the help.
-Nick
12-13-2010 04:35 PM
uoprummel,
It sounds like your 6009 is working correctly. Have you had any other trouble with the 6009 specifically or do you believe the problem is with the L293? If so you may want to bring this to the Parallax of Texas Instrument forums for help specifically with the L293.
However, please let us know if you feel the issue may be with the 6009 and we can come up with some trouble shooting steps for you to try (though the LED testing was a great first step).
Regards,
Sam K
Applications Engineer
National Instruments
12-13-2010 04:57 PM - edited 12-13-2010 05:03 PM
Hey everybody,
I got a bit more information in a private message from the original poster. It sounds like the motor connections are good at this point--I also put together a VI showing the user one way he could control his stepper motor (he wants it to turn whenever input voltage drops below 5V). Here's the VI that I put together:
EDIT: The U32 instance of DAQmx Write should actually be U8 for his 6009. I am using a 6353 which has a 32-bit port 0.
Best Regards,
12-13-2010 05:10 PM
Thanks John,
I changed it to U8, and ran the vi. When the voltage is under 5 volts the motor starts vibrating, but not rotating. It does the same thing if I change it to 00110011. Do you have any idea why this is happening?
Thank you so much for your help!
-Nick
12-13-2010 05:18 PM
I don't think this is your main problem, but it appears you missed a step in your logic progression, according to the half step "states" from the link you posted,, the last step should be "1001" you stop at "0001" then return to "1000" (the first state)
Alan
12-13-2010 05:29 PM
I would also speculate , that after you add the " last state" to the code you posted, then go into the Daq Assist and check the " INVERT all signals in the port" box , your motor will turn. The 6008 and 6009 are intended to "sink current" So when you " turn a line ON " in the LabVIEW code, the coresponding line goes LOW on the 6008/6009 (On in LabVIEW code, means LOW on the 6008/6009 port)
Alan