Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
16 ratings:
 2.31 out of 5     Rate this Document

Configuring NI Devices to be Open-Drain (Open Collector) or Push-Pull (Active Drive)

Hardware: PXI/CompactPCI>>Controllers

Problem:
What is open-drain and push-pull? Also, How do I configure the digital output lines of my NI device to be Open-Drain (open collector) or Push-Pull (active driver)?

Solution:
You should first check your devices user manual to ensure that your device supports both push-pull (also called active driver or sourcing) and open-drain (also called open collector or sinking).  The user manual should also contain what the default state for your device is.

First, let us briefly explain what open-drain means.  Open-drain (MOSFET) or open collector (BJT) are circuits that use a single resistor with a pull-down or pull-up resistor to transisition a digital line between a high and a low.  Basically, the circuit has a resistor between the path to ground or the path to 5V.  So when the transistor is off the the line will float to the high or low voltage.

Lets consider the case of using a BJT with a pull-up resistor. During a high, there is 0V to the base of the BJT. This causes an open circuit on the BJT which causes the line to be pulled high by the pull-up to 5V. With a high impedance load, you should see a full 5V across the load (the pull-up is 4.7k Ohm). During a low, there is 5V generated to the base of the BJT. This shorts the circuit to ground and causes all the current flow from the pull-up circuit to flow directly to ground. This gives you the 0V accross the load.

The push-pull, also referred to as the active-drive, works quite a bit differently. This circuit uses two transistors to determine between a high and low logic. For this system, there is typically two BJT's with one being an npn and the other being pnp. Take a look at the below schematic:

As you can see from the schematic, there are two transistors used to drive the output between the 5V's or ground. When Vin is low, the bottom BJT will be on and the top BJT will be off which will result in 0 Volts across the load. When Vin is high, the top BJT will be on and the bottom will be off which will result in 5 Volts across the load.

Note: The NI-USB 6008 has an output drive-type as always open-drain and cannot be changed to push-pull.

Using NI-DAQmx to change to Push-Pull Operation:

In LabVIEW you use a channel property node to configure the channel. After placing the DAQmx channel property node on the block diagram, click on it and select Digital Output» Output Drive Type as shown below.

Right click on the input input node of the DO.OutputDriveType property, and go to Create»Constant. The term Open Collector is DAQmx equivalent to Open-Drain and Active Drive is the DAQmx equivalent to Push-Pull.

In LabVIEW the channel property DO.OutputDriveType will not be visible unless the DAQmx Channel Property node is referenced to a device that support different output drive types. Alternatively, you can right click on DAQmx Channel Property and choose Select Filter... and Show All Attributes to see the property even if the required channel reference is not provided.

These VIs are all using the NI-DAQmx driver, so this functionality would be available in LabWindows CVI, Microsoft Visual Studio, and any other language that can be used to program with the NI-DAQmx driver. To locate the required function call search for Ouput Drive Type in the DAQmx API help.


Using NI-DAQmx Base to change to Push-Pull Operation:

If you are using NI-DAQmx Base you can set this property in the NI-DAQmx Base Configuration Utility. There is no way to programmatically set the output drive setting in NI-DAQmx Base. The Configuration utility can be found in the NI-DAQmx Base folder (typically Hard Drive»Applications»National Instruments»NI-DAQmx Base on a Mac, or /usr/local/natinst/nidaqmxbase/bin on Linux). Complete the following steps to change the output drive setting:
  1. Select Create New Task
  2. Choose Digital I/O as the acquisition task type and give the task a name
  3. After the task is created, select the Voltage Tab.
  4. In the Voltage Tab, there is a DIO Voltage Level option. For Open-Drain, use the 0-5V option. For Push-Pull, use the 0-3.3V option.


Related Links:
KnowledgeBase 3ESBHEL2: Missing Properties in DAQmx Property Nodes
Developer Zone Tutorial: Digital I/O Applications
KnowledgeBase 3MLFD5SE: Are my M Series Digital Outputs Line Driver, Open Collector, or Push-Pull Outputs?
KnowledgeBase 3JAF2BVB: What is the Difference Between a Line Driver, Open Collector, and Push-Pull Quadrature Encoders and Which One Should I Use? Entry
Product Manuals: NI USB-6008/6009 User Guide and Specifications


Attachments:


Output Drive Type.GIF


Report Date: 01/11/2006
Last Updated: 06/26/2009
Document ID: 3TAC230F

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit