ทำไมไม่ใช้อุปกรณ์สวมใส่?
ผู้สูงอายุมักลืมสวม smartwatch หรือ fall detector เครือข่าย FSR ในพื้นทำงาน แบบ passive — ไม่ต้องสวม ชาร์จ หรือตั้งค่าอะไร เพียงแค่เดินผ่านก็เก็บข้อมูลได้
หลักการทำงาน: Center of Pressure (COP)
เมื่อคนเดิน แรงดันระหว่างเท้าซ้าย-ขวาควรสมดุล (~50:50) การเปลี่ยนแปลงต่อเนื่อง เช่น เท้าขวารับน้ำหนัก 65%+ มากกว่า 3 วัน บ่งชี้ pain avoidance หรือ muscle weakness ที่นำไปสู่ความเสี่ยงหกล้ม
COP_x = Σ(F_i × x_i) / Σ(F_i) # แกนซ้าย-ขวา COP_y = Σ(F_i × y_i) / Σ(F_i) # แกนหน้า-หลัง Asymmetry = |F_left - F_right| / (F_left + F_right) × 100%
Hardware: FSR Matrix บน ESP32
อุปกรณ์หลัก: - FSR402 หรือ FSR406 (round/square sensor, 0–100N) - CD74HC4067 16-channel analog multiplexer - ESP32 DevKit (ADC 12-bit) - แผ่น EVA foam กันน้ำ 10mm สำหรับฝัง FSR - แผ่นโพลีคาร์บอเนต 3mm ปิดทับ (กันน้ำ + ทนการเหยียบ)
วงจร: FSR + ตัวต้านทาน 10kΩ เป็น voltage divider → CD74HC4067 → ESP32 ADC
c // ESP32 firmware — อ่านค่า FSR 16 ตัวผ่าน multiplexer #include <Arduino.h> #include <WiFi.h> #include <PubSubClient.h> const int MUX_S0 = 12, MUX_S1 = 13, MUX_S2 = 14, MUX_S3 = 15; const int MUX_SIG = 34; const int NUM_SENSORS = 16; float readings[NUM_SENSORS]; void selectChannel(int ch) { digitalWrite(MUX_S0, ch & 1); digitalWrite(MUX_S1, (ch >> 1) & 1); digitalWrite(MUX_S2, (ch >> 2) & 1); digitalWrite(MUX_S3, (ch >> 3) & 1); } void readAllFSR() { for (int i = 0; i < NUM_SENSORS; i++) { selectChannel(i); delayMicroseconds(10); int raw = analogRead(MUX_SIG); // แปลง ADC เป็น Newton (calibrate ด้วยน้ำหนักอ้างอิง) readings[i] = (raw / 4095.0) * 100.0; } }
Python: วิเคราะห์ Gait Asymmetry
python import numpy as np import json from datetime import datetime def compute_cop_and_asymmetry(left_sensors: list, right_sensors: list) -> dict: """ left_sensors: แรงดัน Newton จาก FSR 8 ตัวฝั่งซ้าย right_sensors: แรงดัน Newton จาก FSR 8 ตัวฝั่งขวา """ F_left = sum(left_sensors) F_right = sum(right_sensors) F_total = F_left + F_right if F_total < 10: # ไม่มีคนเหยียบ return {"standing": False} asymmetry = abs(F_left - F_right) / F_total * 100 # COP ตำแหน่ง (สมมติ sensor ซ้าย x=-1, ขวา x=+1) cop_x = (F_right - F_left) / F_total return { "standing": True, "f_left": round(F_left, 2), "f_right": round(F_right, 2), "asymmetry_pct": round(asymmetry, 1), "cop_x": round(cop_x, 3), "fall_risk": asymmetry > 20 or F_total < 30, "timestamp": datetime.now().isoformat() } # วิเคราะห์ trend 7 วัน def compute_weekly_fall_risk(daily_asymmetries: list) -> str: avg = np.mean(daily_asymmetries) trend = np.polyfit(range(len(daily_asymmetries)), daily_asymmetries, 1)[0] if avg > 25 and trend > 1.0: return "HIGH" elif avg > 15: return "MEDIUM" return "LOW"
Layout พื้น: Bilateral FSR Mat
[FSR 1-8: ฝั่งซ้าย] | [FSR 9-16: ฝั่งขวา] ← 30cm → | ← 30cm → ┌───────────────────────────────────────┐ │ ● ● ● ● │ ● ● ● ● │ แถวหน้า │ ● ● ● ● │ ● ● ● ● │ แถวหลัง └───────────────────────────────────────┘ ↑ 60cm × ติดตั้งที่ทางเดินหน้าห้องน้ำ
ตำแหน่งที่ดีที่สุดคือ ทางเดินหน้าห้องน้ำ — ผู้สูงอายุเดินผ่านอย่างน้อย 4–6 ครั้ง/วัน ทำให้ได้ข้อมูล baseline ที่เพียงพอ
HA Integration ผ่าน MQTT
yaml # configuration.yaml mqtt: sensor: - name: Floor Pressure Left state_topic: home/floor_mat/left_force unit_of_measurement: N - name: Floor Pressure Right state_topic: home/floor_mat/right_force unit_of_measurement: N - name: Gait Asymmetry state_topic: home/floor_mat/asymmetry unit_of_measurement: "%" - name: Fall Risk Level state_topic: home/floor_mat/fall_risk template: - binary_sensor: - name: Fall Risk Alert state: "{{ states('sensor.fall_risk_level') in ['HIGH', 'MEDIUM'] }}" device_class: problem
LINE แจ้งผู้ดูแล
yaml alias: Fall Risk — High Alert trigger: - platform: state entity_id: sensor.fall_risk_level to: "HIGH" action: - service: notify.line_notify data: message: >- ⚠️ ความเสี่ยงหกล้มสูง — ผู้สูงอายุ ความไม่สมมาตรการเดิน: {{ states('sensor.gait_asymmetry') }}% กรุณาตรวจสอบ {{ now().strftime('%d/%m %H:%M') }}
สรุป
ระบบ FSR floor mat ราคาต้นทุนต่ำกว่า 3,000 บาท ตรวจจับ gait asymmetry ได้อย่างต่อเนื่องโดยไม่รบกวนชีวิตประจำวัน เหมาะกับผู้สูงอายุที่ไม่ยินดีสวมอุปกรณ์