You are on page 1of 6

1344

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 57, NO. 7, JULY 2008

USB Sensor Network for Industrial Applications


Alessandro Depari, Member, IEEE, Alessandra Flammini, Member, IEEE, Daniele Marioli, Member, IEEE, and Andrea Taroni, Member, IEEE

AbstractThis paper proposes a universal serial bus (USB) solution for sensor networking. First, network architecture has been presented to have, as its primary objective, its integration with existing infrastructure. For this reason, a USB-to-Ethernet gateway has been introduced. Then, many aspects of industrial applications have been considered to realize a suitable solution. Insulation problems and low-cost implementation have been tackled. Working prototypes of each network component have been dened and realized: USB host + gateway, USB insulator, and USB hub. Several commercial USB devices can be used as sensors. Finally, some experiments have been carried out: Timing performances, network activities, and power consumption have been tested. Index TermsEthernet, galvanic insulation, smart sensor, universal serial bus (USB).

I. I NTRODUCTION HE UNIVERSAL serial bus (USB) [1] is one of the most widespread technical innovations in personal computer and home consumer applications over the past few years: Keyboards, mouse devices, printers, webcams, and several other computer peripherals are available with this type of connection. In addition, USB is also employed in several measurement applications [2], [3]. This success is due to some bus characteristics, such as simplicity, plug & play features, hot plug support, and, particularly, the possibility of supplying power to the devices. In industrial application projects, as well as consumer projects, cabling costs and maintenance are important factors. Reducing the need to carry power supply to peripherals can yield several advantages. Other advantages are attained by the USB transmission type, which is differential and therefore offers good noise immunity. In addition, the quick diffusion of USB has led to a drastic fall in component prices. All these characteristics make USB suitable to be used as a simple sensor network in industrial environments. In fact, if compared to eldbuses (PROFIBUSDP, DeviceNet, etc.), it is quite prevalent in every personal computer (PC; desktop, portable, industrial, PC board, etc.). Moreover, with respect to widespread Ethernet, it can supply power to sensors and actuators if their current consumption does not exceed 500 mA (as dened by USB specications),

and up to now, it is more diffused and of low cost with respect to new Ethernet 802.3af. Today, available USB sensors [4] are generally designed for home or consumer applications, whereas eldbuses are normally used in interface sensors. A possible employment of USB as a eldbus could allow clear advantages in terms of cost, standardization, and wiring reduction in simple and small systems. Nowadays, this objective has still not been realized because of the requirements imposed by industrial applications (protection, insulation, and packaging). The objective of this paper is mainly to propose a USB-based sensor network architecture. Specically, the most critical problem about safety and insulation is experimentally approached by the authors to demonstrate the effectiveness for an industrial environment. II. P ROPOSED A RCHITECTURE The proposed sensor network with USB connectivity is depicted in Fig. 1. The host manages communication with USB devices and links the network to a higher level unit. Therefore, the host must have appropriate interfaces with, for example, eldbus- or Ethernet-based factory networks. USB specications dene the typical USB network topology as a tiered-star architecture. To create this kind of architecture, USB hubs are needed. These components are easily available, both as commercial products and as ad hoc solutions. In fact, we can nd several commercial off-the-shelf chips that implement all USB hub functionalities and allow the creation of the desired hub with few external components. USB devices are the terminal users of the USB network. They can be specic USB transducers or USB smart sensors that are compliant with IEEE 1451 [5], which we call the USB Smart Transducer Interface Module (U-STIM) [6]. In industrial applications, it is necessary to take any precaution to avoid damages due to the particularly hostile environment. USB was not developed to operate under these working conditions. Hence, it has no safety measures against failures. For instance, a short circuit in a network node could seriously damage others nodes. Usually, USB devices mostly suffer from a hostile environment, whereas the USB host is generally located in a protected area. For this reason, network devices should be isolated from each other by means of a galvanic insulator (hereinafter called the USB insulator). III. N ETWORK C OMPONENT A USB network is composed of several parts that must be adapted for industrial needs. In the following, a detailed

Manuscript received March 14, 2006; revised November 30, 2007. A. Depari, A. Flammini, and D. Marioli are with the Department of Electronics for Automation, University of Brescia, 25123 Brescia, Italy (e-mail: alessandro.depari@ing.unibs.it). A. Taroni is with Carlo Cattaneo University, LIUC, 21053 Castellanza (VA), Italy. Color versions of one or more of the gures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identier 10.1109/TIM.2008.915487

