Sie sind auf Seite 1von 5

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 54, NO.

6, DECEMBER 2005

2359

A Bluetooth-Based Sensor Network With Web Interface


P. Ferrari, Member, IEEE, A. Flammini, Member, IEEE, D. Marioli, E. Sisinni, Member, IEEE, and A. Taroni
AbstractIn this paper, a Bluetooth-based sensor network is presented. Based on a Piconet, the proposed network supports Web-server capabilities, allowing the wireless sensors to be accessed by commercial browsers through the Internet. An experimental setup has been realized using three temperature sensors, and related information has been viewed by PC clients. Measurements about power dissipation, area coverage, and response time conrm the proposed network feasibility and effectiveness. Index TermsBluetooth, intelligent sensors, microcontrollers, networks, transducers, wireless sensors.

of wireless solutions must be done to choose among proprietary or standard implementations.

II. WIRELESS SENSORS AND NETWORKS An important distinction has to be done between wireless systems and wireless sensors. Wireless systems, such as moving robots, are mobile systems where a central elaboration unit collects data from sensors using traditional (wired) communication technologies and then it talks with another station by means of a wireless method. On the contrary, in a wireless sensors context, the sensor itself is wireless capable and it is connected by a radio link with a central elaboration unit. For this reason, the adopted wireless technology should be as compact to be included in the sensor and as simple to be interfaced with low-end microcontroller. Obviously, the most important problem is related to power supplying. If we want a true wireless sensor, it should be totally autonomous. Today, the most affordable power sources are rechargeable chemical batteries that have a maximum capacity in the order of few amp hours, depending on size and electrolytes. Several others technologies, such as fuel cells [3], are on the rise, but they are still at research prototypes. In conclusion, to obtain a full wireless sensor, great attention must be paid to power consumption. A proprietary implementation can be a full customized one, where the expectation of the nal user can be nely matched, satisfying requirements of cost, compactness, and power consumption [4]. All system aspects, from application software to antenna and air transmission, must be carefully considered, increasing project complexity; radio-frequency (RF) front-end, modulation technique and processing electronics are designed according to a real eld condition (sensor data). In truth, in this kind of realization, the cost of the nal prototype could be low but the development phase can request a huge effort in terms of time and resources. In order to reduce development costs, many semicustom solutions are available off the shelf. As a concrete example, a proprietary solution based on a commercial device, that uses the ISM free band at 433 MHz, has been developed and it is discussed concisely in the following; it can be viewed as a typical system to compare to the proposed standard-based realization. A point-to-point link between two nodes has been obtained by means of low-cost rfPIC12C509AF by Microchip. The device includes an Amplitude Shift Keying (ASK) modulator in the same package of a PIC12C509 8-bit microcontroller, while an external ASK receiver is used. The RF section is very compact thanks to an antenna directly drawn on a printed circuit board

I. INTRODUCTION

ODERN industrial production processes require a high level of automation and, currently, a considerable part of the total cost is related with cables and cabling maintenance. On the other side, if a home scenario is considered, adding a new feature to an existing plant could result in costly structural works. Today the challenge is the elimination of any cable connection in industrial and home automation sectors, thanks to new wireless technologies and associated low-cost chipsets. Superior mechanical reliability in hostile environments (with vibrations or corrosive agents) and high network scalability, even in successive steps without structural modications, can be achieved. Many wireless technologies are now available to be employed. Standard-based and proprietary solutions are proposed by many vendors in several application elds. In a modern factory, there is network stratication: each layer operates at different levels from plant oor to administration; thus, for a sensor network, the possibility of connecting with a higher level network is crucial. With the idea of a distributed factory or, generically, of a remote supervision, new technologies related to the Internet become predominant [1]. Gateways to the Internet, supporting transfer control protocol/internet protocol (TCP/IP), enable world connectivity and data sharing. Moreover, if hyper text transfer protocol (HTTP), i.e., the Web facility, is provided, a further easy and graphical humanmachine interface (HMI) can be used [2]. Our objective is to realize a wireless sensor network for lowcost industrial or home application that is Web enabled. The desired network must be able to manage a few sensors , but with a compact and cost-effective implementation at the sensor side. Conversely, a more complex master station, including Web capability, can be tolerated since only one per network is installed. It should be noticed that as a rst step, a careful analysis
Manuscript received June 1, 2004; revised July 6, 2005. The authors are with the Department of Electronics for Automation and INFM, Istituto Nazionale Fisica della Materia, University of Brescia, 25123 Brescia, Italy (e-mail: emiliano.sisinni@ing.unibs.it). Digital Object Identier 10.1109/TIM.2005.858564

