Keywords

1 Introduction

Sensor networks have been focused as a new type of sensing methods by using a multi-hop communication technology [1, 2]. Hence, a lot of routing protocols for sensor networks have been proposed [36]. Applications of sensor networks are generally classified into two types; a periodic measurement application and an event-driven measurement application. The first one is to measure the environment by some sensors periodically. The second one is to start some actions by detecting some events. This paper assumes a periodic measurement application for a field sensing with low-power microcontrollers.

Fig. 1
figure 1

System model of Arduino-compatible board

Sensor networks consist of many sensor nodes for measurement and reporting, and a sink node for data collection. Multi-hop communication is utilized to convey measurement information from the sensor nodes to the sink node. Additionally, almost all sensor nodes operate by a battery. Therefore, low-energy operation is an important function for realizing long-lived networks [7, 8]. Employing a low-power microcontroller and using a sleep operation of a hardware are conventional ways to reduce consumed power. However, employing low-power microcontrollers causes serious limitation of system resource e.g. 8KB SRAM in Atmel ATmega2560 microcontroller. Additionally, timing synchronization for communication between nodes is important to perform a sleep operation effectively. Therefore, special media access control mechanisms have been proposed [911]. An interference reduction is another issue in sensor networks because multi-hop networks generally suffer from a self interference between nodes. Therefore, various researches to mitigate any interference effect have been proposed [1216].

Fig. 2
figure 2

Arduino-compatible board

Table 1 Specifications of Arduino-compatible board

The authors have studied about cross-layer mechanisms supporting a media access control (MAC) and a routing for low-power microcontrollers in sensor networks. The proposed MAC supports a special frame structure to increase a chance of a sleep operation and to decrease packet collisions. The proposed routing protocol exchanges neighbor information between nodes, and constructs a tree-based route from a sink node to nodes. The early implementation employed Sun SPOT devices supporting Squawk Java Virtual Machine [17, 18]. The processor board has one ARM architecture 32 bit CPU with ARM920T core operating at 180 MHz. It had 512 KB RAM, 4 MB flash memories and a 2.4 GHz IEEE 802.15.4 chip. However, we found that the ARM based CPU is too powerful to realize long-lived operations from the experimental evaluation.

This paper presents a new circuit design of a microcontroller board for sensor networks to realize a stable operation and accurate measurements when some external sensors and wireless modules are connected to the board. Additionally, it also proposes an implementation design of a tree-based data collection scheme for low-power microcontrollers such as Atmel 8-bit AVR RISC-based microcontrollers that implements a few kilobytes internal SRAM.

The developed board has a special circuit for a stabilized power source for external sensors and wireless modules because these peripheral devices require large current and may suffer from a voltage depression that causes an unexpectedly restart and a measurement error. Moreover, it also implements a charge controller from a solar cell to Li-Po battery for an autonomous long-lived operation, and a SD card access for logging measurement values because these functions are generally required in practical sensor networks. The developed board is designed based on Arduino Board to employ Arduino software for developing a software. As a result, we can employ it to develop a practical sensor network system easily.

The implemented tree-based data collection scheme consists of a routing function and a media access control function for low-power microcontrollers. It achieves a small size of execution program by reducing routing information because low-power microcontrollers generally do not have enough memory space to execute a large size of program. The developed routing function can construct a tree-based route from a sink node to each node on a hop by hop basis. The developed media access control function employs a special time-division frame structure to leverage a sleep operation with low-power consumption for long-lived operation, and to reduce packet collisions between adjacent nodes.

In the experimental evaluations, we employs the developed board and the tree-based data collection scheme to realize a sensor network testbed. The basic evaluation shows that 8 [KB] SRAM in ATmega 2560 microcontroller is enough size to implement the mechanisms to realize a multi-hop sensor network. Additionally, the implemented tree-based data collection scheme can construct an adequate route from nodes to a sink node, and can realize a reliable data collection.

2 Arduino-Compatible Board

Various kinds of Arduino-compatible boards have been released recently. However, almost all boards do not assume external sensors for accurate measurement and wireless communication functions. Additionally, some boards supporting wireless modules do not consider required current source capacity to activate peripheral modules. As a result, some boards may behave in an erratic way due to inrush current when peripheral equipments such as wireless modules, sensors etc. are activated. Moreover, boards for sensor networks generally require low-power operation because each board is requested to operate autonomously with a battery. However, almost all boards do not support a charge control function from a solar cell. Therefore, few boards are appropriate for a sensor network application even if many boards have been released.

Fig. 3
figure 3

Overview of routing process

Fig. 4
figure 4

Frame structure

Figure 1 shows the system model of the developed Arduino-compatible board and Fig. 2 shows the overview of the board. The developed board has a special circuit consisting of a sufficient large output current voltage regulator and a capacitor for external sensors and wireless modules to avoid a voltage depression that causes unstable operation of a board and erroneous measurement. Additionally, it also implements a charge controller from a solar cell to Li-Po battery to realize an autonomous long-lived operation, a SD card access to record measurement values, a relay switch to reduce power consumption of external sensors, and a real time clock (RTC) chip for accurate time acquisition. It employs an Atmel ATmega 2560 microcontroller to achieve a compatibility with Arduino software to realize an easy development of a software. The detail parameters are presented in Table 1.

3 Tree-Based Data Collection Scheme

3.1 Overview of Tree-Based Routing

Figure 3 shows the overview of the proposed tree-based routing process. The proposed routing protocol can construct a route between nodes by using only neighbor information because the assumed Arduino-compatible board does not have enough memory space to store much routing information for all nodes. Therefore, a route construction process is performed on a hop by hop basis. The first step is the route construction between the sink node and 1-hop nodes (i.e., N1 and N2). The second step is the route construction between 1-hop nodes and 2-hop nodes. In a similar fashion, the proposed routing protocol can build a tree-based route from the sink node to the edge nodes.

