Design and implementation of a bluetooth sensor network

Publisher:码字狂人Latest update time:2012-04-11 Source: 传感器与微系统 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0Introduction

Wireless sensor networks (WSNs) are "intelligent" autonomous measurement and control network systems that are composed of a large number of ubiquitous tiny sensor nodes with communication and computing capabilities densely distributed in unattended monitoring areas and can autonomously complete designated tasks according to the environment. If the Internet has changed the way people communicate with each other, then WSNs will merge the logical information world with the real physical world and will change the way people interact with nature. For this reason, in 2003, MIT Technology Review listed it as one of the top ten emerging technologies that will change the world in its report predicting future technological development.

Bluetooth is a technical specification for short-range wireless communication. Since Bluetooth works in the 2.4 GHz ISM (industrial, scientific and medical) frequency band, can transmit voice and data simultaneously, has good anti-interference ability and low power consumption, etc. Using Bluetooth technology to build a Bluetooth sensor network composed of fixed sensor nodes is an emerging research direction in the field of wireless sensors, which can realize information collection, processing and transmission in some special occasions.

This paper introduces the construction of a Bluetooth sensor network for square environment monitoring and the design of sensor nodes, and studies the node positioning and power supply issues of Bluetooth sensor networks. Finally, the existing problems and development directions in the field of WSNs are discussed.

1 Bluetooth sensor network construction

The entire Bluetooth sensor network consists of several Bluetooth sensor nodes and a monitoring host. The wireless sensor nodes are distributed around the square that needs to be monitored to perform data collection, preprocessing and transmission. The monitoring host is placed in the smart car and communicates with the sensor nodes through the Bluetooth module.

1.1 Bluetooth Sensor Network Model

In order to input the signal to the terminal, Bluetooth is used instead of wired, infrared and light to transmit the signal. The reason is that it is most suitable for short-distance wireless low-power communication. The sensor network formed by it is called a Bluetooth sensor network.

In order to explain the Bluetooth sensor network intuitively, a Bluetooth sensor network model was constructed. The Bluetooth sensor network model is based on the principle of proximity networking. Two Bluetooth sensors that are close to each other to a certain extent can spontaneously establish a communication link through the Bluetooth module. In Bluetooth networking, up to 256 Bluetooth device units can be connected to form a piconet, in which one master node and seven slave nodes are in working state, while the other nodes are in idle mode. The master node is responsible for controlling the bandwidth of the asynchronous connectionless (ACL) link and determining how much bandwidth each node in the piconet can occupy and the symmetry of the connection. Slave nodes can only send data when they are selected, that is, slave nodes must be polled before transmitting data. Piconet networks can overlap and cross each other, and slave device units can be shared. A network composed of multiple overlapping piconets is called a scatternet.

The sensor network used for square environment monitoring is composed of sensor nodes pre-placed around the square to form a piconet, and each piconet forms a scatternet. Its network communication architecture is shown in Figure 1. The nodes have sensing, signal processing and wireless communication functions. They are both the initiator and forwarder of information packets. Through network self-organization and multi-hop routing, data is sent to the monitoring.

1.2 Bluetooth sensor network node positioning

The node positioning mechanism refers to a mechanism that relies on a limited number of nodes with known locations to determine the locations of other nodes in the deployment area and establish a spatial relationship between sensor nodes. In most cases, the data obtained by the sensor network is only meaningful when combined with location information. In addition, the research on the Bluetooth sensor network protocol also requires the use of node location information. At the network layer, because Bluetooth sensor network nodes have no global flags, a routing algorithm based on node location information is designed; at the application layer, based on the node location, the Bluetooth sensor network system can intelligently select some specific nodes to complete the task, thereby reducing the energy consumption of the entire system and increasing the system's survival time.

Since the positions of the sensor nodes in the designed Bluetooth sensor network system are fixed, a node positioning mechanism based on ranging can be used. By measuring the point-to-point distance between nodes, the node position is calculated using the maximum likelihood estimation method. The ranging positioning mechanism requires that the two nodes have the ability to measure the distance between each other. TDOA (time difference on arrival): ranging technology is used. Ultrasonic transceivers and Bluetooth transceivers are installed on the nodes. When measuring the distance, at the transmitting end, the two transceivers transmit signals at the same time, and the huge difference in the propagation speed of sound waves and electromagnetic waves in the air is used. At the receiving end, the difference in the arrival time of the two different signals is recorded, and based on the known signal propagation speed, the time is directly converted into distance. The ranging accuracy of this technology can reach the centimeter level, but it is limited by the limited propagation distance of ultrasonic waves and the influence of non-line-of-sight (NLOS) problems on the propagation of ultrasonic signals. [page]

2 Sensor Node Design

The design of sensor nodes mainly includes: hardware design, software design and power supply design.

2.1 Overall design of sensor nodes