0018-9456/$20.00 2005 IEEE

2360

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 54, NO. 6, DECEMBER 2005

Fig. 1. RFPIC12C509AF allows a point-to-point wireless link between a sensor and data logging equipment.

Fig. 2. Block diagram of the proposed system. The master acts as a gateway to higher order network.

(PCB) layer. With this conguration, a full duplex 300-bit/s serial communication can be easily reached in a 15-m range. Although it does not implement a true network architecture, it is a low-power ( mW during transmission) and low-cost ( $) system that allows a sensor to dialog with a central equipment, as depicted in Fig. 1. However, complexity dramatically increases if more than two nodes are considered, since a protocol with node address, packet checksum, and packet acknowledge must be provided. The PIC12C509 should be supported by a further microcontroller to handle this software overhead. In conclusion, proprietary solutions are suitable to satisfy cost and power requirements, but they do not support interoperability among sensors of different constructors, neither is scalability; therefore, their use is often limited where standard solutions cannot be applied. Wireless networks based on international standards cannot reach a full optimization of every aspect, but they are widely known and supported. Among wireless standards, Bluetooth (BT) [5] and Wireless Ethernet (IEEE802.11) [6] seem to be the most diffused ones. Their application elds are different: m for Class 2 devices), Bluetooth is devoted to short range ( low data-rate ( Mbit/s) communication, while IEEE802.11 is designed to replace 10BaseT wired network since it has a high data-rate (i.e., 11 Mbit/s using part b specication) and a long range (about 100 m). Actual component scenario offers modules that manage the lowest-level communication layers (the baseband and the RF section) for both standards. In this way, it is possible for the hardware designer to ignore problems concerning RF signal conditioning, concentrating on their own application and obtaining a shorter time to market [7]. Typically, Bluetooth modules dissipate less power and are smaller and less expensive than IEEE802.11b ones. Since cost is one of the main aspects in sensor applications, Bluetooth technology has been chosen as the best wireless standard solution for sensor networking. It should be remembered that a wireless solution with high performance in terms of transfer rate, costs, and low maintenance battery-power is not still available, and, in many cases, wired solutions could be preferable; anyway, many researchers, sensor constructors and committees [8], [9] are working on wireless sensors because they are needed for new industrial and residential applications. III. PROPOSED BLUETOOTH NETWORK The system architecture has been designed as simple as possible because our nal application is a Web-enabled low-cost sensor network based on a radio link. Bluetooth offers a simple

Fig. 3.

Implemented Bluetooth stack.

master-slave network topology, called Piconet, where a master can control up to seven slaves; network nodes can be dynamically connected and disconnected from the Piconet at any time and this operation is transparent to end users (periodic inquiry and page mode). The block diagram of the proposed system is shown in Fig. 2: wireless sensors are the slaves of a Piconet that is managed by a xed station, that we call master station, connected with a high-level network, Ethernet/Internet in most cases. To keep costs low, the master station must be a simple microcontroller-based system with embedded Internet and web capability. The Bluetooth protocol stack [5] is shown in Fig. 3. In this paper, a proprietary protocol that lays above the logical link control and adaptation protocol (L2CAP) has been developed, having in mind compactness and efciency. It should be reminded L2CAP does not perform data integrity controls itself, but it provides a reliable channel using mechanisms available at the baseband layer; in particular asynchronous connect-less Link (ACL) has been preferred to synchronous connection-oriented link (SCO, ideal for an audio link). BT on-air trafc is organized in a time division duplex (TDD) with a base slot of 625 s; the master uses one or more slots to poll a slave that responds in the next slot; then, the master interrogates next slave, and so on. There are six types of ACL data packet: data high rate DH1, DH3, DH5, data medium rate DM1, DM3, and DM5. The number reported in these names indicates how many slots are occupied; a longer packet has a greater payload resulting in a higher data rate. In Table I, data and theoretical transfer rate (sympayload, on-air delay metrical case) for each packet type are briey summarized.

FERRARI et al.: BLUETOOTH-BASED SENSOR NETWORK WITH WEB INTERFACE

2361

TABLE I BLUETOOTH TRANSMISSION TIME AND TRANSFER RATE LISTED PACKET TYPE

BY

Fig. 5. Block diagram of the realized prototype. Both master and slaves are based on a low-cost C.

Fig. 4. Proposed proprietary protocol: CF Command Field; M/S DIF Master/Slave Data Identier Field; RDF Requested Data Field; SF Sensor Flags; REQ Response/Event Qualier.

= =

The considered sensors generally output a small amount of data; therefore, the proposed BT network uses DH1 or DM1 packets only. Checksum protection available with DM1 packets seems to be suitable for high-reliability application, so DM1 should be preferred if data length limitation can be accepted. In the proposed proprietary protocol, the master station interrogates sensor slaves or sends them data; if an event occurs, the slave can send an unsolicited packet to the master. Each user packet is made up of two bytes; if a packet is sent by a master, it is composed of a command byte and a data byte; otherwise, if a packet is sent by a slave, it consists of a status byte followed by a 1-byte data eld, as depicted in Fig. 4. The command byte has three sections. 1) Command Field (CF-2 bit) contains bit-wide commands. 2) Master data identier eld (MDIF-3 bit) explains the meaning of the successive data byte, for instance a calibration value. 3) Requested data eld (RDF-3 bit) species what kind of sensor data (e.g., raw or linearized output) is needed. The status byte has three elds. 1) Sensor ags (SF-4 bit) represent sensor status. 2) Slave data identier eld (SDIF-3 bit) indicates the following data type. 3) Response/event qualier (REQ-1 bit) discriminates between solicited and unsolicited packets. The proposed protocol is extremely simple because it is oriented to low-overhead simple communication; special values of Data Identier Field could support multiple byte transfer (e.g., assuming rst data byte as a message length indicator) only limited by either DM1 or DH1 payload. Theoretical cycle time of a slaves network can be calculated with (1) (1) where DH1 (or DM1) packets are used and doubling factor is due to TDD between master and slaves.