0018-9456/$25.00 2008 IEEE

DEPARI et al.: USB SENSOR NETWORK FOR INDUSTRIAL APPLICATIONS

1345

Fig. 1.

Proposed industrial USB network.

Fig. 2.

Scheme of the proposed USB host with Ethernet LAN interface.

description of each component is presented according to the proposed architecture. A. USB Host In an industrial integrated environment, the USB host must be provided with a high-level network interface. Ethernet can be a valid solution because of its great diffusion, even in industrial plants. Supported protocols could be the well-known Transmission Control Protocol/Internet Protocol (TCP/IP) or emerging industrial protocols, such as PROFINET [7] or Ethernet/IP [8]. The use of a PC system to perform the functionalities of the USB host and the gateway does not seem to be a good solution since the primary objective is a low-cost architecture. The proposed USB host solution (Fig. 2) consists of a microcontroller-based system. A microchip 8-bit microcontroller (PIC 18F452) has been used to manage both the interface with the sensor network and the bridging with the high-level network. The USB bus control is achieved by means of a host controller (Cypress SL811HS), whereas the LAN interface is remitted to a 10-BaseT Ethernet controller (Crystal CS8900A). The interconnections between the microcontroller and these devices have been attained by means of the implementation of parallel buses using the microcontroller ports and a little external glue logic. All these components are of low cost and are easily available, so the global USB host is a cheap and compact adapter. The microcontroller software consists of two different parts: One manages the USB dialog, and the other one is related to the communication with LAN. Particularly, a well-tailored TCP/IP stack has been implemented to allow data exchange between the users on the LAN [9].

The USB host software handles communication with USB devices, so it must do several things. Detect if a new device is connected and consequently congure it with appropriate parameters, recognize if a unit is detached, and provide or receive data from the USB network. For these purposes, a complete implementation of the USB device driver is not needed. In fact, the host does not directly manage data, which must be exchanged with the high-level LAN (e.g., Modbus over TCP/IP). In the proposed host, a dual-port memory mechanism has been used for data exchange. The host simply extracts data from incoming TCP packets or inserts data into outgoing packets, without performing any operation on data meaning. B. USB Insulator It is currently very difcult to nd commercial low-cost USB insulators, because USB is not commonly used for applications requiring a particular degree of protection. Anyway, the implementation of a USB galvanic insulator is compulsory to protect USB devices, and our proposed solution is depicted in Fig. 3. Signal line insulation is achieved by means of optoelectronic devices (optobarrier). A programmable logic device (PLD) manages the bidirectional signal ow. In fact, USB signal lines are bidirectional, and a logic arbiter is necessary to avoid collisions. The PLD must handle the signals from source to destination in real time, because the USB insulator propagation delay must be limited. The decisional logic always listens to both the host and device sides. When one starts the packet transmission, the communication in the opposite way is automatically temporarily turned off, and data coming from the transmitting unit are replicated on the other side. In the realized prototype, a 48-MHz clock allows input line oversampling. Therefore, the length of bit time is preserved at low speed (1.5 MBd) as well as full speed (12 MBd). This arbiter was developed using a Cypress CPLD (CY37256V). The insulator must appear at the USB host side like a device and at the device side like a USB host. When no devices are attached, the insulator operates like it is disconnected from the bus. When a device is attached, the insulator recognizes the link speed and congures its host interface to emulate a device connection with the same speed.

1346

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 57, NO. 7, JULY 2008

Fig. 3. Scheme of the proposed optical USB insulator with both dcdc converter and external 5-V power supply.

Fig. 4. Pull-up and pull-down resistors in full-speed and low-speed connections.

