DCP‑400 – Implementation

Document ID: DCP‑400

Project Title: [Smart Lab Sensor Network]

Team: [Team name / number]

Revision: Rev [1.0]

Date: [YYYY‑MM‑DD]

Related Documents:


1. Purpose and Scope

This document (DCP‑400) records the implementation of the system defined in DCP‑300, including:

This document covers Stage 5 of the capstone V‑Model lifecycle (Implementation / Construction).


2. References

List the standards, course documents, and internal references that govern implementation and CM.


3. System Overview (From Design to Implementation)

Provide a brief summary of the system and how its implementation is organized, referencing DCP‑300.

3.1 System Description (Summary)

The project is a [brief description, e.g., “wireless sensor network for monitoring temperature and humidity in teaching labs”].

The system comprises:

3.2 Mapping of Design Components to Implementations

The architecture and component breakdown are defined in DCP‑300.

Implementation in Stage 5 realizes each component (CMP-*) through one or more implementation items (IMP-*), as documented in Section 4 (Implementation Items).

:::

This section is a bridge from DCP‑300 (design) to this document (implementation).

Keep it short; details belong in Section 4.


4. Implementation Items (IMP-*)

This section lists all implementation items that realize the designed components (CMP-*).

Each IMP-* ID should be traceable in the RTM and in your repositories.

4.1 Implementation Item Summary Table

IMP ID CMP ID(s) Type Short Description Location / Repo Path Status
IMP-SW-010A CMP-SW-010 SW (UI) Dashboard UI (Vue app) git@gitlab:teamX/labdash-ui.git Implemented
IMP-SW-020A CMP-SW-020 SW (FW) Node firmware (sensor + LoRa stack) git@gitlab:teamX/node-fw.git Implemented
IMP-SW-030A CMP-SW-030 SW (Server) Backend API (FastAPI + PostgreSQL models) git@gitlab:teamX/backend.git Implemented
IMP-SY-040A CMP-SY-040 HW (PCB) Sensor node PCB rev B (assembled, 3 units) kicad_projects/sensor_node_revB/ Implemented
IMP-SY-050A CMP-SY-050 HW (Mech) Node enclosure model (3D CAD) cad/enclosure_v1/ Partially
IMP-SW-060A CMP-SW-060 SW (Tools) Calibration script (Python) git@gitlab:teamX/tools.git Implemented

[Extend this table for all implementation items.]

4.2 Implementation Item Descriptions

Provide short, focused subsections for each significant IMP-* item or group of related items.

4.2.1 IMP‑SW‑010A – Dashboard UI

4.2.2 IMP‑SW‑020A – Node Firmware

4.2.3 IMP‑SY‑040A – Sensor Node PCB rev B

[Add similar subsections for each major IMP-* as needed.]


5. Configuration Management

Describe how you identify, control, and track configurations for HW, SW, and docs.

5.1 Configuration Management Strategy

5.2 Baselines

Identify the key baselines relevant to implementation.

5.3 Status Accounting

Provide an overview of current configuration status.


6. Build, Flash, and Deployment Procedures

Provide step‑by‑step instructions to reproduce your implementation from scratch.

Assume a capable but unfamiliar engineer is following this.

6.1 Common Prerequisites

6.2 Firmware Build & Flash Procedure (Node Firmware – IMP‑SW‑020A)

  1. Clone the repository

    git clone git@gitlab:teamX/node-fw.git
    cd node-fw
    git checkout node-fw-v0.8-stage5-trr
    
  2. Install toolchain

    • Install ARM‑GCC toolchain gcc-arm-none-eabi-10-2020-q4-major or later.
    • Install CMake 3.22+.
  3. Configure and build

    mkdir build
    cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release
    make -j4
    

    Expected output: build/node_fw.elf, build/node_fw.hex.

  4. Flash firmware to node

    • Connect ST‑Link V2 to node SWD header.

    • Use openocd or STM32CubeProgrammer:

      st-flash write node_fw.hex 0x8000000
      
  5. Verify basic bring‑up

    • Connect USB‑UART.
    • Power board with 3.7 V Li‑ion battery.
    • Confirm console log shows “Node FW v0.8 – Stage 5” and periodic sensor readings.

6.3 Backend Build & Deployment Procedure (IMP‑SW‑030A)

  1. Clone and checkout baseline

    git clone git@gitlab:teamX/backend.git
    cd backend
    git checkout backend-v0.6-stage5-trr
    
  2. Dockerized deployment (preferred)

    docker compose up -d
    
    • Services started: api, db.
    • API available at http://localhost:8000/api/v1/.
  3. Initialize database

    docker exec -it backend_api_1 alembic upgrade head
    
  4. Smoke test

    curl http://localhost:8000/api/v1/health
    

    Expected response: {"status": "ok", "version": "0.6-stage5-trr"}