Fig. 6.

Proposed HTTP interface is human readable.

An important remark regards response time, because several retransmissions can occur, especially in a high-trafc environment. Thus, it is not possible to employ this kind of solution in a strictly real time system; however, typical remote monitoring applications do not need so severe requirements and they are ideal candidates for a wireless connection. A. Bluetooth Sensors The block diagram of the proposed hardware is illustrated in Fig. 5: each smart sensor is based on an 8-bit microcontroller ( C), the PIC18F452, and it uses the Ericsson Bluetooth module ROK101 007. A very compact prototype (shown in Fig. 7 in the following) has been assembled; a low-cost RF antenna is obtained directly on PCB according to Ericsson specication. Operating voltage is 3.3 V, ready for battery operation. The link between C and BT module has been implemented at host controller interface (HCI) [5] level with an asynchronous serial interface at 115 kbaud. The BT software, including L2CAP and the previously described proprietary protocol, occupies about 15 kbytes (45%) of PIC microcontroller code space and about 500 bytes (30%) of internal RAM. B. Web-Enabled Master Station The master station acts as a gateway between the BT sensor network and the cabled high-level network. Its block diagram is shown in Fig. 5; core microcontroller and BT interface are the same of sensor slaves (PIC18F452, Ericsson ROK101 007) to

2362

IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 54, NO. 6, DECEMBER 2005

Fig. 7.

Test system with both local and remote accesses.

ensure a very low-cost system. In addition, it has also an Ethernet 10BaseT interface, realized with a Crystal CS8900, to be connected with a xed Ethernet network. The Ethernet interface software and the Web-server are very small in terms of memory occupation, and they can be stored in C code and memory space together with BT communication software; code memory occupation is 85%, and RAM occupation is about 1 kbyte. The master station can be accessed by TCP, the protocol used by Programmable Logic Controllers (PLCs) in industrial applications, or by HTTP, assembling sensor information in a Web page [4]. The TCP access method can be used to achieve faster, automatic, low-level access, as occurs in typical industrial components, while the HTTP interface, shown in Fig. 6, has been provided to read sensor data by means of a commercial browser. The HTTP-based HMI is very simple because of limited microcontroller capabilities. An operator can access data asynchronously, pushing the Read Now or Write Now button as depicted in Fig. 6. A synchronous access can be achieved with a sampling time in the order of 1 s thanks to dynamic page refresh facility offered by HTML and supported by every Web-browser. More powerful acquisition schemes can be obtained (i.e., online data computing and saving) using, for example, Java applets on the client side [10]. IV. EXPERIMENTAL RESULTS A working system prototype has been built to test overall potentialities. A test bench has been assembled as depicted in Fig. 7. The considered Piconet is composed of three wireless sensors (each one equipped with a temperature sensor LM35 and a digital output) and a master station. There are two personal computer stations (1 and 2) that can access the embedded Webserver using both Netscape and IExplorer commercial browsers. A further PC, labeled as M, is used as a monitoring station to record Ethernet network trafc and to measure time delays. It should be noticed that PC number 2 is a remote station that is connected with the system under test through the Internet. The BT master station consumes constantly about 200 mA, while the power consumption at the sensor side results as a function of transmission rate. A slave device with an active connection absorbs less than 46 mA when transmitting and 41 mA when idle. The microprocessor that equips the slave sensor drains 4 mA @20 MHz; ROK101007 modules support BT lowpower modes (Hold, Sniff, and Park) that can decrease the absorbed current down to 30 mA. The module requires 11 mA when it is disconnected and in the Inquiry/Page mode.