The host-side transceiver is a MAX3343 from Maxim. It has an integrated pull-up resistor that can be connected to the D+ or D lines, as requested by USB specications for the speed selection (Fig. 4). This is achieved by means of a signal driven to the desired value by the PLD, according to the connected device. An additional line allows the resistor to be disconnected from both signal lines, which happens when no devices are attached to the bus. The device-side transceiver is a 1T11A from Fairchild. It has no integrated pull-up resistor for the speed selection, but in this application, it must be congured to act as a host transceiver by means of two external pull-down resistors (Fig. 4). The optobarrier is realized using HCPL2430 optocouplers from Agilent. These components have been adopted due to the high-speed characteristics (20 MBd) needed for the full-speed connection. The power supply insulation is realized using a dcdc converter with insulated input and output. A high-efciency converter is required to transfer the requested power to the devices. Alternatively, an external power supply could be used if the insulator cannot receive from the USB host the sufcient current to supply itself and the attached devices. The model used in this prototype is a TEL 3 0511 from Traco Power, which

Fig. 5.

Scheme of the insulated USB hub.

is a 5-V-to-5-V dcdc converter with insulated input and output and efciency on the order of 70%. C. USB Hub USB hubs are requested by USB specications to allow the connection of more than one USB device. They can also be used to extend the maximum link length and, therefore, the size of the network. In fact, a single USB cable length is limited to 5 m, and using the hubs, it is possible to reach distances of 20 m between the host and a device (USB specications limit the number of cascade hubs to three).

DEPARI et al.: USB SENSOR NETWORK FOR INDUSTRIAL APPLICATIONS

1347

A. Required Resource With regard to the USB host, the microcontroller software takes about 70% of the total code memory space (40 kB). Most of this space is taken by the Ethernet-side operations (60%), whereas only 10% concerns the USB management. The USB protocol is easier to implement than the TCP/IP stack commonly used to exchange data through Ethernet. The VHSIC hardware description language (VHDL) program for the USB Insulator PLD takes about 80 macrocells of the 256 available in the employed device (CY37256V); implementation in a smaller device, such as CY37128V, is therefore possible. Different devices can be included in the proposed network. To have an idea of the USB interface complexity, a U-STIM occupancy is on the order of 1000 macrocells. B. Timing To experimentally evaluate delays introduced by the realized USB host, a point-to-point connection has been established with commercial low-speed and full-speed computer peripherals. An Agilent 1692A logic analyzer has been employed to measure time intervals. Experimental results show that time delay tsoft between the software transmission command (issued to the analyzer through a dedicated line driven by the microcontroller) and the effective packet transmission on the USB bus is on the order of 50 s, as shown in Fig. 7. This delay, which, in this particular case, is estimated when connecting a low-speed device, is due to both the software and intrinsic delay of the SL811HS host controller and is independent of the device speed. Ethernet communication timing has been evaluated using the Internet Control Message Protocol network service ping. The realized Ethernet gateway has been connected to a PC, which sends several ping requests to the device under test and estimates the ping reply delay. In a not-so-busy 10-BaseT network, the average ping time, with a data payload of 32 bytes, is less than 2 ms. Additional tests have been performed to estimate the protocol stack execution time, which has been measured on the order of 2 ms. It should be noticed that performances required by sensor networking are generally on the order of tens of milliseconds. Simulation tests that are related to the USB insulator show a delay between the input and output signals of about 75 ns, as shown in Fig. 8. This delay is related to the PLD logic only since it has been evaluated using the simulator included in the PLD application development tool (Warp from Cypress), which does not include models to simulate the transceivers and the optocouplers. The global delay, including the PLD logic arbiter, the USB transceivers, and the optobarrier contributions, is shown in Fig. 9, which reports a host transmission in a full-speed link. The delay has been estimated using the Agilent 1692A logic analyzer, directly detecting the USB signals from the insulator USB connectors. It is clear that data coming from the host are repeated to the device without any manipulation. The overall delay is on the order of 160 ns, which represents about twice the bit time in a full-speed transmission and about

Fig. 6. Scheme of the proposed IEEE1451.2 smart sensor with USB connectivity (U-STIM).

