Share this

Implementation methods of ad hoc network protocols for wireless sensor networks

2026-04-06 03:12:54 · · #1
Abstract: Wireless sensor networks (WSNs) are typically battery-powered and placed in locations without infrastructure, resulting in limited node communication capabilities. This necessitates that sensor nodes possess self-organizing capabilities, automatically forming multi-hop wireless networks to forward monitoring data. This paper proposes a simple and easily implemented self-organizing protocol, designs miniature sensor nodes using the MSP430F149 microcontroller, and implements a low-power wireless network. Keywords: Wireless sensor network, self-organizing protocol, low power consumption Introduction Wireless sensor networks have a very broad application prospect. A traditional flooding algorithm, also the earliest and simplest routing protocol, involves nodes broadcasting messages, and receiving nodes then broadcast the data packets to all neighboring nodes. This process is repeated until the data packet reaches its destination or reaches a pre-set maximum hop count. The most representative hierarchical self-organizing algorithm (LEACH, Low Energy Adaptive Clustering Hierarchy) was proposed. LEACH, designed by Heinzelman et al. at MIT, is a low-power adaptive clustering routing algorithm for wireless sensor networks, primarily achieved by randomly selecting cluster leaders and evenly distributing relay communication traffic. SPIN (Sensor Protocols for Information Via Negotiation), a data-centric self-organizing algorithm, names sensor data using high-level descriptions—metadata. Before sending actual data, sensor nodes broadcast descriptive metadata about the collected data; only when requested are data messages sent. These studies have made progress in self-organizing algorithms for wireless sensor networks. However, Flooding suffers from message implosion and overlap; LEACH's dynamic clustering introduces overhead such as topology changes and extensive broadcasting; and SPIN's metadata lacks a unified format, and its topology changes are localized, making it unsuitable for applications requiring high reliability. Many other related algorithms remain in the theoretical research stage. To address this research status quo, this paper proposes a simple and easily implemented self-organizing protocol. A miniature sensor node is designed using the MSP430F149 microcontroller, and a low-power wireless network is implemented. 1. Self-Organizing Protocol: In this protocol, node self-organization is achieved by defining the format and keywords of data packets. 1.1 Protocol Format The self-organizing protocol format is as follows: Where Pre represents the preamble; these characters are less prone to noise generation. Testing and experiments have shown that highly regular signals such as 0x55 and 0xAA are not easily generated in noise. Key represents keywords used to distinguish data under various conditions; the receiving node will enter different data processing units based on these keywords. From represents the source address, which is the sending node's own information. Final represents the destination address of the data. Data represents valid data; these data use different formats depending on the Key and can carry different information. Check represents a check bit to avoid receiving erroneous data packets. Flag represents the end-of-data packet flag. Based on the Key in the protocol format, the data packets piggybacked during node communication can be categorized into self-organizing network information, environmental change information, host computer control commands, broadcast information, etc. The data packet format when a node sends a state change signal is as follows: Where 0x55 and 0xAA are data preambles, 0xFF is the keyword for the sensor node to send data when it senses a state change, 0x11 represents the address of the sending node, 0x00 is the destination address of the data packet, 0x01 represents the hop count of the data packet in network transmission, the following 0x01 represents the node's level in the current network, 0x15 represents the temperature collected by the node at that time, 0x20 represents the power supply voltage value collected by the node at that time, 0x03 represents the node's status variable, 0x00…0x00 are 11 bytes of valid data, which can record the addresses of the nodes the data packet passed through, 0x3A is the lower 8 bits of the sum of the preceding core data, serving as the data packet checksum, and 0xBB is the end marker of the data packet. The receiving node needs to respond to the sending node. The data packet format for responding to a state change signal is as follows: Where 0xFF represents the keyword for responding to the state change signal, followed by the addresses of the sending and receiving nodes. 1.2 Ad Hoc Network Process The network consists of a base station node connected to a host computer and several sensor nodes. After power-on initialization, the base station node enters low-power mode. Sensor nodes are randomly deployed. After power-on initialization, each sensor node first sends a command to the base station node requesting a level allocation, then enters a low-power state and starts a timer. If it receives a level allocation from the base station node within a set time, the sensor node sends a data packet containing self-organizing information to the base station node. If it does not receive a level allocation from the base station node within the set time, the node wakes up from the low-power state and sends the request command again, repeating this cycle. When the number of requests for level allocation from the base station node reaches a set limit, but the node still has not determined its level in the network, it broadcasts a command to the entire network, then enters a low-power state and starts a timer. When the timer expires, the node returns to the state of broadcasting commands. When the number of broadcasts by the sensor node reaches a set value, the node organizes the received response information, determines its level in the network, and identifies relevant information about its superior, peer, and subordinate nodes. The node then sends a data packet containing this information to its superior node until the data packet reaches the base station node, thus determining the topology of the entire network. The self-organizing process of the node is shown in Figure 1. Figure 1. Node Self-Organization Flow 2. Hardware Development To verify the proposed self-organization protocol, this paper selects the MSP430F149 microcontroller, which has abundant on-chip resources, as the processor to develop a miniature sensor node. 2.1 Overall Scheme The system consists of a base station node and a sensor node. The node hardware selected is the MSP430F149 microcontroller supporting low-power operation mode and the nRF905 RF module, using a 32 768 Hz low-frequency crystal oscillator and powered by two AA batteries. During the node design process, the design of the DIP switch, buzzer, and LCD indicator light greatly facilitated the experimental debugging. 2.2 Node Design Figure 2 shows the block diagram of the sensor node. This node is battery powered and has a small size, only about the size of a lighter. Figure 2. Sensor Node Block Diagram The MSP430 series microcontroller is a mixed-signal controller produced by TI. Its outstanding advantages are low power supply voltage, ultra-low power consumption, battery operation, and long operating time. The nRF905 is a monolithic RF transceiver from Nordic VLSI of Norway. It operates at low voltage and consumes very little power, operating on three ISM (Industrial, Scientific, and Medical) channels: 433/868/915 MHz, with a channel switching time of less than 650 μs. It features ShockBurst™ mode for automatic header processing and CRC (Cyclic Redundancy Check). It communicates with the microcontroller via SPI serial port, making it very convenient to use. Built-in idle and power-off modes facilitate energy saving. The nRF905 is suitable for various applications such as wireless data communication and wireless unlocking. Antenna design is a crucial aspect of the entire system design. System power consumption and network performance are closely related to antenna design. The antenna section uses a monolithic PCB loop differential antenna. Compared to traditional whip antennas, this not only saves space and reduces production costs but also provides a more robust and reliable structure. Because this paper mainly studies the self-organizing network and low-power technology of wireless sensor networks, only the internal integrated thermistor of the MSP430 series microcontroller was selected to measure the operating temperature of the nodes. However, a large number of external sensor interfaces were reserved, and the signals from external sensors can wake up the nodes through interruption. 2.3 System Power Consumption The sensor nodes are battery powered, and the power consumption directly affects the lifespan of the entire network. The system power consumption is not only related to the selected components, but also to the control strategy of the entire network. Different control strategies will result in different system operating times. If the nodes are expected to operate for one year (365×24=8760 hours), then theoretically, the average operating current should be approximately 263 μA (2300÷8760). The working time from transmitting data to receiving a response is approximately 50ms, so the average sleep time before each operation can be calculated to be 2.3s. In practical applications, the system's operating and sleep times can be selected based on the network's response speed and the information sampling rate. 3. Software Development The design of a low-power system is a technology that integrates hardware and software. It is necessary to use low-power chips while employing intelligent control strategies. For example, the system can run at full speed when needed, and enter a low-power mode after processing all events, waiting for external events to wake it up. The system software includes base station node software, sensor node software, and host computer processing software. 3.1 Base Station Node Software The main program of the base station node is relatively simple. After initialization, it enters a low-power mode, waiting for external events to wake it up. External events include serial port interrupt events, received data events, and timer interrupt events. Figure 3 shows the serial port interrupt flow of the base station node. Figure 3 Serial Port Interrupt Flow of Base Station Node To prevent data loss during serial communication, a handshake protocol is added to the software design. When the base station node sends a data packet to the host computer, the host computer sends an acknowledgment signal to the base station node until the data packet is sent to the host computer. After receiving the data packet, the node wakes up from the low-power mode and enters different processing units according to the different characters of the flag bits in the received data. When multiple sensor nodes communicate with a certain sensor node at the same time, there is a channel contention phenomenon. To avoid data loss caused by multiple sensor nodes communicating with a certain sensor node at the same time, a certain backoff mechanism is adopted in the software. On the one hand, random delays are generated using the CD (carrier sense) signal of the nRF905 RF chip to avoid simultaneous signal transmission; on the other hand, when one sensor node establishes a communication channel with another sensor node, other data-transmitting nodes will increase the number of times they transmit data. 3.2 Sensor Node Software After initialization, the sensor node first sends a command requesting the base station node to assign a level, and simultaneously starts a timer for wake-up; then it enters low-power mode, waiting for external events to wake it up. If the number of times the sensor sends a request for the base station node to assign a level reaches the set limit and the node's level in the network is still not determined, the node will broadcast information to surrounding sensor nodes. When the number of broadcasts reaches the set value, the sensor node determines its own level and information about nodes directly connected to it based on the received information, and sends this information to the base station node. External interrupt events for the sensor node include data reception events, timer interrupt events, and state change events. When the sensor node detects a state change, it wakes up from the low-power state and promptly collects the environmental parameters (including state variables, temperature values, and node voltage values), and sends this data out. This data packet reaches the base station node via single-hop or multi-hop transmission and is displayed on the host computer software. 3.3 Host Computer Processing Software To monitor the entire network, a user-friendly human-machine interface needs to be established on the host computer. Visual Basic (VB) is used to design the human-machine interface. The MSComm control in VB is used to implement serial communication between the host and slave computers, and other controls are used to analyze, display, and operate the wireless sensor network. The host computer main program primarily initializes some variables and controls, and then waits for serial port data. Data reception and transmission are both completed by interrupt routines, the flow of which is shown in Figure 4. Figure 4: Serial Port Interrupt Flow of the Host Computer After receiving a complete data packet, the host computer performs different processing based on the keywords in the data packet. When sending data, the path of the relayed data is calculated based on the saved network data. To save energy for base station nodes, much of the data processing in the network is performed on the host computer. 4. Experimental Results After the system is developed, experiments need to be designed to evaluate the self-organizing network effect and network performance. In the experiment, the first issue to focus on is the networking situation of randomly distributed sensor nodes under a custom organization protocol. To assess the self-organizing effect, the base station nodes were first connected to the host computer via serial port, and the host computer processing software was opened. Then, the sensor nodes were powered on and deployed manually or randomly. Using the host computer processing software, the entire network topology and environmental parameters of the network nodes could be clearly seen. When the host computer processing software detected a sensor node in the network, it displayed and saved the sensor node's data. Figure 5 shows the interface display when 11 sensor nodes were freely networked in the system demonstration. The network setup time was approximately 3 minutes. The black curve in Figure 5 represents the data transmission path. Clicking on a node will pop up the node's information acquisition card. The information acquisition card reflects the node's status variables, temperature value, voltage value, and remaining energy. The node can be remotely controlled directly through the acquisition card. Figure 5: Network Topology and Data Transmission Route Diagram. In the experiment to test network performance, the sensor nodes were distributed level by level. The host computer software clearly showed the network topology structure with the maximum number of hops that the deployed sensor nodes could form. Once the network is formed, each node within the network can be remotely controlled via a host computer interface. When a node experiences a sudden state change, it will be woken up via an interrupt, and the data will be transmitted to the base station node level by level according to the energy priority principle, and the corresponding information will be displayed on the host computer interface. When a new sensor node joins the network, the system will promptly reflect the new addition. When the system detects that a sensor node has failed due to a power supply voltage lower than the operating voltage or due to human error, it will delete the node's topology and related information from the network. Detection methods include manual refresh and timed sampling. All data transmitted within the network is stored in the network database for easy retrieval. The host computer software can also reset the network, allowing all sensor nodes to reorganize. Conclusion This paper first proposes a self-organizing protocol for wireless sensor networks, then designs miniature sensor nodes using MSP430F149 and nRF905, and implements a low-power wireless network with the following characteristics: ① It automatically generates a multi-level mesh network using information carried by wireless communication and automatically generates data transmission paths according to the energy priority principle. ② Employ response and backoff mechanisms to prevent data loss caused by multiple sensor nodes sending data to a single node. ③ The bidirectional nature of wireless communication allows for not only passive display of information from each sensor node but also active remote control of each sensor node. ④ Use hardware that supports low-power operating modes, combined with intelligent control strategies in software, to achieve low system power consumption and extend network lifespan as much as possible.
Read next

CATDOLL 128CM Cici Silicone Doll

Height: 128 Silicone Weight: 21kg Shoulder Width: 30cm Bust/Waist/Hip: 57/52/63cm Oral Depth: N/A Vaginal Depth: 3-15cm...

Articles 2026-02-22