| ||||
| ||||
![]() Title:A Low-Cost Embedded Hardware-in-the-Loop Simulation Platform for Permanent-Magnet DC Motor Drives on a Constrained 8-Bit Microcontroller Conference:ICRMS2026 Tags:ATmega328P, CAN telemetry, DC motor simulation, Embedded systems, Hardware-in-the-loop, Interrupt-driven integration, Low-cost HIL, Motor drive validation and NCO Abstract: Hardware-in-the-loop (HIL) simulation enables safe, costeffective validation of motor-drive controllers before physical hardware is available. Commercial HIL platforms,however, cost $8,000 or more and require dedicated realtime processors, excluding resource-limited development contexts. This paper presents a complete HIL simulation platform for permanent-magnet DC (PMDC) motor drives implemented entirely on an 8-bit ATmega328P microcontroller ($2–5 USD). The platform numerically integrates the coupled electrical-mechanical motor state equations at a fixed 2 ms step driven by a hardware Timer interrupt,while simultaneously capturing an external PWM duty-cycle via a non-blocking edge-time interrupt. Key innovations include: a semi-implicit Euler integrator with a two-condition static-friction zero-speed latch that eliminates sign-reversal chattering; a 32-bit Numerically Controlled Oscillator (NCO) running at 2 kHz that synthesizes a jitter-free Hall-effect square wave tracking realtime shaft speed; and a dual-frame CAN telemetry channel (MCP2515) streaming six physical quantities at up to 1 kfps. Simulation results validated against closed-form analytical solutions confirm steady-state speed accuracy within 0.3% and rise-time error within 5% across supply voltages of 3–9V and load torques up to 2.3N·m, while the entire firmware occupies less than 32 kB flash and 2 kB SRAM. The proposed platform reduces HIL development cost by more than 99% compared to commercial alternatives. A Low-Cost Embedded Hardware-in-the-Loop Simulation Platform for Permanent-Magnet DC Motor Drives on a Constrained 8-Bit Microcontroller ![]() A Low-Cost Embedded Hardware-in-the-Loop Simulation Platform for Permanent-Magnet DC Motor Drives on a Constrained 8-Bit Microcontroller | ||||
| Copyright © 2002 – 2026 EasyChair |
