Motion control
Separate requested speed from measured speed. Apply a bounded speed-control request only when startup, observation and current feedback agree.
PCBA PARTNER · ENGINEERING & APPLICATIONS
Connect a brushless motor power stage, timed sampling, a speed supervisor and handpiece controls. A practical architecture for nail-care tools and compact rotating instruments.
Separate requested speed from measured speed. Apply a bounded speed-control request only when startup, observation and current feedback agree.
Keep a hardware cutoff path independent of the software loop. Current sensing, gate control and fault reporting serve different purposes.
Decode click gestures and quadrature edges before issuing semantic requests. Display the accepted state so rejected actions cannot create a misleading UI.
Use a motor board and a controller as separable engineering blocks: the DRV8316 power stage handles three-phase switching; the MCU schedules PWM, ADC, SPI diagnostics and the foreground control loop. Their power, enable, fault and feedback nets should be reviewed as one system.
Sampling phase is part of the control design. Associate current samples with a defined PWM window, retain timestamps and detect missed schedules. A fast nominal loop is insufficient when sampling jitter or stale state enters the observer.
The supervisor combines target speed, measured speed, observer lock, driver health and calibrated current limits. Evaluate faults before a zero-time-step early return so a repeated timestamp cannot suppress a newly arrived fault.
Sensorless operation needs a startup strategy: rotor alignment, controlled acceleration, observation handover and loss-of-lock handling. A running observer model and a speed PI module address parts of this problem; neither replaces the motor-specific startup process.
The encoder path exposes raw quadrature counts and invalid-transition diagnostics. Define counts per detent and acceleration separately from RPM. Debounce pushbuttons and resolve single, double and triple clicks into explicit requests.
Keep stop and fault handling independent of the gesture timeout. Changing direction or operating mode should use the accepted motor state, rather than assuming a screen change has already changed the motor.
Treat battery, charging, handpiece wiring and motor torque as whole-product decisions. Compare bus voltage, peak current, transient energy, capacitor ripple and connector geometry together. A lower-priced component can increase assembly or thermal cost.
At a 1,000-unit planning volume, reduce unique passive specifications, unnecessary inter-board connectors and assembly operations. Keep protection, motor feedback and repair access in the comparison instead of deleting them to reach a headline BOM price.
Applications include nail-care handpieces, miniature polishers and controlled rotating instruments. Reusable modules include click decoding, speed supervision, fault priority, observation replay and sampling diagnostics. Motor parameters and mechanical interfaces determine the final product configuration.
Editable KiCad files, firmware, algorithms, BOM tables, interfaces and technical revision documents. The complete archive stores identical bytes once; historical ZIPs are expanded into .zip.contents folders. Its included restore.py reconstructs the technical file paths.
229 files · 1.7 MiB
SHA-256 b89821ccb0ca522ab8ece07beefbee3d8906e5b056c77f09e2e46791f868953c17498 files · 81.9 MiB
SHA-256 8d01eb775a94d93ab9ea4d80a05982b2ab701ad290f4e09ba2a1a2311a529d37