6.4 UI Build & Serve Procedure (IMP‑SW‑010A)

  1. Clone and checkout baseline

    git clone git@gitlab:teamX/labdash-ui.git
    cd labdash-ui
    git checkout ui-v0.9-stage5-trr
    
  2. Install dependencies

    npm install
    
  3. Configure backend URL

    • Edit .env file: VITE_API_URL=http://localhost:8000/api/v1
  4. Run development server

    npm run dev
    
    • UI should be accessible at http://localhost:5173.

6.5 Hardware Assembly & Power‑On Procedure (IMP‑SY‑040A)

  1. Assemble sensor node PCB rev B

    • Order bare boards from sensor_node_revB_gerbers.zip.
    • Use BOM BOM_sensor_node_revB_v1.1.xlsx.
    • Follow assembly notes in assembly_notes_revB.md.
  2. Initial checkout

    • Inspect for shorts and solder bridges.
    • Apply 3.7 V from lab supply with current limit 200 mA.
    • Check key rails: 3.3 V, 1.8 V within ±5% of nominal.
  3. Apply firmware

    • Follow Section 6.2 to flash.
    • Confirm LED heartbeat and UART logs.

7. Traceability to Requirements and Design

Summarize how implementation items relate back to requirements and design.

7.1 RTM Extensions (CMP-* → IMP-*)

The RTM has been updated to include links from design components to implementation items.

Excerpt from RTM (simplified):

STR ID REQ ID CMP ID IMP ID Notes
STR-SY-001 REQ-SY-010 CMP-SY-040 IMP-SY-040A Sensor node HW measures temperature
STR-SY-001 REQ-SY-010 CMP-SW-020 IMP-SW-020A FW reads sensor with ±0.5°C accuracy
STR-SY-001/2 REQ-SY-011 CMP-SW-020 IMP-SW-020A FW sends data every 60 s
STR-SY-002 REQ-SW-020 CMP-SW-030 IMP-SW-030A Backend generates alerts
STR-SY-002 REQ-SW-021 CMP-SW-010 IMP-SW-010A UI displays alerts

The full RTM is maintained separately as RTM-v1.2.xlsx and is under configuration control (see Section 5).

7.2 Deviations and Justifications

Document any known deviations where implementation currently differs from design or requirements (before change control is fully applied).


8. Change Log (Implementation Phase)

Record approved changes that affected implementation during Stage 5.

CR ID Date Summary Affected IDs Decision / Status
CR‑003 2026‑03‑15 Change sensor from SHT31 to SHTC3 REQ-SY-010, CMP-SY-040, IMP-SY-040A Approved, implemented
CR‑005 2026‑03‑22 Increase reporting interval to 120 s REQ-SY-011, CMP-SW-020, IMP-SW-020A Approved, implemented
CR‑007 2026‑03‑25 R27 resistor value change (100 kΩ → 47 kΩ) CMP-SY-040, IMP-SY-040A Approved, implemented
CR‑009 2026‑03‑29 Add battery voltage to packet payload REQ-SY-0xy, CMP-SW-020, IMP-SW-020A Approved, in progress

CR‑003 – Change of Temperature Sensor

[Add short descriptions for each CR as needed.]


9. Known Issues and Limitations (Pre‑Verification)

List known technical issues at the end of Stage 5 and any temporary workarounds, so that Stage 6/7 test planning can account for them.

Issue ID Description Impact on Requirements Planned Resolution / Notes
ISS‑01 UI sometimes shows stale data after brief network drop Minor annoyance; REQ-SW-021 still met; data eventually correct Fix via WebSocket reconnect logic in Stage 6
ISS‑02 Battery life ~48 h vs target 72 h REQ-SY-0xy at risk; partially mitigated by 120 s interval (CR‑005) Investigate deeper sleep + HW rev C
ISS‑03 Gateway occasionally misses packets under heavy RF noise May affect REQ-SY-011 (no data loss) Add redundancy and adjust LoRa settings

10. Readiness for Verification (Stage 6 / Stage 7)

Summarize why the system is ready to enter formal verification.

10.1 Implemented Requirement Coverage

Key requirements implemented:

10.2 Build & Deployment Stability

10.3 Entry Criteria for Stage 6/7

The following entry criteria for Stage 6 (Unit / Component Verification) and Stage 7 (System / Integration Verification) are met:


11. Approvals

Prepared by:

Reviewed and Approved (Stage 5 Gate – TRR):