Jump to content


Photo
- - - - -

Only DIGITAL OUTPUT device!


  • Please log in to reply
13 replies to this topic

#1 Grey

Grey

    Very Active

  • Members
  • PipPipPip
  • 87 posts
  • Version:LabVIEW 2011
  • Since:2009

Posted 29 June 2012 - 07:38 AM

Hi,

I need to energize relay one at a time sequentially up to 20 Relays.

I'm looking for a DIgital Output device preferably from NI.

Any body suggest any NI device which suits my application?

i just explored the NI site and many are DIO modules. What i'm looking for is only DO module.

A low cost solution is what i'm working in this project :)

Thanks.

NI USB-6501 works???

#2 BrentonLang

BrentonLang

    More Active

  • Members
  • PipPip
  • 33 posts
  • Location:Brisbane, Australia
  • Version:LabVIEW 2011
  • Since:2008

Posted 29 June 2012 - 09:04 AM

I was going to suggest the NI USB-6501. I've used it before to create a large 5x 7 segment numeric LCD (to display any connected LabVIEW numeric indicator). It's incredibly cheap and simple to use.

However, I'd recommend designing an interface PCB to "current amplify" the DO lines. The main reason is because the USB-6501 can only supply a maximum of 65mA across all 24 digital lines, that is not enough current to switch 20 relays at the same time. Even if you want to switch 1 relay at a time, it would be very hard to find a relay that will switch from 8.5mA. An interface PCB with simple switching transistors would even do the job.

So it is possible, but you'll need to check the required current (and DC voltage) to switch the relays that you've chosen. The USB-6501 is a great cheap option, but is very limited in terms of output power.

#3 j_meier

j_meier

    Active

  • Members
  • Pip
  • 14 posts
  • Version:LabVIEW 2011
  • Since:1999

Posted 29 June 2012 - 09:45 AM

Considering that you mentioned low cost and NI rarely falling in that category:

Check this out: http://labjack.com/

Labjack offers a Labview driver that I found to work well.

I would still expect that you need a current amplifier to drive relays, and independent on your choice of hardware I would strongly recommend a flyback diode. An interface PCB like Brenton suggested would be a good solution.

Another alternative would be: http://www.toradex.c...ts/Oak/OakRelay

With this you get the interface problem solved (at least for low currents in you relay...), but you need five of those boards.
Toradex also offers a Labview driver that works well.

#4 BrentonLang

BrentonLang

    More Active

  • Members
  • PipPip
  • 33 posts
  • Location:Brisbane, Australia
  • Version:LabVIEW 2011
  • Since:2008

Posted 29 June 2012 - 10:09 AM

If you do decide to use a custom interface PCB, but are still thinking of a cheaper alternative to the USB-6501, another option might be Arduino. LabVIEW has a Toolkit called the NI LabVIEW Interface for Arduino Toolkit, which is free.

There are quite a few Arduino hardware options that include more than 20 DIO lines. LabVIEW can control the Arduino via the usb port (just like USB-6501).

The biggest negative however would be that more effort is required than the standard NI hardware, as you'd expect.

The thing I like about Arduino is the form factor. You can build and design your custom interface PCB as a prototype Arduino Shield board. The shield quite simply plugs into the Arduino, creating a "stacked" devices. There is also an existing Arduino Shield that includes controllable relays...

#5 ShaunR

ShaunR

    LabVIEW Archetype

  • Members
  • PipPipPipPipPipPip
  • 2,265 posts
  • Version:LabVIEW 2009
  • Since:1994

Posted 29 June 2012 - 10:29 AM

Any USB device is going to be limited in it's current capability (both sourcing and sinking) and usually only 5v - You didn't say which relays (5v/12v/24v). You are much better going for a PCI solution such as the NI-PCI 6517 which will operate 12v and 24v directly without intermediary hardware (32x125mA max or 425 mA per single activated relay). You'll also have more than enough current headroom to add LEDs that can burn retinas at 100 paces :) If it is a 5V relay, you can still use the same card, but you may have to put a resistor in-line to drop the lower (off) threshold depending on the relay. Most of the time you can get away without this however.
A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort. (Herm Albright 1876-1944).

Founder and general mischief maker on www.labview-tools.com.
SQlite aficionado and websocket zealot.
If it 'aint in LabVIEW, then you 'aint got a clue!

#6 BrentonLang

BrentonLang

    More Active

  • Members
  • PipPip
  • 33 posts
  • Location:Brisbane, Australia
  • Version:LabVIEW 2011
  • Since:2008

Posted 29 June 2012 - 10:39 AM

Any USB device is going to be limited in it's current capability (both sourcing and sinking) and usually only 5v - You didn't say which relays (5v/12v/24v). You are much better going for a PCI solution such as the NI-PCI 6517 which will operate 12v and 24v directly without intermediary hardware (32x125mA max or 425 mA per single activated relay).

