Project Plan

Purpose

This document is the live execution plan for the MOTSEN TOOL project.

It tracks the milestones, open decisions, and known risks that drive the project forward. The three project phases (MVP, Full Feature Development, Productization) and the overall scope are defined in Project Definition. This document does not redefine them; it lists what must actually happen to complete each phase.

Planning Approach

The plan is milestone-driven, not date-driven:

  • Development cadence is irregular. Calendar dates are deliberately omitted.

  • A phase advances only when its phase-gate milestones have status done.

  • Later phases are intentionally lighter than Phase 1. Their milestones are placeholders that will be refined when the prior phase exits.

  • Open Decisions and Risks are reviewed at every phase gate.

Phase Overview

Phase

Theme

Exit Gate

Phase 1

Proof of Concept (MVP)

End-to-end sensor health check and Rs measurement on a real motor through the web UI

Phase 2

Full Feature Development

Full characterization suite, FOC, second MCU platform supported

Phase 3

Productization

Manufacturable product with documented service and production processes

Phase 1 — MVP Milestones

Phase 1 milestones are grouped by theme. IDs are reserved with gaps so refinement does not require renumbering.

Foundation

Project Milestone: Dev environment baseline MIL_001
status: open
tags: foundation

Toolchain, build, debug, and flash workflow are documented and reproducible from the repository. Ozone (Segger J-Link) is the canonical flashing path; S32 Flash Lite is known to silently fail on this setup and must not be used.

Project Milestone: Repository structure and coding conventions MIL_002
status: open
tags: foundation

Top-level repository layout, file/folder naming rules, and commit/branch conventions are agreed and recorded in the development environment documentation.

Project Milestone: Documentation toolchain operational MIL_003
status: open
tags: foundation

make html builds the full documentation cleanly with sphinx, sphinx-needs, and graphviz. All need types render correctly. Build instructions are documented.

HAL and MCU Bring-up

Project Milestone: HAL skeleton interfaces MIL_004
status: open
tags: hal, mcu
is linked from: DESC_033, DESC_063

Platform-agnostic interfaces for GPIO, UART, timer, ADC, and PWM are defined. S32K322 implementations are stubbed and link cleanly.

Project Milestone: Clock tree configured and verified MIL_005
status: open
tags: hal, mcu
is linked from: DESC_033

CPU, peripheral, FlexPWM, and ADC clocks are configured and measured against expected frequencies. Clock source selection is documented.

Project Milestone: UART host link bring-up MIL_006
status: open
tags: hal, mcu, comms
is linked from: DESC_035

Bi-directional UART communication is functional at the target baud rate, verified with loopback and host-side echo.

Project Milestone: System tick and non-blocking timing MIL_007
status: open
tags: hal, mcu
is linked from: DESC_033

A system tick source is running. Non-blocking delay and timeout primitives are available for application code.

Hardware Platform

Project Milestone: Eval board selected and characterized MIL_008
status: open
tags: hardware
is linked from: DESC_030, DESC_060
links outgoing: DEC_001

A specific eval board is chosen and procured (closes DEC_001). Voltage range, current capability, gate-driver topology, and sensing chain are documented.

Project Milestone: Safe power-up procedure MIL_009
status: open
tags: hardware, safety
is linked from: DESC_034

A bench power-up checklist exists and is followed. A current-limited supply is verified to trip before damage in fault conditions.

Project Milestone: Low-side current sensing chain MIL_010
status: open
tags: hardware, sensing
is linked from: DESC_031

ADC sampling is synchronized to PWM. Scale, offset, and noise floor are calibrated against a known reference current.

Project Milestone: DC-bus voltage sensing MIL_011
status: open
tags: hardware, sensing
is linked from: DESC_031

DC-bus voltage is read with documented accuracy. Under-voltage and over-voltage thresholds are enforced in firmware.

Project Milestone: Three-phase PWM generation MIL_012
status: open
tags: hardware, motor
is linked from: DESC_030

Center-aligned PWM with configurable dead-time and complementary output pairs is generated and verified on an oscilloscope.

Project Milestone: Hardware fault path MIL_013
status: open
tags: hardware, safety
is linked from: DESC_034

An overcurrent latch trips the PWM outputs in hardware, independently of the firmware control loop. The recovery procedure is documented.

Position Sensing and First Spin

