
LogicAnalyzer
gusmanb/logicanalyzer
24 channel, 100Msps logic analyzer hardware and software

bash # 1. 环境准备 git clone https://github.com/kkawo/har-project.git cd har-project pip install -r requirements.txt
Har shield is an open-source printed circuit board by kkawo, from the kkawo/har-project repository on GitHub. It is a 2-layer board of 96.8 × 93.5 mm with 10 parts on 47 nets, routed with 103 tracks and 13 vias.
Its parts include 4 connectors, 3 resistors, 2 capacitors and 1 diode.
基于惯性/磁传感器的人体活动模式识别系统设计与实现。
福建理工大学 智能科学与技术 | 《模式识别与统计学习》专周实训
孔子瑜(算法与工程)、李宝平(数据采集与固件) | 导师:郑积仕
从 PCB 设计→传感器标定→数据采集→特征工程→分类器对比→严格评估的 全链路 HAR 工程实践。
硬件: ESP32-S3 + MPU6050 (Acc+Gyro) + HMC5883L (Mag) → 9通道 @50Hz
活动: 7类(静坐/站立/步行/跑步/上楼/下楼/跌倒)
数据: 2被试, 566滑动窗口 (2.56s, 50%重叠)
特征: 292维(时域14+频域10/轴, 模长, 跨轴复合)
模型: 13种分类器 LOSO 系统对比
最佳: kNN (k=3,distance) + 多数表决 L=7 → Accuracy 59.5%
har-project/
├── src/ # 算法源码 (3,681行 Python)
│ ├── utils.py # 常量与路径配置
│ ├── preprocess.py # D3 信号预处理与窗口化
│ ├── features.py # D4 294维特征提取
│ ├── feature_selection.py # D5 特征选择与降维
│ ├── classifiers_baseline.py # D6 基线分类器
│ ├── models_advanced.py # D7 高级模型与调参
│ ├── evaluation.py # D8 模型评估
│ └── d9_advanced_exploration.py # D9 进阶探索
├── data/ # 数据资产
│ ├── raw/real/S01-S02/ # 真实数据 (14 CSV, 566窗口)
│ ├── windowed/ # 窗口化数据集
│ └── features/ # 特征矩阵
├── calib/ # 传感器标定参数
├── firmware/ # ESP32 MicroPython 固件
├── pcb/ # KiCad PCB 设计文件
├── reports/ # 报告与图表 (19+ PNG)
├── docs/ # 项目文档
├── 10.D1-10.D9/ # 各阶段交付物
├── 项目深度说明.md # 完整项目手册
└── HANDOVER.md # 交接文档| 排名 | 模型 | Accuracy | Macro F1 |
|---|---|---|---|
| 1 | kNN (k=3,distance) + MV L=7 | 0.595 | 0.569 |
| 2 | kNN (k=3,distance) | 0.564 | 0.527 |
| 3 | HMM Viterbi | 0.583 | 0.550 |
| 4 | LogisticRegression | 0.525 | 0.490 |
| 5 | MLP (128,64) | 0.507 | 0.472 |
| 6 | RBF_SVM | 0.472 | 0.430 |
| 7 | RandomForest | 0.424 | 0.386 |
| 类别 | Recall | 主要问题 |
|---|---|---|
| walk | 1.000 | — |
| upstairs | 0.935 | ↔ downstairs |
| stand | 0.674 | ↔ sit |
| run | 0.565 | ↔ walk, upstairs |
| fall | 0.500 | ↔ run |
| downstairs | 0.446 | ↔ upstairs |
| sit | 0.000 | ↔ stand (跨被试特征偏移) |
# 1. 环境准备
git clone https://github.com/kkawo/har-project.git
cd har-project
pip install -r requirements.txt
# 2. 确认真实数据就绪
ls data/raw/real/S01/ # 应有 7 个 CSV
ls data/raw/real/S02/ # 应有 7 个 CSV
# 3. 全链路运行 (约5分钟)
python src/preprocess.py && \
python src/features.py && \
python src/feature_selection.py && \
python src/classifiers_baseline.py && \
python src/models_advanced.py && \
python src/evaluation.py && \
python src/d9_advanced_exploration.py
# 4. 生成答辩PPT
python src/d10_generate_ppt.py
# 5. 查看结果
ls reports/d9_*.png # D9 进阶探索图表
ls reports/d8_*.png # D8 评估图表
cat reports/d9_exploration_summary.json # 数值结果| 文档 | 说明 |
|---|---|
| 项目深度说明 | 完整的项目手册,包含架构、数据流、决策、结果 |
| HANDOVER | 新会话接手检查清单 |
| 项目状态 | 当前进度与 Open Issues |
| 答辩问答库 | 25+ 答辩常见问题与答案 |
| 最终报告 | 课程论文 (5000+字) |
| AI使用记录 | AI 协作开发记录 |
| 角色 | 成员 |
|---|---|
| 数据采集与固件 | 李宝平 |
| 算法与工程 | 孔子瑜 |
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | Conn_01x22 | Connector_PinHeader_2.54mm:PinHeader_1x22_P2.54mm_Vertical | J1, J2 |
| 1 | 100nF | Capacitor_SMD:C_0805_2012Metric | C2 |
| 1 | 220 | Resistor_SMD:R_0805_2012Metric | R3 |
| 1 | 4.7k | Resistor_SMD:R_0805_2012Metric | R2 |
| 1 | C | Capacitor_SMD:C_0805_2012Metric | C1 |
| 1 | Conn_01x05 | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J104 |
| 1 | Conn_01x08 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J103 |
| 1 | LED | LED_SMD:LED_0805_2012Metric | D1 |
| 1 | R | Resistor_SMD:R_0805_2012Metric | R1 |
It measures 96.8 × 93.5 mm and has 2 copper layers, 1.6 mm thick.
10 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the kkawo/har-project repository on GitHub, at the commit this page was made from: the board is pcb/har-shield/har-shield.kicad_pcb and its schematic 10.D1/har-shield.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask kkawo before reusing the design.

gusmanb/logicanalyzer
24 channel, 100Msps logic analyzer hardware and software

byrantech/laptop
anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

joeycastillo/Sensor-Watch
A board replacement for the classic Casio F-91W wristwatch


OLIMEX/OLINUXINO
OLINUXINO is Open Source / Open Hardware, low cost from EUR 24 Linux Industrial grade Single Board Computer capable to operate -25+85C

rusefi/rusefi
rusefi - GPL internal combustion engine control unit

VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI