Jump to content
  • 0

Configuring simultaneous DOUT and DIN on USB-2408-2AO


dodge_neon

Question

Hello, 

I am using an MCC USB-2408-2AO to drive an end-of-line testing device for a 12V pneumatics control manifold. This DAQ was selected because it can output 150mA on each DIO, which we'll be using to operate some 5V/35mA relays. The 16 AI channels are also being used to measure some voltage inputs. 

We will be running a custom python software to operate the device when our project is done, but for now I'd like to configure it for quick DASYlab control. I have run into an issue with the DIO circuits pull up/pull down feature, I believe. 

DIO_0 and DIO_1 should be inputs, 0-5V TTL, wired to NO switches. 

DIO_2-DIO_7 should be outputs, 0-5V to drive relays directly. 

I have a DASYlab sheet configured like so:

 image.png.e72bb5e1cdeec4415d304e90926cc5cc.png

fig 1

With this setup and the DAQ factory configured, I found all of the DIO circuits reading HI. This was regardless of output from DASYlab, or input from a hardware switch. 

I read into the manual to determine I would need to switch the pull-up/pull-down jumper: 

image.png.a8a770a85187613bc92b51c6316cee02.png

fig 2

Switching my DAQ jumper to 2-3 did make DIO_0 and DIO_1 read the hardware TTL correctly, but my other six DOUTs are not going HI when I switch them in DASYlab. 

I switched the jumper back to 1-2, and now my DIO_0 and DIO_1 are stuck HI, but I can read at least some effect on the DOUTS. 

image.thumb.png.77c3c194bd6a87970e938838ed758d5a.png

fig 3

To be specific:

  • J6 pos 1-2
  • with RELAYS>0 LO (fig 1), DIO_2 (node 25, fig 3) reads V = 5.00 HI
  • with RELAYS>0 HI, DIO_2 reads V = 0.00 LO
  • with a relay connected, the 5.00V HI becomes 0.495V. 

Switching the J6 jumper: 

  • J6 pos 2-3
  • with RELAYS>0 LO, DIO_2 reads V = .008
  • with RELAYS>0 HI, DIO_2 reads V= 0.00
  • with a relay connected, the .008 becomes .007. 

I'm guessing I have something configured incorrectly. Can anyone advise? 

 

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

The USB-2408-2AO can indeed output 150mA on one pin but not simultaneously on two or more. The maximum rating for the whole port is 150mA. Please look at the specifications in the rear of the user manual. 

The digital output configuration is an open collector and acts like a switch. It cannot source or drive an external relay. An easy test is to connect a digital output to a digital input set to pull up.  Turning on the output acts like a short circuit and current flows from +5v through the 28k pull-up resistor to the ground. The result is the input reads a low condition. If you switch it to pull down, the other end of the 28k resistor is ground. Turning on the output acts like a short between two grounds and the input returns zero. 

Assuming you have a 12-volt relay, tie one end of its coil to a +12 power supply and the other to the digital output. Connect the 12-volt return to DGND.  When the digital output is turned on, the open collector transistor conducts, and current flows from +12 to ground, and the relay is activated.  Ensure that +12 volts divided by coil resistance divided by the number of relays will not exceed 150mA.

 

 

Link to comment
Share on other sites

  • 0

Thanks, JRys, this is helpful. 

16 minutes ago, JRys said:

The USB-2408-2AO can indeed output 150mA on one pin but not simultaneously on two or more. The maximum rating for the whole port is 150mA. Please look at the specifications in the rear of the user manual. 

Understood. My setup uses 6X 5V-35mA relays, so I'll be sure our software won't try to drive more than four at once. 

I got used to the USB-200 series on a previous project, where we were able to drive the same relays directly with the DOUTs. I think I'm understanding I need to treat these more like a transistor than a simple output driver. 

21 minutes ago, JRys said:

Assuming you have a 12-volt relay, tie one end of its coil to a +12 power supply and the other to the digital output. Connect the 12-volt return to DGND.  When the digital output is turned on, the open collector transistor conducts, and current flows from +12 to ground, and the relay is activated.  Ensure that +12 volts divided by coil resistance divided by the number of relays will not exceed 150mA.

OK, I believe that should look like this, with our 5V relays. I have an external 5V supply I'll be using--since there isn't measurement being done on the DIO circuits, it should be fine to gang my 12V, 5V, DGND, and Chassis ground all together? 

image.thumb.png.eadc4c20b4a63158f7b475f3516342b5.png

fig 4

Link to comment
Share on other sites

  • 0

Your 5-volt ground will establish the system ground for all the measurements. So, be careful not to cause a ground loop when attaching too many grounds.

From my observation, the relay isolates the 12-volt ground and shouldn't be connected to the device ground.

The USB-200 series digital output is a driver and can supply up to 24 mA per pin.

Link to comment
Share on other sites

  • 0

OK, got it. I tested this setup and determined it works--now to update some diagrams. 

While I have you on this topic, a last question: I have a similar issue on that previous project I mentioned. We want to switch that rig from USB-201s to USB-231s. Can I configure a relay setup with the USB-231 the same way as this USB-2408, or does the 2408's open collector enable that specifically? 

Thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...