Gotchas for USB Measurement

By Stephen Connors, Published with permission from Consulting Engineer, Data Translation, Inc., Marlboro, Mass.

USB provides test engineers with an inexpensive, easy-to-use, high-speed bus-integration standard for computer-based measurement systems. The standard, however, does not mandate signal-circuit isolation. This leaves those who would use USB for test and measurement applications open to a number of “gotchas”. To avoid problems, engineers need to understand isolation methods.

Engineers considering using USB to integrate computer based measurement systems need to understand isolation issues and how to deal with them before choosing their measurement hardware. They need to understand isolation issues so they can understand how external ground connections interact with, not only the computer hardware, but analog signal integrity as well. Isolation protects your PC from damage and preserves the integrity of the data by physically separating electrical connections between circuits, thereby eliminating potentially harmful voltage or current from flowing through your system.

As Figure 1 shows, a data acquisition module, whether based on USB or not, consists of two sections: a measurement section containing the analog front end and digitizing electronics, and a data communication section that transfers those signals to the host computer. In a non-isolated system, the measurement and data communications sections are both referenced to the same ground potential — the computer’s chassis ground. Designers of isolated measurement systems go to great lengths to ensure that there is no direct current path between the measurement and data-communications sections.

Figure 1: Data acquisition modules, whether built for PCI, USB or any other bus standard, have a communications section and a measurement section.

The USB standard does not mandate isolation. To do so would drive up costs unnecessarily. There is nothing in the standard requiring, promoting, or even suggesting that peripherals connected to the computer via USB be isolated.

The engineers who developed and now promote USB, however, know how important isolation can be for many potential applications — including computer-based instrumentation. In all of their seminars, technical writings and other communications, they strongly recommend isolation for non-Human Machine Interface (HMI) peripherals.

Potential Gotchas

The USB signals are on the order of 800 millivolts differential, which makes them low voltage differential signals (LVDS). As such, they are subject to interference from various external sources. These sources don’t cause problems for highly-shielded HMI applications, but they can trip up measurement systems that necessarily must electrically “touch” Units Under Test (UUTs) in the uncontrolled outside world. A mouse or key board is isolated by the plastic case.

There are five general classes of interfering phenomena that isolation helps shield your measurements from:

Electrostatic Discharge (ESD) is any discharge from a static source into your measuring equipment. Typically what happens is the application locks up and you have to close it down and restart it. If you have a gross failure, you can blue-screen your system or worse damage your hardware. International product standards, such as CE ratings, mandate ESD tolerance up to 4,000 Volts for products with exposed metal and air discharge of 8,000 volts for shrouded or plastic devices.

Ground Ambiguity results from signals in different circuits being referenced to different grounds. Even a data acquisition card has separate analog grounds, digital grounds, chassis ground (for the shielded cables), and power ground. When connecting your measurement system to the outside world, there is no guarantee that the UUT wasn’t mis-wired enough to apply 110 or 220 Vac into your analog ground or I/O signals. Even knowing there’s a solid wire between two “ground” points is no guarantee. Current flowing through a power-ground conductor can raise the voltage at the “hot” end enough to compromise your measurements or destroy your computer.

Ground Loops appear when there are multiple paths for signal and power supply currents to return to the power supply ground. Long cables act like antennas magnetically picking up any low-frequency electric fields that happen to be wandering around the neighborhood, as Figure 2 shows. Fields generated by electric motors, transformers, and even building wiring carrying power to run the microwave oven in the break room generate significant fields that ground loops can couple into your measurement system.

Figure 2: Ground loops can appear when spatially separated pieces of equipment share a common ground.

Ground and Common-Mode Noise arise when any of a number of effects push random currents into your signal reference, lifting both the signal high and signal low in unison, as Figure 3 shows. In extreme cases, surges large enough to damage equipment can occur. A perfect example of low-level common-mode noise appears when your analog signal shares power or ground with a large number of active logic gates or even worse relays with a potential back EMF. Each time a circuit opens or closes; it changes the load on the power supply and the current returning through the ground system. These rapid current variations induce voltage spikes that can amount to as much as a hundred millivolts across a circuit-board trace — enough to disrupt sensitive measurements.