I agree with Shaun. If the device doesn't need to be connected via USB, you'll have far more power options using a PCI card, or similar. But it comes down to the relays you use and their coil power requirements.

#7 Grey

Grey

    Very Active

  • Members
  • PipPipPip
  • 87 posts
  • Version:LabVIEW 2011
  • Since:2009

Posted 29 June 2012 - 11:29 AM

Dear Friends,

Thanks for valuable suggestions and advice.
I decided to go USB 6501 because of the cheap price.
Currently looking for interface board between relays and USB 6501 for current hook up.

Thinking to use ULN2803 IC.

Any suggestions about ready made current hookup pcb interface which i can buy and use ?

thanks again.

#8 Grey

Grey

    Very Active

  • Members
  • PipPipPip
  • 87 posts
  • Version:LabVIEW 2011
  • Since:2009

Posted 29 June 2012 - 11:58 AM

the relays i want to use are having 12V coil voltage.

sorry for mentioning this late.

thanks.

#9 BrentonLang

BrentonLang

    More Active

  • Members
  • PipPip
  • 33 posts
  • Location:Brisbane, Australia
  • Version:LabVIEW 2011
  • Since:2008

Posted 30 June 2012 - 09:18 AM

I decided to go USB 6501 because of the cheap price.
Currently looking for interface board between relays and USB 6501 for current hook up.


Thinking to use ULN2803 IC.

I believe the ULN2803 will work for you. Just be sure to connect a 12V supply to pin10 and then you'll be alright.

#10 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 30 June 2012 - 11:12 AM

One care may be take with low cost USB NI product. There isn't galvanic isolation through USB connection. Sometime it can be problem, because when the relay switch, current spike can activate USB protection on PC.
In this case, restart your software is not enough, and you need to restart PC. I have experimented this. You can find low cost USB 2 galvanic isolator on web, or create one with http://www.analog.co...s/product.html.
Eric

Edited by Bobillier, 30 June 2012 - 11:13 AM.


#11 BrentonLang

BrentonLang

    More Active

  • Members
  • PipPip
  • 33 posts
  • Location:Brisbane, Australia
  • Version:LabVIEW 2011
  • Since:2008

Posted 30 June 2012 - 01:21 PM

One care may be take with low cost USB NI product. There isn't galvanic isolation through USB connection. Sometime it can be problem, because when the relay switch, current spike can activate USB protection on PC.
In this case, restart your software is not enough, and you need to restart PC. I have experimented this. You can find low cost USB 2 galvanic isolator on web, or create one with http://www.analog.co...s/product.html.

Eric


Good point Bobillier. However, this may only be an issue if many relays are switched simultaneously, plus it depends on the relay coils. Still, it's always a good idea to design with isolation and protection in mind.

#12 rolfk

rolfk

    LabVIEW Aficionado

  • Premium Member
  • 2,050 posts
  • Location:Netherlands
  • Version:LabVIEW 2011
  • Since:1992

Posted 30 June 2012 - 05:58 PM


Good point Bobillier. However, this may only be an issue if many relays are switched simultaneously, plus it depends on the relay coils. Still, it's always a good idea to design with isolation and protection in mind.


For protection from relays you should definitely look at reverse diodes across the coil. When you switch of a coil it always produces a reverse EM voltage and that can be a high multiple of the operating voltage. So you end up easily with over 100 V reverse voltage with a 12 V relays. I believe it's this revers EM voltage which could cause the effects you describe, if it doesn't destroy the driver transistor first. Additional protection could be achieved with ferrit beads or ferrit filters that filter the high frequency components that are created when switching of the relay and the reverse EM voltage is suddenly applied. Even-though the protection diode will limit that voltage and allow the current to be dissipated over time, there still exists high frequency components from the switching that can travel through the circuitry and into your computer unless you put some filters in that path. Also important is of course a solid ground plane. If you force those relay currents through small traces and don't at least connect the grounds in some star formation, you can end up with huge transient ground voltage differences during the switching.

#13 Grey

Grey

    Very Active

  • Members
  • PipPipPip
  • 87 posts
  • Version:LabVIEW 2011
  • Since:2009

Posted 02 July 2012 - 07:29 AM

I believe the ULN2803 will work for you. Just be sure to connect a 12V supply to pin10 and then you'll be alright.


Thanks for your advise!


Good point Bobillier. However, this may only be an issue if many relays are switched simultaneously, plus it depends on the relay coils. Still, it's always a good idea to design with isolation and protection in mind.


Yea. My intention is to switch one relay at a time. How ever i'm going to use Free wheeling diode at relay coil terminals.
thanks!

#14 BramJ

BramJ

    Active

  • Members
  • Pip
  • 16 posts
  • Version:LabVIEW 2010
  • Since:2009

Posted 04 July 2012 - 06:57 AM

If I remember correctly there are freewheeling diodes inside the ULN2803

a while ago I used a USB6501 with some 7400-series logic chips and ULN2803's to control relais, worked great
this way I could control 16 relais with 4 outputs on teh USB6501