Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using 6009 to control stepper motor direction

Hello,

 

I am trying to control a stepper motor with the 6009. I have tried using a Big Easy Driver and a Geckodrive G203V to turn a  stepper motor. I initilly wrote a VI that generates a square wave using the digital outputs of the DAQ and input this to the step terminal on the driver, I used a different channel to control the direction. I know that my VI is good as I have connected the digital port to an oscilliscope and I am seeing a clean square wave with 5V pk2pk. I could not get this wave to drive the motor at all, however. I have now decided to use a high spec (overkill) Agilent function generator via VISA to generate the square wave that gets sent to the driver to drive the motor, and this works nicely.

 

I am clueless as to why the DAQ can't achieve this though (I have tried using both the drivers I have). I still need to use the DAQ to control the direction of the stepper motor. For this, I just write a logic high or low using the digital port before sending the pulse from the function generator. This doesn't change the direction though. I have tried operating in both open collector and active drive regimes. I have also tested the digital I/O ports by connecting them to one another and measuring in Measurment and Automation Explorer. The hardware seems to be working fine.

 

Please can you direct me if you have an Idea of what I'm doing wrong. I have included some images of my VIs.

 

Download All
0 Kudos
Message 1 of 11
(6,504 Views)

Have you measured the signal while connected to the driver board?  

One possible reason migth be, that you need more driving (down) current at the output.

 

I had a look into the driverboard doc  . ...   The input has a pull up resistor.  You need to configure the 6009 output to a open collector output.

The agilent is able to pull the driver input down to GND (with 50 OHM)  , If the DO is configured as output , there is no current drive to pull it down to GND.

See 6009 manual picture 14??

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 11
(6,490 Views)

Hello Henrik. Thanks for your help.

 

Measuring between the DIR and COMMON input terminals on the driver (or between the DO and ground), I am reading 38mv when the DO outputs a low, and 1.473V when it is high. When i disconnect the driver, I measure a voltage drop of 5V between the DO and ground. I believe from the driver spec that it requires 2.5V 3.3V or 5V signals at >2.5mA. The DAQ should meet these requirements I believe.

 

I tried changing the output to an open collector, but it still doesnt change the direction, any ideas? Thanks for your help.

0 Kudos
Message 3 of 11
(6,482 Views)

Is there anything else connected to the digital line.  Based on the 8.5mA maximum output of the 6009, there is a ~175kOhm load on the output.  In order to get the 5V, you need something more around the 600+kOhm load.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(6,468 Views)

Hi Crossrulz. Nothing else is connected to the digital line. My set up looks like this:

sketch.png

 

Where were you getting the kOhm resistances from? Solving ohms law with 8.5mA and 1.43V/5V gives me ~175 Ohms and ~600 Ohms. I am fairly new to electronics, so help is much appreciated.

 

Also, worth noting that the direction does change when i manually put the cable to either ground (port 32) or the 5V output (31). I read that the 5V output on the DAQ has a max current of 200mA (table on page 22 of the manual), much higher that the digital ports. Could a pull up resistor solve the problem?

0 Kudos
Message 5 of 11
(6,465 Views)

mr_three wrote:

Where were you getting the kOhm resistances from? Solving ohms law with 8.5mA and 1.43V/5V gives me ~175 Ohms and ~600 Ohms. I am fairly new to electronics, so help is much appreciated.


Oops.  I put in the "k" twice in my head.  My bad.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 11
(6,453 Views)

The motor driver inputs are optically isolated (third paragraph of the data sheet you linked). This most likely means that they need to be driven high with enough current to turn ont the internal LED. So, either configure the USB-6009 for active pull up (to 3.3 V) or add an external pull up resistor which can provide sufficient current for the opto isolators without exceeding the 8.5 mA pull down limit of the DO line.  The data sheet talks about 2.5 mA at 2.5 V but does not specify the current at other voltages.  It is a bit of a guess, but I suggest starting with a pull up to +5 V of about 1000 ohms but not less than 600 ohms.

 

Lynn

0 Kudos
Message 7 of 11
(6,445 Views)

Lynn is rigth ,  my first answer relates to the 'big easy drver' ...

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 8 of 11
(6,430 Views)

Thank you both. I will try this on monday.

0 Kudos
Message 9 of 11
(6,411 Views)

I have solved the problem by using a 750 Ohm pull up resistor between +5V and the port. This solution works when the port is set to either active drive or open collector modes. I am not sure I really understand why it does not function without the pull up resitor so if someone could explain I would be very grateful.

 

I also need to use the digital IO ports from the DAQ to switch a multiplexer in the next few days. I am hoping the switch current from the DAQ will be sufficient for this application. http://www.ti.com.cn/cn/lit/ds/symlink/ts3a5017.pdf 

 

I also found this thread from a few years ago where someone was using the same stepper motor driver and motor with the DAQ and having problems on both the direction and step inputs, which may give some more insight.

 

Software timed Pulse width modulation using DAQ USB-6009 (posted in other area but never got a respo...

 

Many thanks for your patience

0 Kudos
Message 10 of 11
(6,385 Views)