# Routing Algorithm for Sensor Network Monitoring the Condition of Mining Equipment
## 5 First Iteration of Algorithm Implementation in Hardware Units  
In the first stage of the research work, the presented algorithms were implemented in a physical model of a three-node sensor network in order to verify their practical functionality. During the tests, data packets were sent between the nodes of the network and, in addition, each node sent diagnostic data to a PC via a serial link. This involved developing a way to measure the transmission parameters listed in Table 1, i.e., packet transmission time from source to destination, throughput, reliability of data delivery to destination and energy consumption of each node in the network.  
Figure 5 presents the test bench with which the validation tests were carried out, consisting of radio modules connected to a PC.  
To measure the amount of energy consumed by each node in the network, the current drawn by a single node was measured. A Power Profiler Kit NRF6707 (Nordic Semiconduc  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**No.** & **Criterion [Unit]** & **Criterion Description** \\ \hline
1 & Network throughput [kB/s] & Also referred to as data speed, it is the amount of data transmitted over the network per second \\ \hline
2 & Time for the package to reach its destination [ms] & Time measured in milliseconds from the time the data is sent from the source node to the time the data arrives at the destination node \\ \hline
3 & Energy savings [m]/kB & Amount of energy consumed by a network node during transmission of 1 kB of data \\ \hline
4 & Assurance of the delivery of data to destination [\%] & Referred to as PDR (packet delivery ratio), the ratio of packets sent to received \\ \hline \hline \end{tabular}
\end{table}
Table 1: Criteria for selecting the most favourable route of the sent data package.  
Figure 5: Validation process test bench.  
tor, Trondheim, Norway) current measurement module was used to measure the current of each node via an NRF Connect application (Figure 6).  
During the algorithm validation process, the values of each criterion were measured; the results are shown in Figure 7.  
Similar results were obtained for each implemented algorithm. The average current consumed by a network node was similar for each algorithm at around 1 mA, with the network nodes with the modified bee algorithm implemented showing the lowest power consumption. The average packet arrival time to the destination node was less than 100 ms,  
Figure 6: Current measurement with the Power Profiler Kit.  
Figure 7: Packet arrival time to destination and network throughput—data for a single packet transmitted from a NODE node to a SINK node.  
and for most packets it was less than 50 ms (the average time and throughput values are shown on the orange lines in the graphs in Figure 7). The shortest packet arrival times to the destination were obtained for the ant-based algorithm and the particle swarm optimisation algorithm.  
In the functional tests, the correct functioning of the validation environment was observed. The implementation of the ACO and BEE algorithms requires the acquisition and storage of data on routes, neighbours and network parameters. In small networks of three nodes, this is not a problem. However, in larger networks, the simple microcontrollers used in NODE nodes may not be sufficient in terms of available memory and computing power, especially due to their low power consumption. It is therefore envisaged in the next stage to implement the PSO algorithm using elements of the ACO algorithm in a network consisting of a larger number of nodes.