Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Controlling a Contact Closure Input


  • Please log in to reply
6 replies to this topic

#1 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 05 November 2004 - 10:50 AM

Question: "I have a machine that turns on when two wires are shorted together or a toggle switch is used to short the wires. That is, the machine is looking for a contact closure signal. How can I control this machine with a LabJack U12?"


Answer: There are a few options.

1) The surefire way to do this is by using a digital I/O to control a mechanical relay. There are very few mechanical relays that can be directly controlled (no buffer required) with a digital I/O on the U12. One such relay is the PB282 from digikey.com. This relay has a load impedance of 370 ohms and is designed for 5 volt control, thus about 13.5 mA of control current is required. The D lines on the U12 can handle this, but an IO line cannot. The D line should be configured as output-high to turn on the relay (contact closure), and configured as output-low or input to turn off the relay. An analog output (AO) can also be used to control these relays (5 volts is on and 0 volts is off), and might be more convenient since they are on the screw terminals.

Here is some related info about controlling mechanical relays. The PB282 relay can be controlled by connecting a D line and GND to the control inputs of the relay, but if a relay needs more control current it is better to connect +5V and a D line to the relay as described in the following:

https://forums.labja...p?showtopic=337

2) Another similar option is controlling an optocoupler or solid state relay. This is similar to the mechanical relay option, but the electrical characteristics of the solid state switch must be considered.

3) If one side of the wire on the machine is or can be connected to U12 ground (10 ohm series resistor recommended), the contact closure could be simulated directly by connecting the other wire to an IO or D line. With the IO/D line configured as input, there is a 1 Mohm resistor from the IO/D line to GND, thus this should appear as an open switch to the machine. With the IO/D line configured as output-low, there is esentially 1500 (IO) or 30 (D) ohms of resistance to ground, and one or both of these might be low enough to appear as a closed switch to the machine.

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 10 November 2004 - 02:59 PM

More info about the PB282 relay: PB282-ND is the Digikey part number and as of this writing they have about 50k in stock for less than $6 each.

 

The manufacturers part number is V23026A1001B201. The manufacturers web site is:

 

http://www.te.com/us.../Zng6Y30e8.html

 

Searching on the part number takes you to the product page:

 

V23026A1001B201 Product Page

 

The datasheet on that page has a wiring diagram for the monostable A1 version.  It is the view looking at the bottom of the relay (where the pins are). The pinout is made to match a 10-pin DIP IC, so there is no pin 2, 4, 7, or 9.

 

Pin 3 is the +Control and pin 8 is the -Control. For simplicity, and since this relay only requires 13 mA of control current, connect -Control to GND on the U12, and connect +Control to a D or AO line.

 

Connect pin 5 to one wire from the machine, and connect pin 1 or 10 to the other wire depending on whether you want normally-closed (pin 1) or normally-open (pin 10). The drawing shows the normal condition, so pin 5 is connected to pin 1 when the relay is off (disabled) and pin 10 when the relay is on (enabled).

 

To enable the relay, put 5 volts on pin 3 by setting the U12's D to output-high or AO line to 5 volts. To disable the relay (normal condition), set the D line to output-low or input, or set the AO line to 0.0 volts.



#3 Guest_Audon_*

Guest_Audon_*
  • Guests

Posted 11 November 2004 - 01:28 PM

Audon Electronics offer the RO-16 relay/opto board that connects to the U12 digital I/O port. The RO-16 has 8 x 3A mains rated relays and 8 x opto-isolated inputs. The realys are powered directly from the U12, so no external PSU is needed. The board also has LED's to show relay/input status. see www.audon.co.uk/labjack.html

#4 Guest_Tamar Kornblum_*

Guest_Tamar Kornblum_*
  • Guests

Posted 22 November 2004 - 01:28 PM

Thanks for your excellent technical support- your detailed instructions were perfect. I ended up using the D-lines because the AOs didn't seem to work. But the finished product is great. Thanks again for all your help. -tamar [email protected]

#5 Joey2

Joey2
  • Members
  • 46 posts

Posted 24 December 2007 - 09:16 PM

The surefire way to do this is by using a digital I/O to control a mechanical relay.


Wouldn't a solid-state relay work?

Regards,
Joe

#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 26 December 2007 - 10:20 PM

Using an SSR was mentioned as a possibility in the original post. I would guess that an SSR would work with contract closure inputs most of the time, but not always. To connect an SSR, you would have to know the electrical characteristics of the contact closure input.

#7 Joey2

Joey2
  • Members
  • 46 posts

Posted 27 December 2007 - 08:44 PM

Thanks for the response. Joe


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users