Skip to content

synercys/PIRMedic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 PIRMedic

πŸ“ Repository Overview

This repository contains the code, data, and notebooks used to analyze and diagnose faults in PIR sensors.


πŸ“¦ Directory Structure

πŸ““ src/ β€” Code used in the edge platform: *Arduino* and *Raspberry Pi*
Folder Purpose
edge_platform/arduino Data collection sketches used in the Arduino Microcontroller
edge_platform/raspberrypi Data Analysis & Feature extraction python code used in the Raspberry Pi
matlab MATLAB Visualization scripts for frequency visualization and K-S statistic computation
πŸ““ scripts/ β€” Helper scripts to plot data from different lens types and converting ADC values into voltages
Folder Purpose
plot_single_sensor_ADC_count.py Helper script to plot voltages from ADC values
plot_single_sensor_lens_types.py Helper script to analyze nature of voltage waveforms from different lens types
πŸ“Š dataset/ β€” Raw & Processed Data
Path Description
FaultDetection/faulty_vs_working.csv Time-domain of Aout signals from working and faulty sensors
FaultDetectionFeatures/ Extracted FFT and FFT-based features for classifying PIR sensor health
FineGrainedFaultAnalysis/ Time-domain of Aout signals from Class III faulty sensors
FineGrainedFaultAnalysisFeatures/ FFT-based features for diagnosing specific Class III fault types
deployments/ Data (raw and processed) from real-world deployments: Elevator, Lobby, Starbucks
πŸ““ notebooks/ β€” Jupyter Notebooks
Folder Purpose
FaultDetection/ Notebooks for detecting faulty vs. working sensors
FineGrainedFaultAnalysis/ Notebooks for diagnosing Class III faults (paper, tape, dust)
πŸ““ docs/ β€” Back of the Envelope Calculations + Warm-up Analysis
Folder Purpose
back_of_envelope_analysis/ Data collected from sensors in the lab that were subjected to thermal stress
warmup_analysis.md Notes containing observations from warm-up analysis in PIR sensors

πŸ› οΈ Getting Started

  • git clone https://github.com/synercys/PIRMedic.git
  • Flash the appropriate sketch on Arduino from src/edge_platform/arduino depending on the number and type of PIR sensors
  • Connect the Arduino to the Raspberry Pi using a serial cable and note the serial device
    • e.g., /dev/cu.usbmodem1421
  • Copy src/edge_platform/arduino onto the Raspberry Pi using scp
  • Run main.py using python3 main.py.
    • main.py will read the data collected from the Arduino through the serial device and store the features in data/ directory on the Raspberry Pi
  • For fault detection or fault diagnosis, when needed run the corresponding jupyter notebook from notebooks/ on the Raspberry Pi
    • The notebooks can also be run on a separate server, provided data/ from the Raspberry Pi is copied to it

πŸ“Œ Highlights

  • βœ… Real-world PIR sensor fault data
  • βš™οΈ FFT and machine learning-based feature extraction
  • πŸ” Fine-grained fault classification for Class III anomalies
  • πŸ“ˆ Includes deployment data from varied environments

πŸ“š Citation

Please read the paper from ACM TOSN and BuildSys for additional information


Releases

No releases published

Packages

No packages published

Languages