In the proposed architecture, the USB hub can be a commercial, as well as a self-made, system. The latter solution is allowed by the availability of low-cost and exible integrated circuits that implement all the USB hub functionalities. In addition, with this solution, it is possible to realize an insulated USB hub by placing the insulation blocks on the same unit of the hub (Fig. 5). Therefore, the network is simpler, because there are fewer units, and the devices can be directly connected to the USB hub. The realized USB hub employs a commercial ISP1122 by Philips. It can operate in self-powered or bus-powered mode and supports full-speed and low-speed devices (USB 1.1). The hub controller manages all operations, and only a few external components are needed, mainly for the regulation of power to the devices. In the realized hub, four downstream ports are available. D. USB Device Up to now, USB transducers for industrial applications are not diffused, and USB connectivity could be useful for PC peripherals, such as webcams and printers. In the past, some sensors with USB connectivity have been developed for home automation and Heat Ventilation and Air Conditioning (HVAC) applications. Therefore, temperature, humidity, pressure, and other sensors are utilizable in accomplishing specic tasks. Moreover, an IEEE1451 smart sensor with USB connectivity (U-STIM) has been developed [6] and its structure is shown in Fig. 6. A USB Device controller and IEEE1451.2 [5] structures have been realized using a hardware description language; in this way it is possible to implement the system in an applicationspecic integrated circuit (ASIC). Only the STIM and the transducer electronic data sheet (TEDS) elements of IEEE 1451 smart sensor have been developed, while the network capable application processor (NCAP) level has been neglected. The communication with the smart sensor is accomplished by an emulated transducer independent interface (TII). Its commands are sent using a simple protocol over USB. IV. R ESULT In the following, some experimental results concerning device resources, timing, and power dissipation are reported for each network component.

1348

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 57, NO. 7, JULY 2008

Fig. 7. Delay between the software transmission command and the effective packet transmission on the USB bus.

Fig. 8. Delay between the input and output signals of the PLD logic (obtained by timing simulation).

Fig. 9. Delay between the input and output signals of the USB insulator.

a quarter of bit time in a low-speed link. In fact, the delay is independent of the speed and transmission direction. The hub delay depends on the data rate and is on the order of 50 ns for the full-speed link and about 300 ns for low-speed connections. C. Power Consumption During a normal communication between the Ethernet and the USB sides, the USB host/LAN gateway shows an average current consumption on the order of 120 mA at 3.3 V. Half of it is drained by the Ethernet controller, whereas the block concerning the USB controller takes only 20 mA. Preliminary measurements concerning the realized USB insulator show a current request on the order of 280 mA at 5 V. Most of this load is due to the optocouplers and the 48-MHz local oscillator. This value has been measured without any device connected to the USB insulator, so that it can be considered as the average no-load consumption. When a device is connected, the current required by the insulator increases by a value that is greater than the current required by the device, because the USB insulator must power the bus through the dcdc converter, which does not have 100% efciency.

If the system is limited to the low-speed data rate, lowpower optocouplers and a low-frequency oscillator could be employed, limiting the power consumption. Alternatively, other galvanic insulating components, such as magnetic isolators, could be used. They require a current that is ten times less than that for optocouplers (at the same speed). In addition, a dcdc converter with better efciency and a low-power PLD could be utilized. This way, the global current consumption might be easily limited to about 150 mA. The current absorbed by the USB hub depends on the power requested by the devices connected to the hub. In fact, it must provide power supply to the bus-powered devices connected to its downstream ports. It absorbs about 100 mA at 5 V for normal operation. The maximum current that the USB host can furnish is about 500 mA, as indicated in USB specications. If the global current requested by the hub is greater than this limit, the USB hub must be set to work in self-powered mode by means of an external power supply. V. C ONCLUSION USB has been widely accepted as a serial bus for home applications. In an industrial context, USB is not diffused since

DEPARI et al.: USB SENSOR NETWORK FOR INDUSTRIAL APPLICATIONS

1349