Project Milestone: Hall sensor input and decoding MIL_014
status: open
tags: position, motor
is linked from: DESC_032

Hall sensor states are captured. A 6-state decoder produces commutation sector and inferred direction.

Project Milestone: Open-loop commutation spin MIL_015
status: open
tags: motor

The motor spins under open-loop sinusoidal commutation on the bench with an enforced current limit.

Communications and Host

Project Milestone: Framed firmware↔host protocol MIL_016
status: open
tags: comms, host
is linked from: DESC_035, DESC_061
links outgoing: DEC_003

A framed protocol is defined and implemented, supporting parameter read/write and a streaming log channel (closes DEC_003).

Project Milestone: Local web server scaffold MIL_017
status: open
tags: host, ui
is linked from: DESC_036, DESC_062, SWARCH_110
links outgoing: DEC_002

A local web server runs on the host PC, serves static UI assets, and exposes a real-time channel (e.g. WebSocket) bridged to the firmware (closes DEC_002).

Project Milestone: Web UI live plot and control panel MIL_018
status: open
tags: host, ui
is linked from: DESC_036

The browser dashboard shows live phase currents and Hall state. Parameters can be edited from the UI and applied to the firmware.

First Measurements and MVP Integration

Project Milestone: Sensor health check feature MIL_019
status: open
tags: measurement, mvp
is linked from: DESC_037

Phase-sequence and Hall-alignment validation runs end-to-end from the web UI on a real motor and reports pass/fail with a clear diagnostic message on failure.

Project Milestone: Phase resistance (Rs) measurement MIL_020
status: open
tags: measurement, mvp
is linked from: DESC_037

The Rs measurement procedure is implemented. The result is validated against a known reference motor and falls within a documented tolerance.

Project Milestone: MVP integration demo MIL_021
status: open
tags: mvp
is linked from: DESC_001

The full MVP demo runs end-to-end: connect motor, run sensor health check, run Rs measurement, view the report in the web UI. A non-author can reproduce the demo by following the documentation.

Phase 2 — Full Feature Milestones

These milestones will be refined when Phase 1 exits.

Project Milestone: Inductance estimation (Ld, Lq) MIL_040
status: open
tags: measurement
Project Milestone: Back-EMF and torque constant measurement MIL_041
status: open
tags: measurement
Project Milestone: Encoder support alongside Hall MIL_042
status: open
tags: position
Project Milestone: CAN communication interface MIL_043
status: open
tags: comms
links outgoing: DEC_004
Project Milestone: Scriptable test automation framework MIL_044
status: open
tags: host
Project Milestone: FOC closed-loop control MIL_045
status: open
tags: motor, control
is linked from: SYS_115, SWARCH_101, SWREQ_204
Project Milestone: Web UI feature-complete MIL_046
status: open
tags: host, ui
is linked from: DESC_036
Project Milestone: Parameter storage and project files MIL_047
status: open
tags: host
is linked from: SYS_097, SWARCH_114, SWREQ_206
Project Milestone: Second MCU platform supported MIL_048
status: open
tags: hal, mcu
is linked from: DESC_033, DESC_063, SYS_062
Project Milestone: Phase 2 acceptance demo MIL_049
status: open
tags: gate

Phase 3 — Productization Milestones

Project Milestone: Custom PCB v1 design MIL_070
status: open
tags: hardware
is linked from: HWARCH_902, HWREQ_101
Project Milestone: Custom PCB bring-up MIL_071
status: open
tags: hardware
Project Milestone: Manufacturing test fixtures and procedures MIL_072
status: open
tags: production
Project Milestone: User manual MIL_073
status: open
tags: documentation
Project Milestone: Service and calibration documentation MIL_074
status: open
tags: documentation
Project Milestone: Reliability and safety test campaign MIL_075
status: open
tags: production, safety
Project Milestone: Pilot production run MIL_076
status: open
tags: production
Project Milestone: Resolver support MIL_077
status: open
tags: position
Project Milestone: Phase 3 acceptance — manufacturable product MIL_078
status: open
tags: gate

Phase Gate Criteria

Phase 1 exits when:

  • MIL_001 through MIL_021 are all done.

  • MIL_021 (MVP integration demo) is reproducible by a non-author.

Phase 2 exits when:

  • MIL_040 through MIL_048 are all done.

  • MIL_049 (Phase 2 acceptance demo) is signed off.

