Jeffrey D. Lind, Compliance West USA
As any laboratory engineer knows, harsh, noisy lab environments often result in data loss and/or resets of test equipment or host computers. A potential solution to this challenge is the successful implementation of mains power distribution in the lab, and an isolated serial/USB design for laboratory computer systems. This will allow the lab to utilize the strengths of both the computer’s USB interface and the laboratory equipment’s existing serial interface technology.
The advent of USB controlled devices in the laboratory has been a boon in many ways. “Plug and play” devices make installation easy, and ubiquitous USB connectivity on modern laptops and desktop computers allow powerful data processing to be available easily. The speed of modern USB connections, USB 2.0 and above, allow real-time data collection. The hot-swappable feature allows technicians to change setups at will without worrying about restarting the computer.
USB connectivity does not always need to be used for real-time data collection. The convenience lends itself to other uses as well. For simpler installations, the interface between the test equipment and the personal computer is used only for control of the test equipment, to provide test equipment status for display on the computer screen for operator convenience, or for basic housekeeping information, in which the computer is updated by the test equipment regarding its actions. In this case, the speed advantages of the USB interface are not realized, but the convenience of connection still makes the USB interface a good choice.
In many cases, operators who are rushed for time may not investigate a non-USB connection because these non-swappable interfaces require research or reboot, taking valuable time. If an operator is presented with the USB interface, which is a known commodity, he may be more willing to plug it in and enjoy the conveniences that were written into the interface.
In addition, the serial ports on computers are no longer standard. In most cases, the serial and parallel ports which used to be supplied have been deleted in favor of more USB ports to connect to keyboards, printers, monitors, thumb drives and most everything else. So, in addition to the conveniences of the USB interface, there is a practical requirement to use USB connections because other connection protocols are simply disappearing from personal computers.
With this set of features and conveniences, as well as the issue regarding disappearing alternatives, the USB interface should be making RS-232 and GPIB installations obsolete. However, this is not the case at many laboratories and these older installations are still the norm.
As can be seen from Table 1, the existing laboratory interface protocols all suffer from disadvantages which affect their usefulness in a laboratory environment. USB can offer distinct advantages but is not robust. The USB reset can exhibit loss of communication between the test equipment and the computer, or in some cases a reboot of the personal computer connected to it. These conditions would preclude the USB interface from consideration in a laboratory environment, if the advantages were not so great. The usefulness of the USB interface certainly merits work toward making the interface more robust, so it can be used with interference-causing equipment such as surge generators, hipot testers and other similar equipment.
DESIGN CONSIDERATIONS
Serial interfaces use positive and negative voltages for data transmission, so the effects of changes in ground potential are negated. This is a larger problem for USB, because the data transmission uses a positive voltage and ground only. Therefore, noise and ground potential changes have a greater effect, and this is the reason that USB interfaces have to be more carefully implemented for a good result.
In the days of RS-232 interface communications, there was 6 volts minimum swing between binary zero (-3V maximum) and binary one (+3V minimum). Since the voltage has to swing through ground potential, a shifting ground voltage had little effect on RS-232 communications. RS-232 did not have any error checking protocols but because of the robust hardware solution, it was not needed to make reliable connections. However, even with this robust signal communication, a shielded cable was required, as external noise could overpower the RS-232 communication. Clearly, a more sophisticated protocol with error checking was going to be needed as noise in the laboratory increased.
USB communication has many protocols, and many incorporate error checking, which should have been a boon to communication in noisy environments such as laboratories. Unfortunately, USB communication design presents challenges for interface designers and users. Since the difference between a binary zero (+0.3 V maximum) and binary 1 (+2.8V minimum) is only 2.5V, and the because the zero is approximately ground referenced, the USB interface is more susceptible to disconnects and resets, which could result in a complete hardware collapse, where communication between the test equipment and the computer is totally lost. This will result in loss of control of the tester, and loss of data across the link. In general, the designer of the USB interface of the equipment must select a protocol that will detect a disconnect, reconnect the interface, and make sure the USB connection was recovered. Further, its design must include optical interface(s) to prevent varying voltage levels from causing data loss. Some interfaces use a dedicated microprocessor in order to allow even more isolation between the computer and the test equipment.
GROUNDING OF TEST EQUIPMENT AND COMPUTERS
Even the most isolated design will still have to deal with the equipment grounding conductor, or ground lead. In the case of a powerful surge generator, the ground plane can be displaced by as much as a few volts, which could cause interface disconnection and data loss. This happens because the surge tester can deliver thousands of amps in a few microseconds and this energy needs to be dissipated to the building ground. Any high resistance connections within the test setup or in the building grounding system itself can cause a rise in potential of the grounding lead for a short time while the energy is dissipated.
To combat this problem, it is necessary to make sure the building grounding system and the test setup ground leads are all in working order and firmly connected together. This step will solve many data loss and reset problems between computers and general test equipment, but in the case of surge test equipment, we recommend separation of the power lines (mains) of the computer and the test equipment, as shown in Figure 2. This step allows the ground current to flow separately from the test equipment to building ground, and not influence the ground potential of the computer. A separate ground for the test equipment will solve most USB reset problems. In order to clearly illustrate the point, Figure 3 presents an incorrect mains implementation, which has a greater chance of causing resets in the USB interface.
Figure 2. The proper method of connecting mains power to a computer-controlled surge tester. The surge tester and the computer are provided with individual paths to ground.
Figure 3. Improper mains connection method. The surge tester and the computer share a grounding path. If the ground voltage rises due to the surge tester output, the USB connection may suffer a reset, and the computer could be damaged.
USB-SERIAL INTERFACES
In many cases, it is not possible to run separate mains circuits to laboratory test equipment to prevent resets of the USB interface. There is another method which has solved problems, and that is to employ a hybrid interface, consisting of a RS-232 serial interface on the test equipment with a proprietary circuit which changes the protocol from RS-232 to USB before presented to the computer. This allows all the benefits of the USB interface to be used by the personal computer, and also allows the robust RS-232 interface to be used on the test equipment.
Location of the protocol change is important. Because of the strength of the RS-232 communication, the change to USB should be done as close to the computer end of the cable as possible. In addition, optoisolation of the interface change is imperative. This unfortunately leaves most commercial solutions out of consideration, as their unisolated interface changer is located at the RS-232 end of the cable.
SOLUTION RECOMMENDATIONS
We have found that to be absolutely sure the USB interface will be robust, it is necessary to implement separate mains voltage sources for the test equipment, away from the mains voltage of the computer, in accordance with Figure 2 of this article, NOT Figure 3. In addition, an isolated hybrid interface consisting of RS-232 protocol at the test equipment end and USB protocol at the computer end should also be employed. The isolated interface should be located as close to the computer end of the cable as possible.
JEFFREY D. LIND, president of Compliance West, USA, has 33 years of extensive electrical engineering expertise. Lind launched his career in the electrical product safety industry working at Underwriters Laboratories (UL) from 1976-1982, doing project engineering and follow up services management. He then lent his skills to Atari™ as a product safety engineer for a year. Shortly after moving to San Diego in 1983 to work with Sega Gremlin™, Lind decided to branch out on his own and launched Compliance West.