portfolio/Wi-Fi Latency Tracker

Wi-Fi Latency Tracker

Real-time IoT visualization system demonstrating complete sensor-to-dashboard data pipeline with microsecond-precision network monitoring.

Raspberry Pi Pico WInfluxDBGrafanaC LanguageDocker

Overview

A real-time IoT visualization system that demonstrates the implementation of a complete sensor data monitoring solution. The project showcases the integration of embedded IoT devices with modern data visualization technologies, creating a production-ready dashboard for network performance monitoring.

The system continuously measures Wi-Fi network latency and device temperature, providing microsecond-precision data visualization through a comprehensive Grafana dashboard. For the time series storage and visualization infrastructure, I have explained already how I used Docker for both InfluxDB and Grafana in my OpenSky project.

Project Goal: While this implementation uses a Raspberry Pi Pico W as the sensor node, the architecture is hardware-agnostic and can be adapted to any IoT device capable of Wi-Fi communication, such as ESP32 or similar microcontrollers. The focus is on demonstrating a complete IoT data pipeline from sensor to visualization.

Key Features

  • Real-time dashboard - microsecond-precision latency monitoring
  • Containerized infrastructure - easy deployment and scaling with Docker
  • Automated data collection - continuous storage in InfluxDB time series database
  • Custom Grafana dashboards - intuitive visualization for network metrics
  • Hardware-agnostic architecture - adaptable to any Wi-Fi-capable IoT device
  • Robust error handling - exponential backoff and auto-recovery mechanisms

Technical Implementation

Data Flow Architecture

The system implements a robust data pipeline:

  • IoT Device → Data Collection → InfluxDB → Grafana Dashboard
  • Containerized services for consistent deployment across environments
  • Automated data ingestion and real-time processing capabilities

InfluxDB Schema

The time series database schema is optimized for network monitoring metrics:

InfluxDB Schema
measurement: wifi_measurements
tags:
  - host: PicoW
fields:
  - rtt_avg (microseconds)
  - rtt_min (microseconds)
  - rtt_max (microseconds)
  - jitter (microseconds)
  - loss (percentage)
  - temperature (Celsius)

Network Monitoring Implementation

The core ICMP implementation provides precise latency measurements:

C
typedef struct __attribute__((packed)) {
    uint8_t type;
    uint8_t code;
    uint16_t checksum;
    uint16_t id;
    uint16_t sequence;
    uint32_t timestamp;
} ICMP_EchoHeader_t;

Hardware Setup

This implementation uses a Raspberry Pi Pico W as the sensor node, but the system is designed to work with any Wi-Fi-capable IoT device. The architecture abstracts the hardware layer, making it easy to adapt to different platforms.

Key hardware features utilized:

  • Wi-Fi connectivity - CYW43439 wireless chip for data transmission
  • Internal temperature measurement - via ADC for environmental monitoring
  • Low power design - optimized for continuous IoT operation

Technologies Used

Infrastructure

  • Docker & Docker Compose - containerized infrastructure
  • InfluxDB - time series data storage
  • Grafana - real-time data visualization

IoT Platform

  • Raspberry Pi Pico W - CYW43439 Wi-Fi chip
  • C programming - hardware abstraction layer
  • ICMP implementation - precise latency measurements

Monitoring

  • Microsecond precision - timing measurements
  • Network statistics - RTT, jitter, packet loss
  • Temperature monitoring - device health tracking

Reliability

  • Error handling - exponential backoff
  • Auto-recovery - connection resilience
  • Hardware-agnostic - portable architecture

Technical Challenges

  • Designing scalable architecture for real-time data processing - implemented containerized microservices with Docker
  • Implementing efficient data collection with minimal overhead - optimized ICMP implementation with hardware timers
  • Creating intuitive visualization interface for complex metrics - custom Grafana dashboards with network performance insights
  • Ensuring system reliability with automated recovery mechanisms - exponential backoff and connection resilience
  • Optimizing data storage for long-term metric retention - InfluxDB time series database with efficient schema design
  • Implementing precise timing measurements for accurate statistics - microsecond-precision measurements using hardware capabilities