In different applications, the design of sensor nodes is also different, but their basic structure is the same. According to specific needs, the designed sensor node mainly includes the following subsystems: data processing subsystem, data acquisition subsystem, wireless communication subsystem and power subsystem. The schematic diagram of the node structure is shown in Figure 2.

2.2 Sensor Node Hardware Design

The sensor node is mainly composed of an ultra-low power processor, various sensors and their auxiliary circuits. The node schematic is shown in Figure 3.

2.3 Power Supply Issues

The power supply problem is a key issue in WSNs. Only by providing long-term and effective energy can the sensor network reduce the maintenance and operation costs, further reflecting its huge advantages. In order to save energy to the maximum extent, in the design of the node, the microcontroller executes tasks at the fastest speed and enters the energy-saving mode as soon as possible. In the energy-saving mode, the power supply of devices other than the microcontroller, Bluetooth module and hardware watchdog is cut off through the power management circuit. At this time, only the hardware watchdog, the serial port interrupt logic of the microcontroller and the Bluetooth module consume energy, which can save energy to the maximum extent.

After the node is started, it will enter the energy-saving mode after completing the necessary tasks, including initializing the Bluetooth device and obtaining the local address. After entering the energy-saving mode, if the monitoring center needs to access the node, it will wake up the node's microcontroller through the Bluetooth module.

2.3.1 Power Management

The use of dynamic power management mode in sensor network power management is an effective design method to reduce system energy consumption. Dynamic power management is an effective way to reduce system power consumption without affecting system performance. The most basic idea is that each device inside the sensor node is turned off when not needed and awakened when needed. This allows the sensor to enter the corresponding low-power mode in a timely manner to reduce overall energy consumption. The basic premise for the application of dynamic power management technology is that system components have different workloads during working hours, which is the case in most systems. Another premise is that it is certain to be able to predict the volatility of the workload of the system and components to a certain extent. Only in this way can it be possible to convert the energy consumption state, and the system should not consume too much energy during the observation and prediction of the workload. In the sensor network, the various modules that constitute the sensor node have different power states, so it is more appropriate to use dynamic power management for power management. In the dynamic power management system, the working states of different components should dynamically adapt to different levels of performance requirements. Only in this way can the energy wasted in idle time or the energy wasted by useless components be minimized. To determine the implementation time of power management, a dynamic prediction method is used to predict the upcoming workload based on the historical workload, and decide whether to switch the working state and when to wake up.

2.3.2 Measures to reduce energy consumption

1) The use of new technologies such as system-on-chip technology, MEMS technology, and application-specific integrated circuits can greatly reduce sensor network components and energy consumption;

2) The use of sensor data fusion technology can reduce network communication volume, reduce data redundancy, and improve energy efficiency;

3) Reducing transmission errors can also reduce energy consumption.

2.4 Sensor Node Software Design

In the network, each node has a fixed address (determined by the Bluetooth module address). Among them, the sensor node connected to the monitoring host is a special node, which uses a serial interface to communicate with the Bluetooth module and the monitoring host. Data transmission adopts the master-slave mode. The node connected to the monitoring host is the master station, which controls the communication timing within the network; other nodes are slave stations and can be addressed by the master station.

The sensor node software design is divided into two parts: the master node software design and the slave node software design. The master node is mainly responsible for collecting data from each slave node, and then analyzing and processing the data; the slave node is mainly responsible for collecting and preprocessing the raw data of various sensors. [page]

2.4.1 Masternode Programming

In the master node, the monitoring host and the host controller (Bluetooth module) exchange information by sending and receiving packets through the Bluetooth host controller interface (HCI). The host controller generates result information after executing the monitoring host's instructions, and sends this information to the monitoring host through the corresponding event packet. In the Bluetooth sensor network, the simplest ACL data communication process between the Bluetooth module on the master node and the Bluetooth modules of other nodes has five steps: Bluetooth module initialization, query, connection establishment, data communication and disconnection. The flowchart of the master node program is shown in Figure 4.

Based on the processed data, we can not only grasp the square environment information in real time and take corresponding measures for emergencies in a timely manner, but also set the lighting brightness and lighting time according to the brightness conditions in the square, which can provide early warning and save energy.

2.4.2 Slave Node Programming

The slave node program mainly collects data from various sensors and transmits it to the master node after preliminary processing. The program flow chart is shown in Figure 5.

3 Conclusion

The entire network adopts a master-slave structure, and the master station uniformly controls the communication timing within the network. The node is based on the low-power microcontroller ATmega128L and uses a Bluetooth module for communication. In terms of software, the serial port interrupt method is used to receive and send data. The node is powered by a battery, and the energy-saving mode of the microcontroller can be used to save energy to the maximum extent and extend the service life of the node. Experiments show that the WSNs established using this mode are stable and reliable, and have high communication efficiency.

Reference address:Design and implementation of a bluetooth sensor network

Previous article:Design of Communication between PC104 Bus and CAN Bus Based on Linux
Next article:Design of wireless data transmission equipment based on nRF905

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号