Next-generation data acquisition

National Instruments Aust Pty Ltd
Wednesday, 07 July, 2010


Over the past 20 years, data acquisition has evolved from a limited, inaccessible set of technologies into an integrated and intuitive platform for high-performance measurements. With the software-centric approach of graphical programming and modular, PC-based hardware, engineers and scientists can rapidly develop powerful, flexible and highly customisable DAQ systems.

The ability to integrate USB and Wi-Fi measurements within an application opens new doors in developing DAQ systems.

For example, SAPHIR, a National Instruments alliance partner based in France, recently developed a USB-based advanced sound and vibration monitoring system to help its construction industry clients carry out structural monitoring and comply with neighbourhood noise regulations. It recently extended the system using Wi-Fi DAQ.

“We could extend our monitoring stations by up to 100 m by using a remote WLS-9163 carrier with the 9234 instrumentation, which provides IEEE 802.11g (Wi-Fi) wireless connectivity for maximum flexibility. The wireless architecture offered a cost-effective extension to the system,” he said.

From environmental monitoring to mountain bike testing, USB and Wi-Fi DAQ are becoming increasingly popular. So how have these DAQ technologies developed and what should you consider when implementing them?

DAQ often involves multiple tasks, such as analog I/O, digital I/O and counter/timers running simultaneously. To achieve this, a DAQ device must be able to support multiple streams of data at the same time and have the ability to quickly move data to and from PC memory.

Until recently, PCI was the most widely used data acquisition bus and it is still used in the highest performance applications. PCI is suitable for DAQ, providing high bandwidth, low latency, bus mastering and direct memory access (DMA) channels, allowing direct streaming to memory.

Additionally, with the introduction of PCI Express, it is now possible to achieve 1 GBps dedicated per-slot per-direction bandwidth for very high speed and high channel count data streaming applications.

However, when portability and ease of deployment are more important than ultimate speed, many engineers now choose to use USB and Wi-Fi.

USB makes it easy to add DAQ functionality to a desktop or laptop PC. The common availability of USB, with more than two billion ports delivered worldwide, makes it an obvious choice. Now engineers and scientists can use USB DAQ to quickly share instruments, and systems can become more mobile and compact.

USB presents its own challenges for measurement applications. For example, the 60 MBps theoretical bandwidth of high-speed USB should be sufficient for most DAQ applications; however, there are several obstacles to overcome in designing USB DAQ hardware and software to approach this theoretical limit.

USB is a host-driven serial protocol meaning that the operating system must initiate any data transfer request. This asynchronous data transfer will lower the determinism and increase the CPU overheads.

One way to address this is to buffer the data in additional memory on the device. This helps overcome data loss, but increases latency and device cost. What is really needed is a way to support multiple DAQ data streams over USB. On many devices this is limited by the typical onboard system architecture.

One limiting factor is often the processor used to connect a DAQ device to the USB endpoint. On standard USB systems, this is typically an instruction-based, single threaded chip that acts like a switch.

It presents a bottleneck for data, allowing only one stream at once. In order to decrease latency and increase throughput, the host must be able to continuously send data requests to the device.

To fulfil these requests, the device must also make data available at the USB endpoint as fast as possible. The traditional ‘single stream’ architecture cannot do this, but these issues are addressed with new NI USB Signal Streaming technology.

 
Figure 1: The transmission architecture of a DAQ device using standard USB.

 

 
Figure 2: The transmission architecture of a DAQ device using NI Signal Streaming on USB.

National Instruments’ USB signal streaming avoids processor-based switch-like behaviour in favour of a multithreaded approach. Working with the STC 2 system timing controller, the signal streaming controller supports four high-speed DMA channels delivering data directly into four USB endpoints.

This has the effect of freeing up the processor so it can now accept higher level commands from the host and translate these into the dozens of register-level commands onboard the DAQ device. This minimises the volume of commands from the host and therefore decreases latency.

Signal streaming has enabled a single-point acquisition performance increase of 1600% for analog input and 250% for analog output. This means for multiple bidirectional data streams running concurrently, these DAQ devices can achieve over 26 MBps.

Despite these developments, there is still a 5 m limit on USB cable length. This length is limited by a cable delay specification of 26 ns. As USB uses source termination and voltage mode drivers, this delay is essential to avoid reflections. The 5 m length is a real physical maximum. Assuming worst-case delay times, a full-speed device at the end of five hubs and cables has a timeout of 280 ps. Reducing the margin to 0 ps would only give an extra 0.05 m. This means USB is impractical for such things as distributed environmental monitoring.

To extend a measurement system over longer distances, the traditional solution would be to use one of a range of cabled industrial networks, increasing cost and complexity.

As a result, there is now great interest in using wireless as an alternative.

The challenge is to implement this new technology, without losing the ease of configuration of USB. This is not just a concern for the designers of new applications, as there are many existing applications that can be extended with wireless.

 
Figure 3: WLS-9163 containing NI-9234 dynamic signal acquisition module.

