Motor-control firmware · Pilot series
Pilot FOC firmwareField-oriented control for BLDC and PMSM motors
FOC firmware for Pilot H1, M1 and M2, set up from the Spinner app.
- 40 kHz current loop
- Torque · velocity · position · impedance
- EtherCAT · CAN FD · USB
- A/B updates
- current loop
- 40kHz
- velocity loop
- 8kHz
- position loop
- 4kHz
- calibration jobs
- 25
- control modes
- 4
Control loops
Field-oriented control
d/q PI with decoupling and SVM. Gains from the measured motor model.
Four modes
Torque, velocity, position and impedance, for legged-robot joints.
Motion functions
Profiled moves, homing, jog, streamed trajectories, step/direction.
One command over every link
32-byte command in SI units, 64-byte feedback.
| Field | Meaning |
|---|---|
| mode | torque, velocity, position, impedance |
| enable · halt | enable and quick stop |
| position | target or anchor, rad |
| velocity | target or feed-forward, rad/s |
| torque | target or feed-forward, N·m |
| stiffness · damping | impedance K, D |
| current limit | optional, A |
| flags | feed-forward, integrator, set zero |
- EtherCATLAN9252; cyclic PDOs, CoE SDO setup.
- CAN FDCANopen-style NMT, SYNC, PDO, SDO, heartbeat; IDs 1–127.
- USBFramed with CRC-16; used by the Spinner app.
25 calibration jobs
The drive measures the motor as installed and sets its own gains.
Electrical model
Current-sensor offsets, phase order and pole pairs. Resistance from several current plateaus with a least-squares fit, d/q inductance by sine injection, flux linkage from back-EMF while spinning.
Encoder
Offset and an error table over a full turn, measured in both directions, so FOC uses the true rotor angle.
Mechanics
Inertia from torque steps; viscous and Coulomb friction from a coast-down.
System identification
Frequency sweep, chirp and PRBS, open and closed loop, for Bode plots and loop tuning in the Spinner app.
Cogging
A cogging-torque map, measured holding position or turning at one or more speeds, applied as feed-forward.
Verification
Locked-rotor and spinning re-measurement of R, L and flux; current, speed, position and impedance step responses.
How results are checked
Encoders

AS5047P / AS5147P
On-axis magnetic, H1 and M1.
MA600
On-axis magnetic, M2.
IPS2550 inductive
Magnet-free second sensor on M1 and M2, calibrated as a pair with the main encoder. Inductive encoder →
Protection
Overcurrent
Software trip on every board; DRV8353S monitor on H1, M1; analog watchdog on M2.
Voltage and temperature
Undervoltage detection and derating.
Watchdogs
Hardware watchdog, command-loss stop, EtherCAT SYNC watchdog.
Fault handling
Latched faults and a safe-hold state.
Guarded calibration
Calibration stops in the same cycle a limit trips.
Board ID
Firmware boots only on its own Pilot board.
Runs on Pilot H1, M1 and M2
Tell us about your motor
Motor, supply, control mode and link: we will suggest a setup.
Send an enquiryinfo@retechmotors.com


