Home AMX User Forum AMXForums Archive Threads Tips and Tricks
Options

NI-900 I/O as a Relay?

OK, COnfused.. I hav ea Device that needs 12v/ 50ma to turn on. I figured I could use the I/O onmy NI-900 for that...

I Send at Start.

SEND_COMMAND dvIO900,"'SET INPUT 1 LOW'"

But the connectionbetween 12v and I/O Port 1 always seems top be providing 12v. Regardless of whether I send Port 1 High or low.

I see the Light onthe front of the ni light up when I send it high... But there no change in the output.

Comments

  • Options
    viningvining Posts: 4,368
    "'SET INPUT <channel> <state>"

    Set the input channel's active state. An active state can be high (logic high) or

    low (logic low or contact closure). Channel changes, Pushes, and Releases generate

    reports based on their active state. Setting an input to ACTIVE HIGH will disable

    the ability to use that channel as an output.

    That just sets the active state on the I/O channels.

    SEND_COMMAND IO,"'SET INPUT 1 HIGH" on a logic high channel is on and logic low channel is off.

    SEND_COMMAND IO,"'SET INPUT 1 LOW" on a logic low channel is on and on a logic high channel is off.
  • Options
    ImpaqtImpaqt Posts: 155
    I'm Missing something or youjust said exactly what I tried...

    Once I sent the
    SEND_COMMAND IO,"'SET INPUT 1 LOW"

    I tried using

    ON [IO,1] to send 12 volts
    and
    OFF [IO,1] to TUrn Off the Volts...

    WHat Am I missing here?
  • Options
    pauldpauld Posts: 106
    What pins are you using on the NI-900, Ground and Pin 1?
  • Options
    ImpaqtImpaqt Posts: 155
    12v and Pin 1 actually.. THought I read the description was Pins connect to gorund when high
  • Options
    viningvining Posts: 4,368
    With the IO port low it's 0-1.5vdc and a high is 5vdc on my tester checking on a NI-3100 I get .65vdc for a low and 4.95vdc for a high. This tester isn't cablibrated, the batteries are week and it's been abused quite alot.

    The 12vdc pin is for powering things like PCS2 or PCS. We usually tap off the power + 12vdc supply feeding the master to one side of a relay coil and then the other side of the relay coil to IO pin 1 (in this case).

    When used for outputs, the I/O port acts as a switch to GND and is rated for 200mA
    @ 12 VDC. You supply the 12vdc and usually some sort of third party relay that uses 12vdc for its control coil.

    For this to work you must ,"'SET INPUT 1 LOW" .
  • Options
    ImpaqtImpaqt Posts: 155
    So I cant use the 12v from the 900?

    THe device I'm kicking on and of is a Niles TVA50.... It only takes like 50ma to kick on so maybe thats why its not going off... If 'OFF" is still putting out some voltage maybe its stil pickingit up?

    Seems strange.....
  • Options
    ImpaqtImpaqt Posts: 155
    Now I'm More confused thanever.. Just got off the Phone with Tech Support and was told I ned to use another power suply... But how would I hook that up even?


    Device needs 12v and Ground.

    12vPS hs 12v and Ground...

    If I take the 12v fromt he power supply and run it into I/O 1 isnt it going to get shorted to the AMX Ground instead of the Power SUpplies?

    Ugh.. It seemed so simple on paper
  • Options
    viningvining Posts: 4,368
    Look at the attached sketch. I never actually had to do this but it appears to work on my NI-3100. You could use a seperate power supply and might have to depending the type you're using and your load. Usually a relay draws less than 60ma and your TVA-50 draws 50ma so you're barely adding 1/10th of an amp to the pwr supply which is either a 2.8 or 6.5 depending on the model.
  • Options
    flcusatflcusat Posts: 309
    OK, I'm having and issue trying to use the IO port on a NI-700 as a contact closure to drive a PC1 power controller. Bellow is the code I wrote for this:
    DEFINE_EVENT
    
    data_event[dvIO]
    {
      online:
      {
        send_command dvIO,'SET INPUT 1 LOW'
      }
    }
        
    button_event[dvTP,102]
    {
      push:
      {
        Off[dvIO,1]
       } 
    }
    
    button_event[dvTP,101]
    {
      push:
      {
        ON[dvIO,1]
       } 
    }
    
    

    By default I have 5 Volts between IO1 and ground when I do ON{dvIO,1] I get 6.01 volts between IO1 and ground. What am I missing?
  • Options
    viningvining Posts: 4,368
    I've never used a PC1 and the data sheet on it specifies that the control wiring terminals are for push button, switches or relays which implies it has power and means that if you take a wire jumper from pin 1 to pin 2 this should pull in the PC1 and provide power at the recepticle. If this is the case you need to install a relay between the NI-700 I/O and the PC1 but not as the drawing a few posts ago shows. I beleive for this to work terminals 1 & 2 of the PC1 should go to either side of the relay NO (normally open) contact terminals and "do not" connect power to this at all (power is provided by the PC1 to pull in the PC1 internal relay). The only power connections should go to the control side of the relay and the NI-700 as in previous drawing (no power on the load or relay side).

    Disclaimer:
    It this doesn't work and something fries I take no responsibilty!
  • Options
    flcusatflcusat Posts: 309
    Vining, thanks for your response but, All I need between contacts 1 and 2 of the PC1 is a short to have power in the outlet. Now if I could use an IO port out of NI-700 to do a contact closure I won't need a relay, right? According to what have been said before in this thread and another ones related to the IO port here in the forum, the IO port can be used as a contact closure with low logic. I'm having 5 volts in the IO1 by default when that port is Off and 6.01 when is on. According to some readings you posted before I'm supposed to have 5 volts only when the port is on and in the off state it should be a short to ground isn't that right?
  • Options
    flcusatflcusat Posts: 309
    OK it is working. I always test everything that involves voltage before I put them together. That's why I was thinking that something was wrong because of the voltage reading that I was getting didn't make any sense. I kept lurking in the forums and I found this thread:

    http://www.amxforums.com/showthread.php?t=2651&highlight=io

    In this thread Hegberd pointed out this:
    I don't believe that you can check the IO ports with a VOM
    

    and later Dave gave this explanation:
    The IO ports are just collector outputs. If the impedance is low enough
     between the IO port and ground, it's going to trip the thing into sensing an input. 
    If you turn it "on" via programming, it just turns the transistor driving it on, 
    making the collector go high.
    

    Which made sense about the reading I was getting with the voltmeter and I connected the NI-700 to the PC-1 and worked like a charm.
  • Options
    HedbergHedberg Posts: 671
    Io ports are a little confusing, but the manual for any of the masters will explain how they operate.

    You can set the IO port to detect an input signal (using the port as an input) with either HIGH logic or LOW logic. With HIGH logic, you cannot use the port as an output (i.e. to control anything else). When set to HIGH, a logic HIGH voltage between the IO pin (pin1,2,3,etc) and gnd on the master will trigger the input. Any voltage less than the logic HIGH trigger voltage (check the manual to verify exactly what this voltage is), including a short between the IO pin and ground, will not be detected. So, if you are HIGH and apply 12vdc to the IO pin and ground, the IO light will come on and you should detect a button press -- that is, you can use button events to detect the change in status. If you are using logic LOW, the exact opposite occurs. A very low voltage (or short circuit) will trigger the IO port. An open circuit will NOT be detected as either a HIGH voltage trigger or a LOW voltage trigger.

    When you are using a current sensor, you use the IO port as LOW and connect the PCS as shown in the PCS manual, which is available at the AMX website (also included with the PCS). It is my understanding that the +12v pin next to the IO ports is electrically identical to the +12v pin on the Axlink connector and is probably electrically connected to the +12v terminal connected to your power supply. If your power supply is sufficient, there should be nothing wrong with connecting to the +12v pin next to the IO port pins. I believe that the current limit is supposed to be 200ma.

    Given all this, if what you are attempting to do is simulate a contact closure, you should be able to do it with the IO port without using a relay. It is not a physical contact closure, but is a transistor being switched on, so some circuits may not be able to detect this. We had a discussion about two output Kramer switches not too long ago and some people could not get their Kramer switchers to detect the ON state of the IO port as a contact closure. Putting an inexpensive relay between the port and the switcher does work, though, so you can easily and cheaply turn an IO port into a reed contact relay.

    If you want to power a small, low current device (like a relay or small fan or aPCS) with your NI900 (or any AMX master) you can do it with the IO port. Just use the NI (or its power supply) for the plus voltage and connect the negative voltage to the IO port pin. Use LOW logic and control the device by turning the port on and off with your code. Look at the diagram in the PCS manual to clarify how all this fits together.
  • Options
    viningvining Posts: 4,368
    Did that worked w/o a sperate isolation relay? An I/O port basically acts as a switch to its own gound terminal when used to control a relay and the PC1 basically needs an isolated contact closure (switch) to pull in its internal relay so w/o an isolation relay how did you get it to work? What wires did you connect to what?
  • Options
    HedbergHedberg Posts: 671
    vining wrote:
    Did that worked w/o a sperate isolation relay? An I/O port basically acts as a switch to its own gound terminal when used to control a relay and the PC1 basically needs an isolated contact closure (switch) to pull in its internal relay so w/o an isolation relay how did you get it to work? What wires did you connect to what?

    A PC1 or PC2 is actuated by switching its input connections to its own ground. Connect the PC1 or PC2 ground to the NI ground and the control connections on the PC1 or PC2 (connectors 2 and 3, as appropriate) to the appropriate IO pin and the NI will switch control it by turning on and off the IO ports.
  • Options
    viningvining Posts: 4,368
    deleted bad thought
  • Options
    HedbergHedberg Posts: 671
    If I caused it, it sure was not my intention. If I caused it, I apologize.
  • Options
    flcusatflcusat Posts: 309
    vining wrote:
    Did that worked w/o a sperate isolation relay? An I/O port basically acts as a switch to its own gound terminal when used to control a relay and the PC1 basically needs an isolated contact closure (switch) to pull in its internal relay so w/o an isolation relay how did you get it to work? What wires did you connect to what?

    Vining, the PC1 has 5 Volts between Ground (pin1) and pin 2. By default if you short this two pins you can have a momentary switch. I was reluctant to connect them together since I was having 5 volts between IO1( is the same for every IO port) and ground when the port was Off and 6.01 volts when was On with the logic low. All I did was connect the ground from the NI-700 to the ground of the PC1 and the pin2 of the PC1 to the IO1 on the NI-700. With the logic low when I do On[dvIo,1] I get the PC1 to power up and Off[dvIO,2} power off the PC1.
  • Options
    viningvining Posts: 4,368
    Hedberg wrote:
    If I caused it, it sure was not my intention. If I caused it, I apologize.
    If this refers to my deleted bad thought post, no. I wrote a response and submitted it but then looked at what I wrote and realized my comment was stupid, so I edited it and put in that line instead.
  • Options
    flcusatflcusat Posts: 309
    Hedberg, Thank you very much for your detailed explanation, it is very helpful but I have to disagree with you in something, there is nothing in the manual regarding the voltage and the IO ports. At least I didn't find it. The only thing I found is in page 90 regarding how to set the logic to low and high but nothing even close to what you have explained here. I looked also into the tech notes and there was nothing there either. I had lost about three hours today to make this thing to work because the AMX documentation is so poor written and unhelpful that the only resource to newbies like me is you guys here at the forum.
  • Options
    ekeppelekeppel Posts: 37
    Use some caution...

    I have burned out I/O ports before, so be careful when you are connecting things.

    If the relay draws too much amperage (over 200ma) you may burn out the I/O port and it seems to take out the port next to it also. Maybe there is one IC controller for every 2 ports or something, but if this happens, you will have to skip a port and try again. I believe they are linked in pairs like 1/2 3/4 5/6 7/8, so depending on what burns out you just need to locate a good port.

    This stumped me for a while when I made my first attempts of using an I/O port to control a tv lift. I ended up burning out ports 1/2 and didn't realize it since they still *appeared* to respond as far as the LED on the master goes, but they weren't actually working. I moved my connections to port 3 (skipping port 2) and it worked great. Of course I first found a relay that only pulled 35ma so as to not burn out port 3 and 4 also! :)

    Hope my experiences help someone...

    --Erci
Sign In or Register to comment.