The operative range has been determined by measuring the maximum distance between master station and a slave before the communication gets lost; the result is 14 m in an open space and 12 m in an ofce-like environment. These values, that are the minimum ones computed on 20 measurements taken on different days, make BT an ideal candidate for on-board cable replacement, ensuring low-cost network scalability. In addition, devices satisfying class 1 power requirements allow 100 m area coverage, a value comparable to the ZigBee one (IEEE802.15.4 [9]), expressly designed for monitoring and control applications. The Bluetooth connection and the protocol have been veried by measuring the elapsed time from the master sending a command and the sensor receiving it. To accomplish this measurement, a digital output on the master microcontroller toggles when a command is sent, while a digital output of the sensor microcontroller has been congured to toggle when a command is received. Both signals are acquired. The mean time between their commutations, with master and slave 8-m apart, is 4.5 ms (computed over 50 experiments). However, distances within 12 m do not affect this time. It should be remarked that the considered time interval includes two transmission times over the ms), two BT module serial link (11 bytes at 115 kbaud elaboration times, and one on-air transmission time ( s). A complete cycle with a single slave takes ms, plus protocol processing and acquisition time at slave side that is about 1.5 ms. This time, that we call ms, is ms (1). About 36% of far from the theoretical value Tcyc1 is taken by the serial link, 14% of Tcyc1 is dedicated to protocol processing, and the remaining 50% is taken by the BT module elaboration times. Really, the cycle time to scan three slaves is 17 ms; in effect, this time is less than ms since the master sends three request packets in a sequence and BT module elaboration times partially overlay. To further improve performance with this kind of BT module a faster serial link and a more powerful microcontroller should be employed. Tests on the Web-server show a Ping time of 5 ms for the Ethernet interface and a response time of about 100 ms between the HTTP page request (GET command) and the beginning of the response page. These time measurements have been acquired by the monitoring station under a trafc-free network condition. V. CONCLUSION In conclusion, a low-cost wireless sensor network has been proposed using Bluetooth. A standard-based implementation has been preferred, allowing interoperability among

FERRARI et al.: BLUETOOTH-BASED SENSOR NETWORK WITH WEB INTERFACE

2363

different constructors and network scalability. Bluetooth offers cost, dissipation and compactness advantages with respect to IEEE802.11b. A master station with web-server capability has been designed as a gateway to the cabled high-level network, allowing mixed (cabled and wireless) solutions. Experimental results show that a BT sensor can be used in a battery-powered architecture for a really wireless solution only if energy-saving methods can be adopted. This actually occurs for proprietary wireless solutions: that is the case of solar-cell systems in environmental monitoring or home automation components (slow data rate with systems in sleeping mode for most of the time). For these applications other standards have been announced (i.e., Zigbee), remarking wireless sensor network importance. Experimentally evaluated timing characteristics show that Bluetooth is a very versatile approach, offering performances comparable with eldbuses, having a cycle time for a three-slave network smaller than 20 ms. BT sensors can be used, for instance, as redundant movable sensors for diagnostic purposes in commissioning of industrial plants.

P. Ferrari (S01M04) was born in Brescia, Italy, in 1974. He received the degree (with honors) in electronic engineering and the Ph.D. degree in electronic instrumentation, both from the University of Brescia in 1999 and 2003, respectively He is employed as Researcher with Department of Electronic and Automation, University of Brescia. His main research activities are signal conditioning and processing for embedded measurement instrumentation, smart sensor, sensor networking, Real-Time Ethernet, and eldbus applications.

A. Flammini (M99) was born in Brescia, Italy, in 1960. She received the degree (with honors) in physics 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, and since 2002, an Associate Professor, at the Department of Electronics for Automation, University of Brescia. She lectures in several courses about measurements in industrial environments, digital electronics, and microprocessor-based systems. Her main research activity is the design of methods and digital electronic circuits for numeric measurement instrumentation, sensor signal processing, smart sensor networking, and eldbus applications.

ACKNOWLEDGMENT The authors would like to thank Ing. F. Migliorati for helping in experimental setup.

REFERENCES
[1] S. Vitturi, On the use of Ethernet at low level of factory communication systems, Comput. Standards Interfaces, vol. 23, pp. 267277, 2001. [2] P. Ferrari, A. Flammini, D. Marioli, and A. Taroni, A low-cost internetenable smart sensor, in Proc. IEEE Sensors, Orlando, FL, Jun. 1214, 2002, pp. 15491554. [3] C. K. Dyer, Fuel cells for portable applications, J. Power Sources, vol. 106, no. 12, pp. 3134, Apr. 1, 2002. [4] G. Bucci, E. Fiorucci, C. Landi, and G. Ocera, The use of wireless network for distributed measurement applications, in Proc. IEEE IMTC, Anchorage, AK, May 2123, 2002, pp. 17571762. [5] Specication of the Bluetooth System 1.1 (2001). [Online]. Available: www.bluetooth.com [6] IEEE Standard for Information technology, Telecommunications and Information Exchange Between Systems, Local and Metropolitan Area Networks. Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specications, IEEE Standard IEEE802.11, 1999. [7] O. Kasten and M. Langheinrich, First experiences with bluetooth in the smart-its distributed sensor network, in Proc. Workshop Ubiquitous Computing Communications. Barcelona, Catalonia, Spain, Sep. 2001. [8] J. A. Gutierrez, E. H. Callaway, and R. L. Barrett, Low-rate Wireless Personal Area Network, ser. IEEE Standards Wireless Network Series. Piscataway, NJ: IEEE. [9] IEEE Standard for Information Technology, Telecommunications and Information Exchange Between Systems, Local and Metropolitan Area Networks, Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specications for Low-Rate Wireless, Personal Area Networks (LR-WPANs), IEEE Standard IEEE802.15.4, 2003. [10] P. Ferrari, A. Flammini, D. Marioli, E. Sisinni, and A. Taroni, A low-cost smart sensor with JAVA interface, in Proc. Sens. Industry Conf.SIcon 2002, Houston, TX, Nov. 1921, 2002, pp. 161167.

D. Marioli was born in Brescia, Italy, in 1946. He received the degree in electrical engineering from the University of Pavia, Pavia, Italy, in 1969. From 1984 to 1989, he was an Associate Professor in applied electronics, and since 1989 he has been a Full Professor of applied electronics, at University of Brescia. Since 1993, he has been the Director of the Department of Electronics for Automation of the faculty of Engineering, University of Brescia. His main research activity is the design and experimentation of analog electronic circuits for the processing of electrical signals from transducers, with particular regard to signal-to-noise ratio optimization.

E. Sisinni (S02M05) was born in Lauria (PZ), Italy, in 1975. He received the degree in electronics engineering and the Ph.D. degree in electronic instrumentation, both from the University of Brescia, Brescia, Italy, in 2000 and 2004, respectively. Since 2005, he has been a Researcher (assistant Professor) with the University of Brescia. His research activity focuses on numerical signal analysis, with particular interest in DSP-based instrumentation. He has been involved in the developing of new NDT for ferromagnetic materials using Barkhausen noise effect and the design of high resolution, low-cost instrumentation for motion estimation using inductive position sensor or optical encoders. Recently, he has been involved in the development of the department wireless sensor networking laboratory.

A. Taroni was born in Cotignola, Ravenna, Italy, in 1942. He received the degree in physics from the University of Bologna, Bologna, Italy, in 1966. He was an Associate Professor at the University of Modena, Modena, Italy, from 1971 to 1986. Since 1986, he has been a Full Professor in electrical measurements at the University of Brescia, Brescia, Italy. Since 1993, he has been the Dean of the Faculty of Engineering, University of Brescia. He has done extensive research in the eld of physical quantities sensors and electronic instrumentation, both developing original devices and practical applications.

Das könnte Ihnen auch gefallen