3.2 Frame Structure

The proposed mechanism for the media access control employs the special frame format in Fig. 4 to reduce the collision probability and to increase a chance for a sleep operation. The frame format consists of some time slots for desired purposes: synchronizing a local clock, requesting for a new route, replying to the route request, requesting a route construction, data transmission, and acknowledgement transmission. Each sensor node attempts to transmit a packet with the Carrier Sense Multiple Access/Collision Avoidance(CSMA/CA) mechanism in each slot. The proposed format also employs sub-slots for data transmission and acknowledgement transmission to reduce self-interference effect between different hop communication. The purposes of each slot are presented as follows.

  • TSYNC (Time SYNChronization) slot

    General Arduino-boards do not have a RTC function. Therefore, a time synchronization mechanism is required to synchronize start timing of the frame. A sink node transmits TSYNC packets periodically. Then, neighbor nodes around the sink node synchronize the start time according to the TSYNC packets. The neighbor nodes that receive the TSYNC packet also transmit a TSYNC packet for their neighbor nodes to disseminate the start timing of the frame.

  • RREQ (Route REQuest) slot

    A node, that does not have any route to a sink node, requests for a new route to its neighbor nodes in the RREQ slot. Therefore, the neighbor nodes can recognize that the node tries to find a new route when they receive the RREQ packet.

  • RREP (Route REPly) slot

    The nodes that receive the RREQ packets reply a RREP packet in the RREP slot. A RREP packet includes node’s hop count information. Therefore, the node that receives these RREP packets can recognize the nearest node to the sink node.

  • RCON (Route CONstruction) slot

    The RCON slot is meant for an actual route construction process between nodes. The node without a route requests a route construction by transmitting a RCREQ(Route Construction REQuest) packet to its upstream node. Then, the node that receives this RCREQ packet replies a RCREP(Route Construction REPly) packet to its downstream node. Finally, the node that receives the RCREP packet replies a RCACK(Route Construction ACKnowledgement) to verify the completion of the route construction process.

  • Data slot

    Each node transmits observed environmental information during the data slot. As we employ multi-hop communication, the data packets are forwarded from downstream nodes to the sink node through some nodes. Additionally, the data slot is subdivided into some sub-slots for the hop count from the sink node because some packets are interfered with each other. Nodes with a same hop count share their sub-slot in CSMA/CA.

  • ACK(ACKnowledgement) slot

    Nodes reply an ACKnowledgement packet when they receive a data packet from their downstream nodes. The AKC slot is also divided into some sub-slots according to the same reason for the data slot.

3.3 Routing Procedure

Figure 5 shows the example of packet transmission in the route construction process with the node location in Fig. 3. In the initial state, the sink node is the only node that has a route. In the first frame, all nodes transmit a RREQ packet to find a route. The sink node replies to nodes N1 and N2 in the RREP slot. Then, both nodes attempt to construct a route to the sink node in the RCON slot. In the second frame, all nodes except N1 and N2 also transmit a RREQ message. The node N1 replies to the nodes N3 and N4, and the node N2 replies to the nodes N5 and N8. The nodes N3, N4, N5, and N8 try to construct a route in a same manner in the first slot. Finally, the tree-based route has been constructed after the four frame cycles.

Fig. 5
figure 5

Signaling for routing

Fig. 6
figure 6

Data and ACK transmission

Fig. 7
figure 7

Location pattern 1

Fig. 8
figure 8

Location pattern 2

3.4 Data Transmission

Figure 6 shows the example of the packet transmission in the data transmission process with the node location in Fig. 3. The proposed protocol employs an acknowledgement operation in each hop count. Therefore, nodes reply an acknowledgement packet when they receive a data packet from their downstream nodes. The proposed data transmission process is started at the edge nodes with the maximum hop count (i.e., N9 and N10) because the forwarding process of data packets should be completed within a frame period.

4 Experimental Results

We have implemented the proposed data collection scheme on the developed Arduino-compatible board for the sensor network testbed. We employed Xbee S1 as a wireless communication module. In the evaluation, each node reports observed information to the sink node every one minute interval. The system has operated for 24 h to evaluate the packet arrival ratio. We assumed two types of node location in Figs. 7 and 8. We can confirm the routing procedures when a node has some candidate upstream nodes in the location of Fig. 7, and can validate the multi-hop relaying function in the location of Fig. 8. The specific frame parameters are detailed in Table 2.

From the experimental results, we can find that the average packet arrival ratio is 97.0 % in Fig. 7, and 98.7 % in Fig. 8. The main reason of the packet loss is an interference from WiFi signals because we have set the transmission power of Xbee to the minimum transmission level to reduce transmission range.

The developed board supports a sleep operation of ATMega 2560 chip and Xbee module. The consumption current during operation status is about 60 [mA] and that during sleep status is about 0.55 [mA]. Therefore, the developed board can work with a solar cell and a Li-Po battery autonomously when the board activates the sleep mode.

Table 2 Frame format parameters

5 Conclusion

This paper has proposed a new type of Arduino-compatible board for sensor networks, and has proposed a tree-based data collection scheme for low-power microcontrollers. The developed microcontroller board realizes a stable operation even if peripheral devices are attached to the board. The proposed protocol can work with low-power microcontrollers by reducing an amount of exchanging routing information, and can bring about a sleep operation of the board by employing the TDMA frame structure. From the experimental evaluations, we have found that the proposed protocol can work well on the developed Arduino-compatible board, and that the developed board can support low-power operation.