IoT – Datatransmission with poor Wi-Fi connectivity

In a connected world where devices increasingly communicate with each other, the Internet of Things (IoT) is at the heart of this technological revolution. In this article, our experts from Data Respons Subsidiary IT Sonix take a look at the challenges the Internet of Things (IoT) faces when it encounters an unstable Wi-Fi connection in an industrial context.

  • Published: 24. August 2023
  • Company: IT Sonix

An excellent summary of IoT comes from McKinsey:

The Internet of Things (IoT) describes physical objects embedded with sensors and actuators that communicate with computing systems via wired or wireless networks—allowing the physical world to be digitally monitored or even controlled.

IoT devices have diverse applications across various industries and sectors. For example, common use cases include smart automation, industrial monitoring and control, transportation and logistics and energy management.

Monitoring plays a crucial role in many of these applications, where IoT devices are often installed near the data source to be monitored. However, this positioning may not always be optimal for a strong Wi-Fi reception. Various factors contribute to poor Wi-Fi signals.

IoT – Datatransmission with poor Wi-Fi connectivity
While it’s possible to address these problems with solutions like additional routers, better hardware, or mobile network connections, such measures would increase hardware costs. The scalability of an IoT application heavily depends on keeping hardware costs in check. Therefore, a more efficient approach is to focus on transmitting monitored data reliably. To achieve an efficient implementation, the computational power of the IoT device and the type of data being transmitted must be considered.

Problem description

We have different causes for connection problems. Our IoT devices are installed in large halls with various metal infrastructures. These metal infrastructures can weaken the Wi-Fi signals. In addition, there are other interfering factors such as other Wi-Fi networks, electronic devices and machines. Another factor for possible connection problems can be the number of installed IoT devices.

Traditional solutions like more routers or better hardware are costly and may not fully resolve the connectivity issues. The IoT devices are installed in suboptimal positions for good Wi-Fi connectivity due to the need to capture sound data while keeping background noise to a minimum.

We have developed an IoT device that records sounds and sends this sound data to a computing system for the purpose of predictive maintenance. The IoT device includes standard microcontroller components like CPU, RAM, and different interfaces. It is equipped with a sound chip, microphone, and light barrier. The device’s purpose is to record the sound of a conveyor belt or a sorter and transmit the data to a cloud system using MQTT. In the cloud, we aim to calculate maintenance predictions for the respective parts of the conveyor belt/sorter.

The light barrier is used to identify the start of the conveyor belt/sorter and map the recorded sound data to the corresponding machine part. While this adds additional data to be transferred to the cloud, it consists of only one timestamp every few minutes.

The recorded raw sound data amounts to several gigabytes per day, making it impractical to send the complete raw data to the computing system. Price considerations and message limitations imposed by the cloud system necessitate a reduction in data volume. The cloud system imposes a message size limit of 4kB, as well as a limit on the number of messages.

However, it is crucial to minimize the loss of sound data during transmission, as the maintenance prediction algorithm heavily relies on it.

To ensure cost-effective scalability, we need an innovative data transmission approach. By optimizing data compression, managing transmission frequency, and tracking messages efficiently, we can overcome these challenges. This way, we deliver sound data reliably to the cloud for maintenance predictions, even in demanding environments.

Solution

Given the challenging installation locations of our IoT devices, as well as the fragile Wi-Fi connection and limited budget for MQTT messages, we are highly motivated to reduce the amount of data to be transferred. Fortunately, this is achievable by utilizing the Fast Fourier Transformation (FFT) on the recorded sound data and further compressing it. We were able to compress the data enough to reduce the message frequency to one message per device per minute.

The FFT and further compressions are performed exclusively on one core of the IoT device. With only two CPU cores, the second core handles other essential tasks such as managing the Wi-Fi connection, constructing MQTT messages for the cloud system, time synchronization, task supervision, and more:

  1. Limited Device Resources: Our IoT device operates within confined computational power and memory boundaries
  2. Location-Induced Disruptions: Regular connection interruptions arise due to suboptimal device placements within the environment
  3. Network Congestion: The presence of similar IoT devices running on the same Wi-Fi network can contribute to connectivity congestion
  4. Message Tracking: Minimizing unnecessary retransmissions of successfully transmitted data is paramount to optimizing overall transmission efficiency
  5. Data Volume Impact: High-volume data transmissions raise the likelihood of connection disruptions
  6. Stability Through Consistency: Consistent data transmissions curtail the likelihood of connection hiccups

While the first three points are non-negotiable due to budgetary considerations and environmental constraints, we can harness our transmission algorithm’s design to diminish the odds of connection disruptions.

The cloud system acknowledges the receipt of messages, enabling straightforward tracking of received messages on the IoT device. Our tests indicate that out-of-order acknowledgments are almost never received, making message tracking computationally inexpensive.

To buffer messages, we adopt a ring buffer (circular buffer) structure. This architecture adeptly stores a fixed-size element set, facilitating efficient insertions and removals by overwriting the oldest data when the buffer reaches its capacity. In our context, this buffer accommodates 5 minutes’ worth of data – a sufficient size confirmed through experimentation. Should this buffer prove inadequate during connection disconnections, it indicates a larger environmental issue. In such cases, it’s preferable to acknowledge the data loss and initiate a new transmission. Attempting to recover the missing data in such scenarios is unlikely to yield success.

We mitigate the likelihood of connection interruptions by orchestrating a steady data transmission rhythm. Consider two closely located sensors; if one experiences a disconnection and subsequently attempts to send accumulated data immediately upon reconnection, the risk of triggering another disconnection heightens. This situation can also cascade into causing connectivity issues for nearby sensors. This challenge is effectively sidestepped by employing continuous transmission with a consistent data quantum. This approach stabilizes Wi-Fi connections and drastically reduces the probability of connection losses. Thus, we opt to transmit two messages in succession instead of one, ensuring a uniform data volume and elevating the prospects of uninterrupted data transmission. After the data stored during the disconnect has been transferred, the transfer rate drops back to one message per second.

With this strategy for transmitting our recorded data to the cloud system, we achieve minimal data loss and can analyse the data to provide reliable maintenance predictions.

Conclusion

An effective solution is attained by thoroughly analysing the problem at hand. In our case, we recognize the potential for data compression and the constant nature of the data output. Leveraging these factors, we design an algorithm for data transmission that reduces the probability of connection interruptions while preventing task overload of the IoT device.

This article was originally posted by Data Respons Subsidiary IT Sonix.

Want to know more?

Contact IT Sonix

Main contact form