it lacks transducers and some safety options. In this paper, a complete USB system for industrial applications has been proposed, discussed, and implemented. An embedded USB host with integrated Ethernet gateway capability is dened, and a low-cost USB insulator for optical insulation of USB network segments is introduced. Prototypes of several other network components have been realized, and the whole network has been tested. Experimental results show that the timing characteristics are comparable with the timing performances of commonly used eldbuses (few milliseconds), even with the lower cost of the required components. With regard to power consumption, a bus-powered architecture seems to be suitable only if low-speed USB devices are employed. Over this network architecture, a data exchange protocol must be implemented to guarantee the data security and reliability needed in industrial applications. R EFERENCES
[1] USB Specications rev 1.1. [Online]. Available: http://www.usb.org [2] T. Twardowski, Will be USB a standard of PCInstrumentation communication? in Proc. VXII IMEKO World Congr., Dubrovnik, Croatia, Jun. 2227, 2003. [3] C.-P. Young, M. J. Devaney, and S.-C. Wang, Universal serial bus enhances virtual instrument-based distributed power monitoring, IEEE Trans. Instrum. Meas., vol. 50, no. 6, pp. 16921697, Dec. 2001. [4] Inside Out Network Sensors. [Online]. Available: http://www. ionetworks.com [5] Inst. Electrical Electron. Eng., IEEE Standard for a Smart Transducer Interface for Sensors and ActuatorsTransducer to Microprocessor Communication Protocols and Transducer Electronic Data Sheet (TEDS) Formats, IEEE Std. 1451.2-1997, 1997. [6] A. Depari, P. Ferrari, A. Flammini, D. Marioli, E. Sisinni, and A. Taroni, IEEE1451 smart sensors supporting USB connectivity, in Proc. SIcon, New Orleans, LA, Jan. 2729, 2004, pp. 177182. [7] PROFINET Specications. [Online]. Available: http://www.probus.com [8] Ethernet/IP Specications. [Online]. Available: http://www.ethernet ip.org [9] A. Flammini, P. Ferrari, D. Marioli, E. Sisinni, and A. Taroni, Sensor integration in industrial environment: From eldbus to web-sensors, Comput. Stand. Interfaces, vol. 25, no. 2, pp. 183194, May 2003.

Alessandra Flammini (M99) was born in Brescia, Italy, in 1960. She received the M.S. degree in physics (with honors) from the University of Rome, Rome, Italy, in 1985. From 1985 to 1995, she worked on industrial research and development on digital drive control. From 1995 to 2002, she was a Researcher with the Department of Electronics for Automation, University of Brescia, where she has been an Associate Professor since 2002. She teaches several courses on measurements in industrial environments, digital electronics, and microprocessor-based systems. Her research interests include the design of methods and digital electronic circuits for numeric measurement instrumentation, sensor signal processing, smart sensor networking, and eldbus applications.

Daniele Marioli (M04) was born in Brescia, Italy, on January 21, 1946. He received the M.S. degree in electrical engineering from the University of Pavia, Pavia, Italy, in 1969. Since then, he has been working on research and educational activities with the Polytechnic University of Milan, Milan, Italy, and the University of Brescia, where he has been a Full Professor of electronics since 1990. In addition, he is the Chief of the Department of Electronics for Automation, University of Brescia. He is the author and coauthor of more than 200 scientic papers published in international and national journals and conference proceedings. He is the holder of four patents. His research interests are the design, realization, and test of sensors, electronic instrumentation, and signal processing electronic circuits. His activities in these elds are related to the realization of innovative sensors in thick-lm technology, based on the piezoelectric, pyroelectric, and piezoresistive behaviors of screen printable pastes, and in MEMS technology, for the detection of physical quantities (e.g., acceleration, force, pressure, and mass); the realization of high-resolution electronic instrumentation for capacitive measurements; the design and realization of integrated electronic circuits as the front end of piezoresistive-based sensors; the development of new linearization techniques based on neural networks; and the development of web sensors and wireless sensors.

Alessandro Depari (S07M08) was born in Breno, Italy, in 1976. He received the M.S. degree in electronic engineering and the Ph.D. degree in electronic instrumentation from the University of Brescia, Brescia, Italy, in 2002 and 2006, respectively. Since 2007, he has been an Assistant Professor (Researcher) with the Department of Electronics for Automation, University of Brescia. His research interests are signal conditioning and processing for chemical sensors, in particular, resonant and resistive sensors for electronic noses, the development of sensor networks for distributed measurement, and the design of methods and digital electronic circuits for numeric measurement instrumentation.

Andrea Taroni (A04M04) was born in Cotignola, Ravenna, Italy, in 1942. He received the M.S. degree in physics from the University of Bologna, Bologna, Italy, in 1966. From 1971 to 1986, he was an Associate Professor with the University of Modena, Modena, Italy. Since 1986, he has been a Full Professor of electrical measurements with the Department of Electronics for Automation, University of Brescia, Brescia, Italy. Since 1993, he has been the Dean of the Faculty of Engineering, University of Brescia. Since 2007, he has been rector of the Carlo Cattaneo University, LIUC, Castellanza (VA), Italy. He has done extensive research in the eld of physical quantities sensors and electronic instrumentation, both in developing original devices and practical applications.

You might also like