USB Data Acquisition, Part 2

DN Staff

June 2, 2008

3 Min Read
USB Data Acquisition, Part 2

In the last "Tips" column, you learned a bit about how instruments can take advantage of the Universal Serial Bus (USB) to simplify connection to a host computer. Most new instruments comply with the USB 2.0 standard, which allows for a theoretical "high speed" data rate of 480 Mbits/sec or about 50 Mbytes/sec. But few instruments reach that rate due to overhead in instruments and host PCs.

One manufacturer of data-acquisition (DAQ) modules suggests a rate of 10 Mbytes/sec as more realistic. That rate may suffice for instruments with low sampling rates and for those that can buffer data and transfer it in bulk to a host PC. To overcome limits inherent in the USB, National Instruments, for example, developed a signal-streaming technique that markedly increase transfer rates. NI reports a data rate of 26 Mbytes/sec for multiple bidirectional streams. So at least one technique exists to increase USB transfer rates for DAQ equipment.

Some "intelligence" in a USB instrument also can help overcome bus-transfer problems by managing the flow of information during bulk transfers. Unlike high-speed isochronous transfers that can lose information, bulk transfers operate at a slower rate and transfer 512-byte blocks. Bulk transfers also provide error-detection and block-resend capabilities. To use USB timing efficiently, a first-in first-out (FIFO) buffer memory in an instrument can supply data at its output at one rate as it collects more data at its input at another rate.

In addition to acquiring and generating analog and digital signals, many USB DAQ modules provide counter/timer circuits that can measure time intervals, time events and accumulate counts.

In most cases, engineers use an external analog or digital signal to trigger module actions. Analog inputs trigger actions when a signal exceeds a preset limit. Digital inputs respond to a signal transition. After a USB DAQ module receives a valid trigger signal it can take a series of measurements or it can continuously measure at a preset sample rate. I recommend against trying to use a trigger on one USB instrument to trigger another USB instrument. You will get a varying lag in the trigger as it passed from instrument #1 to a PC and on to instrument #2.

Due to the latencies involved with USB transfers, don't rely on the timing of triggers sent from a PC to a USB DAQ module. Issue sampling commands from a PC when you just want to take a few measurements to ensure a DAQ module works. To simplify use of a USB DAQ module, vendors provide software that takes you though setup operations, tests module operations and offers basic data-acquisition functions.

You get almost as much flexibility in a USB DAQ module as you will find in plug-in cards for the PCI or PCIe bus. In addition, you don't have to open your PC to install USB modules and you can move them from place to place as needed.

Author Information

Jon Titus, a former designer and chief editor of EDN and Test & Measurement World magazines, remembers when "fast" signals operated at 10 MHz and programs came on paper tape.

Sign up for the Design News Daily newsletter.

You May Also Like