Phase 3 exits when:

  • MIL_070 through MIL_077 are all done.

  • MIL_078 (Phase 3 acceptance) is signed off, including a manufacturable build and documented production/service flows.

Open Decisions

Open Decision: Specific eval board model DEC_001
status: open

Which off-the-shelf inverter eval board is the MVP target hardware. Constraint: must support a <100 W BLDC at 12–24 V, expose low-side current sense, and be compatible with the chosen MCU. Closes through MIL_008.

Open Decision: Web server language and framework DEC_002
status: open
links incoming: MIL_017

Backend language and framework for the local web server. Candidates include Python (FastAPI), Node.js, Go, and others. Constraint: must support fast WebSocket streaming and be easy to package for a non-author end user. Closes through MIL_017.

Open Decision: Host↔firmware physical link and framing DEC_003
status: open

Physical link (UART vs USB-CDC) and the frame format for the host-firmware protocol. Closes through MIL_016.

Open Decision: CAN priority DEC_004
status: open
is linked from: DESC_035, DESC_064, SYS_084, SYS_124
links incoming: MIL_043

Whether CAN is a Phase 1 nice-to-have or strictly a Phase 2 feature. Default: Phase 2 (MIL_043).

Open Decision: HAL implementation strategy DEC_005
status: open

Whether the HAL wraps NXP RTD/SDK calls or is a thin custom layer over registers. Affects MCU portability cost and the work in MIL_004 and MIL_048.

Open Decision: Sensorless control scope DEC_006
status: open

Whether sensorless control (observer-based position estimation) is in scope, and for which phase.

Open Decision: Open-source license and publication policy DEC_007
status: open
is linked from: DESC_066, SYS_126

License selection and whether/when the project is published publicly.

Risks

Project Risk: Irregular cadence causes context loss RISK_001
status: open

Long calendar gaps between work sessions cause loss of mental context and rework. Mitigation: every session ends with a short note in the docs capturing current state and the next concrete step.

Project Risk: HAL over-engineered prematurely RISK_002
status: open
is linked from: SWARCH_013

The HAL is designed for portability before a second MCU exists, leading to wasted effort and brittle abstractions. Mitigation: design the HAL to the minimum needed for Phase 1; revisit at MIL_048.

Project Risk: Eval board limitation forces early custom PCB RISK_003
status: open

The selected eval board cannot support a measurement or feature needed in Phase 1 or Phase 2, forcing custom hardware earlier than planned. Mitigation: review board limits in MIL_008; treat custom PCB as a Phase 3 item only.

Project Risk: Web-stack scope creep RISK_004
status: open
is linked from: DESC_036

Authentication, multi-user, hosting, and other web concerns expand beyond the local-tool use case. Mitigation: keep the server local-only and single-user through Phase 2.

Project Risk: Characterization algorithm complexity underestimated RISK_005
status: open
is linked from: DESC_037

Parameter estimation procedures (Rs, Ld, Lq, Kt) require more signal processing and calibration than expected. Mitigation: stage the work — Rs first, then Ld/Lq, then Kt — and validate each against a reference motor.

Project Risk: Documentation drift from implementation RISK_006
status: open

Code and documentation drift apart, so the docs no longer describe what the project actually does. Mitigation: documentation changes ship in the same commits as the implementation changes that motivate them.

Project Risk: Motor-under-test safety incident RISK_007
status: open
is linked from: DESC_034

Overcurrent, overspeed, or mechanical incidents during bench testing cause damage or injury. Mitigation: enforced current limits in firmware, hardware overcurrent latch (MIL_013), and bench safety procedures (MIL_009).

Traceability

Milestones in this document forward-link to system, hardware, and software requirements using the linked_to and implemented_by link types defined in the project conf.py. At the time of writing these links are mostly empty; they will be populated as the requirements documents in 02_System, 03_Hardware, and 04_Software come online.

The intended traceability flow is:

Milestone (MIL_*)
       │
       ├── System Requirement (SYS_*)
       │           │
       │           ├── Hardware Requirement (HW_REQ_*)
       │           │           └── Hardware Test Case (HW_TEST_*)
       │           │
       │           └── Software Requirement (SW_REQ_*)
       │                       └── Software Test Case (SW_TEST_*)
       │
       └── Open Decisions (DEC_*) / Risks (RISK_*)