SAPHIR’s vibration monitoring system mentioned above was initially implemented using USB but the expense of needing a laptop at every test location prompted the move to Wi-Fi. This move needed to be swift, easy and economical.

Wireless sensor networks have been around for a number of years, but integrating them has often involved bespoke hardware and proprietary software. This complicates setting up even simple applications and thus requires greater expense and engineering expertise.

Additionally, many existing wireless sensor technologies are geared towards single point measurements, rather than streaming waveform acquisitions.

The ideal wireless DAQ solution should provide performance, ease of use, reliability and security.

For these reasons, NI chose IEEE 802.11b/g with 128-bit AES encryption and IEEE 802.11i(WPA2) support. The broad adoption of IEEE 802.11, and its up to 56 Mbps speed, provides ease of use and sufficient performance to support streaming 100 kS/s acquisitions.

IEEE 802.11 also contributes to reliability. The IEEE 802.11 standard specifies an ‘over-the-air’ interface between a wireless client and a base station or access point, as well as among wireless clients.

The standard specifies both the physical layer and the media access control layer, and is tailored to resolve the compatibility between manufacturers of wireless equipment.

Assembling a wireless DAQ system that does not comply to the IEEE standards can require huge effort and result in unreliable measurements. So what is the IEEE 802.11 standard and what makes it so essential to DAQ?

The basic access mechanism for IEEE 802.11 is a carrier sense multiple access with collision avoidance (CSMA/CA) protocol, similar to ethernet. Any device wishing to transmit, first monitors the physical network; if it is busy (eg, another device is transmitting), it defers and re-transmits at a later time.

If the network is free for a predefined time period (DIFS - distributed inter frame space), it begins transmission. A problem occurs when two devices sense the network is free simultaneously. Each then proceeds to transmit causing a collision.

These collisions can be detected and countered easily within a wired system, such as ethernet, as all devices can ‘hear’ each other. In a wireless network, a device may sense a free medium for transmissions despite the fact that the desired receiver (placed in a central location) may be busy receiving from another device that is out of range of the first.

In normal operation, the receiver performs a checksum on the message and then sends acknowledgement back to the device. If a sending device does not receive acknowledgment it will attempt to resend even though the medium ‘appears’ to be free.

This kind of data protection protocol is essential for DAQ applications, as unlike wireless music or video streaming, any loss of data can cause anomalous results and invalidate any measurements taken.

Wireless products that conform to the IEEE 802.11 standards can be considered both reliable and flexible, but in the 400 pages of the standards documentation nothing is said about security.

Many applications require security for their data transfer, whether for reasons of national security or to hide data from potential competitors. The language of wireless security can be complex and is littered with even more acronyms. All security is based on various combinations of data encryption and user authorisation.

There have been several encryption standards. First there was WEP (wired equivalent privacy), then WPA (Wi-Fi protected access), but both of these have been compromised. The latest Wi-Fi products are compliant with WPA2 and use AES (advanced encryption standard). This uses a 128-bit cipher that is more difficult to crack than the algorithms used by WEP and WPA.

In fact, the National Institute of Standards and Technology in the US chose AES as the encryption standard that is required for all US government agencies. WPA2 has proved itself as stable and secure for all applications including Wi-Fi DAQ.

SAPHIR opted to use the WLS-9163 Wi-Fi carrier as it complied with IEEE 802.11, as well as WPA2 security. Using the same NI-DAQmx drivers as its previous USB system, it was able to upgrade to Wi-Fi with no code changes. Both the USB and Wi-Fi carriers also used the same C Series platform for acquisition and signal conditioning modules, thus minimising hardware expenditure. This made the transition to the more practical and powerful Wi-Fi system simple and quick.

Wi-Fi can now be relied on as a simple, secure DAQ option for scientists and engineers in any industry. It has been employed successfully to stream dynamic data in applications where cabled solutions are impractical, impossible or overly expensive.

Scientists and engineers today no longer have to accept bus-imposed limitations on their applications. Instead, through flexible software and easy-to-use drivers, developers can specify the bus of their choice to fit their application needs, from PCI Express with high throughput to USB with its easy plug-and-play configuration, or Wi-Fi with its high flexibility and mobility.

The choice now lies with the domain expert to specify a DAQ system which exactly meets their needs.

By Graham Green, applications engineer, National Instruments

Related Articles

Ricoh chooses u-blox module for long-lasting GNSS performance

The Ricoh Theta X camera incorporates the ZOE-M8B GNSS module from u-blox, allowing users to...

Single-step 3D printing method to create tiny robots

The breakthrough enables the mechanical and electronic systems needed to operate a robot to be...

Fast inspection technique for modern semiconductor devices

Researchers developed a novel approach to inspect and measure critical dimensions of...


  • All content Copyright © 2024 Westwick-Farrow Pty Ltd