Ghost-Desk Monitor

Docs

Formal write-ups for the professor · เอกสารทางการส่งอาจารย์ ภาษาอังกฤษและภาษาไทย · Proposal ส่งศุกร์ 30 ต.ค. · Final report โตไปพร้อมงาน ช่องที่ยังต้องเติมมีกรอบบอกไว้

Ghost-Desk Monitor

Project proposal: a desk sign that verifies whether a library seat is really in use

Course
Embedded System (CEDT), Final Project 2026: Smart Devices
Group
[group]
Members
[five members, see Roles]
Date
30 October 2026
Repository
https://github.com/jiraphatnam2204/ghost-desk-monitor

1. Problem and target usersDraft

During examination periods, many university library desks are reserved with belongings (bags, books) while their owners are absent for long periods. Students who need a seat cannot find one, and library staff have neither the data nor the time to check every desk. Existing QR seat-booking systems record that a desk was booked, not whether anyone is actually sitting there.

User groupNeedWhat the system provides
Students looking for a seatKnow at a glance which desks are really freeA three-face sign on each desk and a live room map on the web
Students using a deskStep away briefly without losing the deskAn “away” state and a LINE warning at 20 minutes
Library staffFind abandoned belongings, crowding and noise without patrollingA staff page with leftover-item flags, CO₂ and sound level

To fill inEvidence to add before submission: (1) a ghost-desk count in the faculty library, two rounds 30 minutes apart (total desks, occupied, belongings without a person); (2) a 5-question Google Form with at least 30 responses (time spent finding a seat, experience of ghost desks, acceptance of a 30-minute rule, acceptance of an on-device camera). Insert two or three figures from these results here.

2. System overview and block diagramDraft

Each desk has a sensor node that detects whether a person is present (24 GHz mmWave radar, 8×8 thermal array and an on-board camera classifier) and turns a three-face prism sign (in use / away / free) with a servo. Nodes report to a single gateway over ESP-NOW. The gateway owns the per-desk state machine and timers, reads its own room sensors, uploads raw data to Supabase over HTTPS, and sends LINE alerts. A static web dashboard shows the room map and a staff view. Camera images never leave the node; only the classification result is transmitted.

Sensor node × 2 (per desk)FireBeetle 2 ESP32-S3LD2410 mmWave (UART, OUT)AMG8833 thermal (I²C)OV2640 + on-device AIServo 270° → prism signGateway × 1YD-ESP32-23 (ESP32-S3)SCD41 CO₂ (I²C)BH1750 light (I²C)MAX4466 mic (ADC1)State machine + timersCloudSupabase PostgresREST insert + RealtimeDashboardRoom map web pageLINE Official Accountbroadcast at 20 minESP-NOW reportSET_SIGN, ackHTTPSRealtimeMessaging API
Figure 1. Block diagram: two sensor nodes, one gateway, cloud storage, dashboard and LINE notification.

Desk rule. A desk becomes in use after a person has been detected for 60 seconds; there is no check-in. When no one has been seen for 2 minutes, the gateway reads the latest camera class: empty releases the desk immediately, items_only marks it away, sends a LINE warning at 20 minutes and releases it at 30 minutes with a leftover-item flag for staff, and person keeps it in use. If no recent AI result is available, the plain 30-minute rule applies.

3. Sensors, actuators and bill of materialsDraft

Table 1. Bill of materials. Prices checked on Thai shop pages on 28 Oct 2026, excluding shipping; items marked ~ are estimates. The camera is not counted toward M1: five sensor types are met without it (two on the node, three on the gateway).
PartBoardQtyInterfacePrice (THB)Note
FireBeetle 2 ESP32-S3 + OV2640Node2Camera on FPC2,370MCU and camera; on-device AI
HLK-LD2410 mmWave 24 GHzNode2UART + OUT pin360Sensor 1: presence, including still sitting
GY-AMG8833 thermal 8×8Node2I²C3,300Sensor 2: person vs. objects; to be borrowed
TD-7120MG servo 0–270°Node2PWM880Actuator: turns the three-face sign
YD-ESP32-23 (ESP32-S3)Gateway1Wi-Fi + ESP-NOW0Already owned (Lab 10 board)
SCD41 CO₂Gateway1I²C820Sensor 3: CO₂, temperature, humidity
MAX4466 analog microphoneGateway1ADC~100Sensor 4: sound level; price estimated
GY-302 BH1750Gateway1I²C50Sensor 5: ambient light
5 V 2 A adaptersNode, gateway3DC jack / USB-C390Stable supply for camera, Wi-Fi and servo
Wires, capacitors, enclosure, printing———~400Estimate
Total———~8,670~5,370 if the two AMG8833 are borrowed

4. Embedded Engineering Depth itemsDraft

ItemImplementation plan
E1 RTOS multitaskingFreeRTOS on the node with at least four tasks (radar, thermal, vision, communication, sign) with reasoned priorities, exchanging results through a queue and protecting the I²C bus with a mutex.
E2 Interrupt-driven I/OThe LD2410 OUT pin triggers an ISR that gives a semaphore to wake the radar task (deferred processing, no polling).
E4 Reliable communicationESP-NOW acknowledgement from the send callback with up to three retries; the gateway buffers records in RAM and forwards them when the Internet returns.
E5 SecurityHTTPS (TLS) to Supabase; Wi-Fi password, API key and LINE token kept in an uncommitted secrets.h.
E7 On-device AIEdge Impulse image classifier (empty / person / items_only) running on the ESP32-S3; go/no-go review on 13 Nov 2026.
Spare: E6 OTA updateArduinoOTA; used in place of E7 if inference moves to a laptop or Raspberry Pi.

5. Minimum requirementsDraft

ItemHow it is met
M1Node: LD2410, AMG8833. Gateway: SCD41, MAX4466, BH1750 (five types, camera not counted).
M2270° servo turning the prism sign.
M3ESP-NOW from node to gateway.
M4Camera classifier decides whether an unattended desk is released immediately or held, which drives the sign and the staff alert.
M5Raw data in Supabase (Postgres) with a web dashboard.
M6LINE Messaging API broadcast at 20 minutes.
M75 V supply only; the servo has a mechanical stop and a command timeout.
M8Public Git repository with commits from every member.

6. RolesDraft

RoleMemberResponsibilities
System Architect & Integration[name]Block diagram, message format, state machine, integration
Embedded Developer (Sensor Node)[name]Node firmware: FreeRTOS, LD2410, AMG8833, servo, ISR
AI & Node Vision[name]Dataset, Edge Impulse model, deployment on the ESP32-S3
Embedded Developer (Gateway & Cloud)[name]ESP-NOW, state machine, buffering, Supabase, TLS, LINE
UI/UX Dashboard, Project Manager & Test Lead[name]Dashboard, timeline, test plan and performance metrics

7. TimelineDraft

DateMilestone
30 OctProposal submitted; parts ordered
6 NovEvery sensor read separately; message format frozen
13 NovOn-device AI go/no-go review
20 NovCheckpoint video: node → gateway → cloud → dashboard
30 NovFeature freeze; 24-hour test and metric collection
8 DecPresentation, live demonstration and final submission