Sensor Interfacing

Session 02: IMU Sensors และ Motion Processing (3 ชั่วโมง)

หลักสูตร: IoT & Edge AI with PSoC Edge E84

ผู้สอน: อ.วิรุฬห์ ศรีบริรักษ์ (อ.จอม)

ภาควิชาวิศวกรรมไฟฟ้า คณะวิศวกรรมศาสตร์ มหาวิทยาลัยบูรพา


วัตถุประสงค์การเรียนรู้

หลังจบ Session นี้ นิสิตจะสามารถ:

  1. เข้าใจการทำงานของ IMU Sensor (BMI270) และการอ่านค่าผ่าน I2C

  2. แปลงค่า Raw Data เป็นหน่วยทางฟิสิกส์ (m/s², rad/s)

  3. เพิ่มฟังก์ชันประมวลผลข้อมูล (Magnitude, Motion Detection, Filtering)

  4. ใช้ C Programming - Arrays, Structs, Pointers กับข้อมูล Sensor


โปรเจกต์หลัก (Base Project)

mtb-example-psoc-edge-sensor-hub-imu
├── proj_cm33_s/              # Secure Project
├── proj_cm33_ns/             # Non-Secure Project (เราทำงานที่นี่)
│   ├── main.c
│   ├── sensor_hub_daq_task.c # <-- ไฟล์หลักที่เราจะเรียนรู้และต่อยอด
│   └── sensor_hub_daq_task.h
└── proj_cm55/                # CM55 Project

สำคัญ: Labs ทั้งหมดจะเป็นการเพิ่มฟังก์ชันเข้าไปใน sensor_hub_daq_task.c ไม่ใช่การสร้างโปรเจกต์ใหม่!


โครงสร้างการเรียนรู้ (3 ชั่วโมง)

ลำดับ
หัวข้อ
เวลา

1

ภาพรวม IMU Sensor และ I2C

20 นาที

2

Lab 1: ทำความเข้าใจโค้ด Sensor Hub

25 นาที

3

Lab 2: คำนวณ Acceleration Magnitude

25 นาที

4

Lab 3: ตรวจจับการเคลื่อนไหว

30 นาที

5

Lab 4: Moving Average Filter

30 นาที

6

Lab 5: ระบบ Motion Detection สมบูรณ์

30 นาที

7

สรุปและแบบทดสอบ

20 นาที

ภาพรวม IMU Sensor (Accelerometer + Gyroscope)

จบ Session 2 | ต่อไป: Session 3: LVGL Display

Last updated

Was this helpful?