EMI/RFI are extraneous high-frequency (tens of kilohertz on up) signals picked up by your analog measurement front end from long cables acting like antennas picking up any electric fields that happen to be in the neighborhood. While low frequency noise can only gain entry by magnetic induction, high-frequency fields can reach in through capacitive, inductive or conductive coupling. Once inside, they can jump from circuit element to circuit element. Not only can they play havoc with your measurement’s signal-to-noise ratio, they can get into your processor. If that on-board processor hangs, your measurement system can lock up. You’ll lose communication with the USB, and that’s when your application hangs!

Figure 3: Common-mode voltages move both sides of a balanced signal transmission line relative to ground.

Isolation Methods

Isolation refers to setting up a barrier to electrical current between one part of a device and another, while allowing certain interactions (e.g., signals and power) to pass. An extreme example is the plastic case and keys on your keyboard. They place an insulating barrier (the plastic) between your hands and the electric currents and voltages that make the keyboard work, while allowing mechanical signals (key presses) to pass.

To stop interference from the five phenomena listed above, isolation is needed between the measurement and data communication sections shown in Figure 1. The isolation barrier must allow power, control signals and data to pass, while decoupling the ground systems.

Figure 4 shows three primary methods of isolating measurement systems. Each has its particular advantages and disadvantages.

Figure 4: Three widely used isolation methods use non-electrical means to couple signals across an insulating gap: optoisolators use light; transformers use magnetic fields; and differential capacitive couplers use electric fields.

Optoisolators combine a light-emitting diode with a photosensitive transistor to send signals across an isolation gap in the form of light. These devices are especially useful for passing digital signals, but not power. They have a particular advantage in that they do not use any power when in their off state. This is important considering that isolated power is expensive and supply efficiency is typically 75%. Optoisolators, however, introduce propagation delays on the order of tens of microseconds as well as significant jitter.

Transformers provide isolation via magnetic coupling. There’s no DC electrical path through a transformer. Transformers can pass enormous amounts of power, especially at high frequencies, and do so fairly efficiently, so they are particularly useful for providing isolated power or any highly repetitive signal, such as clock signals. Transformers also introduce no jitter. They are, however, relatively large and heavy compared to integrated circuit components and are not amenable to solid-state fabrication techniques. Additionally, the transformer is a two way street for noise pick-up.

Differential capacitor coupling (DCC) makes use of the fact that capacitors are quite good at passing AC signals, but simply will not pass direct current. The major drawbacks to DCC is propagation delay and jitter. DCC is excellent for isolating high-speed digital data paths.

Isolation Improves Measurements

Figure 5 shows a representative architecture for an isolated USB module. The data communications side has a USB chip along with a processor that mediates the communications from the host computer across the isolation barrier to the measurement section. A second processor (a CMOS programmable logic controller — CPLD) controls the data acquisition activity in the measurement section.

Figure 5: To isolate a USB measurement module, designers put an isolation barrier between the data communication and measurement sections, and add minimal processing power on the isolated side.

Before anything can happen on the measurement side of the isolation barrier, you have to get electrical power across to energize the circuitry. A switching power supply (not shown in the figure) uses transformer coupling to accomplish this task. On the non-isolated side, a DC-to-AC converter (basically an oscillator running at a few hundred kilohertz) provides AC power to pass through the transformer. On the isolated side, a rectifier and filter convert the AC power back to DC.

With the measurement circuitry energized, the non-isolated processor can set up the measurement parameters, such as gain, sample rate, channel scanning, etc. and load them into the CPLD memory. It sends these control and set-up signals via optoisolators.

Finally, the measurement system acquires the data. The analog section makes the measurements, which the digitizer converts to digital signals for the CPLD to pass back over the isolation barrier via DCC. On the non-isolated side of the barrier, the processor takes that data and passes it on to the host computer via USB. The data arrives safely and in good condition because the isolation barrier effectively decouples the measurement ground from the computer’s power supply and chassis ground.

With the computer and measurement grounds isolated, you are free to reference your measurements to the proper point on the UUT, or even allow it to float. Should the UUT receive an ESD jolt, for example, the isolation system allows the measurement ground to float up with the UUT ground until the UUT’s static-dissipation system bleeds off the charge. If the UUT doesn’t have a static-dissipation system, the isolation barrier prevents that failing from affecting the measurements or damaging anything in the measurement system.

