Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to detect relay ON/OFF state with Analog Input of PCI 6221 card

Solved!
Go to solution

In order to test if a relay is ON/OFF using de DAQ of my PCI 6221 card and the AI ports.  I conect one of the contacts of the relay to a AO which gives 5v, and the other contact to an AI in order to detect the corrent.  Also a bridge is needed to close the circuit betweeb the AO and the AI.

 

Shoud this bridge conect the GND of both ports?

 

The  conexions scheme is:    relay --  AO (5 v)  --  AO GND --- AI GND --- AI0 ---- relay

 

This doesn't work, and gives a continuous corrent of 10 V (I think its a saturated measure)

 

Any hint, please?

0 Kudos
Message 1 of 12
(4,621 Views)

AI and AO ? Why don't you use the +5V output of the PCI 6221 (pin 8 or 14) and one of its DIs ?

0 Kudos
Message 2 of 12
(4,612 Views)

I do not know the electronic functioning of the card, and I thought that Digital ports were output only.  In this case, should a GND port be conected also?

0 Kudos
Message 3 of 12
(4,609 Views)
Solution
Accepted by floren

The most basic connection is :

 

  • One side of contact of relay : +5V PCI 6221
  • Other side of contact of relay : any DI of PCI 6221

 

But I would add a resistor (eg 10k) from DI to GND of PCI 6221. This will set the input to GND when the contact of the relay is open.

0 Kudos
Message 4 of 12
(4,607 Views)

Thanks, I am going to try this.

0 Kudos
Message 5 of 12
(4,601 Views)

first of all...

  • what are the specifications of the relay
  • do not drive any devices(relays) if your 6221 specification for sourcing is beyond nominal operation
  • try to buffer(protect) these devices from electrical damage
  • use a ttl driver(ULN, transistors, optocoupler,fets, voltage compators....)

from what i read so far...i would use an inline shunt resistor (very low resistance dependant on the nominal current used on the relay and maximun voltage read specification of the 6221) connected to the differential 6221 AI's to sense voltage and the connection of current flowing through the relay being 'on'.

0 Kudos
Message 6 of 12
(4,595 Views)

apok a écrit :

first of all...

  • what are the specifications of the relay
  • do not drive any devices(relays) if your 6221 specification for sourcing is beyond nominal operation
  • try to buffer(protect) these devices from electrical damage
  • use a ttl driver(ULN, transistors, optocoupler,fets, voltage compators....)

from what i read so far...i would use an inline shunt resistor (very low resistance dependant on the nominal current used on the relay and maximun voltage read specification of the 6221) connected to the differential 6221 AI's to sense voltage and the connection of current flowing through the relay being 'on'.


 

Unless I'm wrong, the coil of the relay is controlled by some other signal and the PCI-6221 is only used to check the switching of the relay's contact. Please correct me if this is not correct. In this case your recommendations are very important because the PCI-6221 can be damaged !

0 Kudos
Message 7 of 12
(4,576 Views)

@JB wrote:
Unless I'm wrong, the coil of the relay is controlled by some other signal and the PCI-6221 is only used to check the switching of the relay's contact. Please correct me if this is not correct. In this case your recommendations are very important because the PCI-6221 can be damaged !

6221 has both AI and DO:

 

  • since the relay is only 5V..the 6221 AI can handle this, but I would not recommend the 6221 driving the relay, use an external source. you can directly connect the AI to the 5V relay low side, once relay is switched on...the AI should be grounded by the low side driver(which is your indication that the relay is 'on')
  • DO is connected to a driver/buffer (ULN which has a "flyback diode" built in or an optocoupler which has isolation, please use flyback diode on coiled relays), which is more than capable of handling the current load of the relay

so tell me where the damage would be?

 

0 Kudos
Message 8 of 12
(4,556 Views)

I'm also speaking about using the AO of the PCI-6221 to drive the relay.

0 Kudos
Message 9 of 12
(4,533 Views)

@JB wrote:

I'm also speaking about using the AO of the PCI-6221 to drive the relay.


but I would not recommend the 6221 driving the relay, use an external source

 

I'd rather have a $15 power supply take the brunt of my load rather than my $3000 Daq card taking a dump.....

0 Kudos
Message 10 of 12
(4,523 Views)