Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 2.08 KB

File metadata and controls

42 lines (28 loc) · 2.08 KB

⚙️ Industrial IoT Sensor Firmware Simulation

C Embedded Systems IoT

📋 Executive Summary

This project simulates the low-level firmware of an Industrial Data Acquisition System (DAQ). Written in pure C, it mimics the behavior of edge devices attached to rotating machinery, generating high-frequency telemetry data (Temperature & Vibration) and performing real-time health checks.

This is the Layer 1 (Hardware) of my End-to-End Data Portfolio. The data generated here acts as the input for my Digital Twin AI Project (Python).


🏗️ Technical Architecture

Unlike high-level scripts, this C program focuses on memory efficiency and execution speed, simulating constraints typical of microcontrollers.

  • Core Function: run_daq_process()
  • Data Structure: Uses struct MachineState to organize volatile sensor data in memory.
  • Edge Computing: Implements a local diagnosis algorithm (diagnose_state) to flag critical failures before data transmission, reducing cloud latency.

💻 Key Features

  • 🚀 High Performance: Generates synthetic telemetry streams with negligible overhead.
  • 💾 File I/O Management: Buffers and writes structured data to sensor_data.csv (CSV format).
  • 🖥️ CLI Dashboard: Includes a formatted command-line interface table for on-site debugging.
  • ⚠️ Anomaly Injection: Probabilistically injects "Critical Failure" states to test downstream AI models.

⚙️ How to Compile & Run

This project is cross-platform (Windows/Linux/macOS).

Prerequisites: A standard C compiler (GCC/Clang/MinGW).

# 1. Compile the firmware
gcc main.c -o sensor_firmware

# 2. Run the simulation
# (Follow the interactive prompts to set Machine ID and Sampling Rate)
./sensor_firmware