Ground ambiguity is eliminated because the measurement reference can now float with the UUT reference. Similarly, ground loops are less of a problem because USB allows you to move the analog front end closer to the UUT, eliminating the need for long signal leads.

While isolation won’t eliminate common mode voltages, it allows the measurement reference to move with them. The voltages are still there, however, they don’t affect the measurements.

It Gets Better!

Isolating your measurement system lets you apply measurement techniques that are not possible with non-isolated measurement systems. Figure 6, for example, shows a situation where you want to measure the voltage output of, say, the fortieth in a stack of eighty 1.25 VDC fuel cells.

Figure 6: Isolation allows you to make floating-ground measurements instead of differential measurements referenced to ground.

Non-isolated measuring equipment would force you to make a differential measurement between 48.75 V and 50 V. The digitizer’s dynamic range would have to be better than 50 V. Assuming that the analog front end has a calibrated gain setting for 50 V and the digitizer has 12-bit resolution, the digitization error is 0.012 V, or 1% of the measurement. (50/4096 = 0.012V)

Having isolation in your USB module allows you to use a single-ended floating-ground technique with the analog ground connected below the 40th cell. The dynamic range only needs to be at least 1.25 V. The analog front end above would likely have a 5 V gain setting available. Using it would provide a digitization error of 0.0012 V, or 0.1% error.

Similarly, isolating your measurement section allows you to apply a host of classic in-circuit measurement techniques, such as guarding, 4-wire Kelvin, back driving and so forth, which just aren’t possible otherwise.

Engineers wanting to use USB to integrate their computer-based test and measurement systems cannot take measurement-circuit isolation for granted. It is up to you to ensure that the USB data acquisition module you select incorporates isolation technology. Because isolation is expensive to engineer into a module, companies that make the investment are motivated to tell you about it. So, look at the specifications. If the literature doesn’t say it’s isolated, it probably isn’t. Don’t get zapped!

Why consider USB for computer based measurements?

Expansion slots in personal computers are rapidly going away, while USB ports are multiplying. Just a few years ago, a new PC would come equipped with, if you were lucky, two USB ports. Today, they typically arrive with four or more. This reason alone is enough for users of test and measurement equipment to consider switching from PCI to USB to interconnect their computerbased instrumentation system components.

In addition, there are a number of USB features that make it desirable as an instrumentation integration standard:

  • Plug-and-play hardware connection — You don’t have to open your PC any more to plug an expansion card. You simply plug your USB module into the external port. You don’t have to power it down!
  • Keep measurement circuitry out of the noisy environment inside the PC case — This is a very important consideration when you consider that you now have processors in the PC case going at over a gigahertz that look like pure noise sources to an analog data acquisition front end.
  • Move the measurement circuitry closer to the UUT — Putting the instrumentation analog front end on a long (up to 5 meters) cable allows you to shorten your interconnect wiring to the UUT.
  • High-speed data transfer — Maximum data transfer rate is 480 Mbps for Hi-Speed USB 2.0.
  • Consumer-oriented standard helps drive down cost — Taking advantage of the fact that that USB chips are manufactured for the consumer market drastically reduces component costs for instrumentation equipment manufacturers. They are then able to pass these savings on to their customers in the form of lower prices.
  • Easy portability — USB allows test engineers to move instrumentation equipment from location to location more easily. Instead of having to move entire host computers, they just unplug the USB module and plug it into a computer at the new location.
  • Easy expandability — Most currently available desktop PCs have more USB ports available than PCI or ISA expansion slots. In addition, inexpensive external USB hubs are available from consumer electronics stores, allowing you to expand your USB-based instrumentation system to up to 127 devices.
  • Simple power connections — The USB specification mandates that the host provide 5 VDC power at up to a total of 500 mA to peripherals. Many external hubs add to the system’s current capacity as well.
  • Laptops and Isolation

    If you use a laptop computer as your data acquisition host, and don’t plug it in to change the batteries while making your measurements, you have an isolated system, even if your USB measurement module is non-isolated. Whatever ground you connect your module to becomes the reference potential for the entire laptop. Keep in mind, though, if you plug any peripheral, such as a printer, into the laptop you ruin that isolation.