Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW USB-6008 Capabilities and Application Question

I am developing a laboratory for undergraduates and have intermediate experience with LabVIEW. Here's the plan: A conveyor system will move blocks of different colors towards an analysis point. Light from a 3V lamp will be focused onto each block as it passes, and the reflected beam will be directed onto a photodiode circuit.  This will measure the voltage drop proportional to the amount of incident light reflected onto the photodiode and will be different for each block.  Then a pneumatic cylinder will reject a certain block color by activating a 5V solenoid valve.  My questions are: does LabVIEW support a photodiode sensor? Does the USB-6008 have the capability of a 5V analog output? I'm pretty sure that it does.  Do you have any suggestions on a photodiode sensor? I know that this is a rudimentary exercise but the department already has most of the materials to complete it. Thanks everyone for your input.
0 Kudos
Message 1 of 14
(4,244 Views)

VT_Andrew:

 

Sounds cool. Photodiodes generate current, you will need a transimpedance amplifier or load resisitor to turn that into a voltage that the analog inputs can use.

 

The 6008 has (2) analog outputs, but it will probably be better to use the digital outputs. Note that they have a limited and current capability, you will need intermediate circuitry (ie transitor based) to provide enough current to drive the solenoid. Use a reverse biased diode across the solenoid to snub the back EMF when the solenoid is turned off.

 

Suggest use of a separate 5V to power the solenoid, I would not run it from the 5V supply available on the 6008.

 

Here's a link to the manual:

 

http://www.ni.com/pdf/manuals/371303l.pdf

 

Good Luck

 

-AK2DM

Message Edited by AnalogKid2DigitalMan on 02-12-2009 10:17 AM
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 14
(4,236 Views)
why wouldn't you use the USB-6008 to supply the 5V?
0 Kudos
Message 3 of 14
(4,225 Views)

You could, if it were me I would not- solenoids tend to draw an inrush of current when turned on and generate a high voltage transient when turnted off. Granted, the diode would shunt the spike.

I prefer not to put the DAQ and PC at risk when interfacing to such components.

 

The 5V out on the 600x is limited to 200mA

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 14
(4,217 Views)
Oh, ok that makes sense. My only problem is then how would you set up the LabVIEW interface and use the USB-6008 to control the solenoid valve when you are supplying the solenoid with an external power supply. Thanks for all your help.
0 Kudos
Message 5 of 14
(4,214 Views)

In LabVIEW Help, find examples for digital I/O, write to line for toggling a digital line within a port On and Off.

 

With hardware, connect the corresponding pin number of the line being used to a transistor (with a base resistor). Connect the DIG GND of the DAQ to the ground of your supply and the emmitter of the transistor. Connect one lead of the solenoid to the collector, the other lead to your external power supply. Place reverse biased diode directly across the solenoid leads.

 

There are also chips on the market to drive relays and solenoids, Google will find many.

 

Consult the EE department in your school, they should be able to assist.

 

Hope thsi helps

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 14
(4,205 Views)

HI,

 

I have tried the same. The analog voltage that was generated by the 6009 DAQ was only 0.8V. Why was it so??

 

I used a transistor circuit as given in the attachment for driving a small DC motor. But the motor always keeps on running without LabVIEW control.

 

Now I need to control a 24V solenoid operated DCV with  6009 DAQ. Is it appropriate to generate analog or digital signals?

 

Kindly help in this regard as I have to complete this project within a week.

 

Thanks in advance

0 Kudos
Message 7 of 14
(3,364 Views)

Mani-Tech:

 

In regards to the 0.8 V, that sounds like the voltage drop across the transistor, so that should be fine (and expected).  What I would be more concerned about is whether or not you get a voltage change when you control the DAQ in LabVIEW.  Have you verified, with nothing connected, that you can make the 6008 change voltage on command?  When you run with the motor connected, do you still have command of that signal?

 

Ryan

 

Applications Engineer
National Instruments
0 Kudos
Message 8 of 14
(3,346 Views)

Hi RYan,

 

I have measured the voltage across the DAQ output without any load; it was 3.5 V.. The voltage did not go more than this even if I raised the control to 5V.

 

Is it because of the DAC?

 

And kindly provide me with some ideas on how to amplify this voltage level to control a 24V solenoid through a relay.

 

Thank you.

0 Kudos
Message 9 of 14
(3,335 Views)

What are you using to control the voltage?  A LabVIEW program?  I would first try using Measurement and Automation Explorer test panels check your voltage.  Are you using analog out or digital out?

 

As far as your solenoid control, I am not exactly sure of your requirements, but I may be able to point you in the right direction.  If all you need to do is provide a higher voltage, i would look into DC-DC boost converters.  Look at what your current requirements for you setup would be, and work backwards to ensure the daq can provide the current required.

 

If the problem is different than I described, I'll need more information to better understand your set up in order to assist you.

Applications Engineer
National Instruments
0 Kudos
Message 10 of 14
(3,309 Views)