Skip to content

Release 109

Choose a tag to compare

@PCrnjak PCrnjak released this 10 Nov 15:19

STEPFOC firmware V109 — application image for flashing via the Spectral bootloader. From 109 the STEPFOC and the Spectral Micro share their version numbers. Everything below is described in the manual: STEPFOC docs; what a driver keeps and what to run after the update: Upgrading from older firmware.

New features

  • Parameters: any setting or read-out by number over CAN (commands 36-38) or #Par: the gains and limits, the watchdog, the current loop, the speed estimate, the tool id and more (parameters 1-87). Identity (39) and telemetry (40) frames.
  • Capture, histogram and buffers (41-43): record three signals from the control loop, read the encoder and anti-cogging tables.
  • Watchdog actions: on a lost host the driver can idle, brake, coast, hold the position, or descend at a capped speed, with a fallback time.
  • Current loop from R, L and one bandwidth (parameter 49, default 160 Hz); the direct PLL speed estimate at 60 Hz by default; commutation delay compensation, 166 µs by default; a position input filter and a velocity-integral deadband.
  • Encoder table and anti-cogging measured on the driver: #Cal runs the calibration, then the encoder table and the anti-cogging identification, and saves; #Calonly is the calibration alone.
  • Sound through the motor: tones, a queue of notes and samples (CAN 44 and 45, #Tone).
  • Identification: #Info and parameters 84-87 report the build (git commit), the board ID and a calibration ID.
  • Settings in blocks with their own checksums; a reset keeps the CAN ID; a product lock refuses a Spectral image on a STEPFOC board.

Calibration

  • The angle alignment locks the rotor with the calibration current through the coil's resistance (it used a fixed 0.5 V, too weak for small motors with a high coil resistance). On a 20 mm stepper the alignment offset now comes out 6× steadier from run to run; 25 of 25 calibrations passed.
  • Kt and KV are measured in four spins alternating direction at a forced 6 V; a warning only when two same-direction spins differ by more than 5 %.
  • #Cal from a moving motor switches the bridge off first; a failed calibration switches it off at once; an E-stop ends a calibration, and #Cal is refused while one is latched (Cal: not started, the E-stop is latched (#Clear first)); the alignment starts from its first stage after a calibration that was ended from outside. #Calangle is refused while the driver is in error.
  • The current limit is put back when a calibration ends.

Safety

  • Limits: a negative or not-a-number value is ignored by the legacy CAN frames (limits, gains, Kt, voltage limit 0-60000 mV); #Ilim and #Vlimit take the magnitude; the current of a gripper move stays within 0-2800 mA; #PP takes 1-200 pole pairs, only while idle. PWM duties stay between 0 and 100 %.
  • The current-sense zero waits for the motor supply: started on USB before the supply, the driver used a zero about 100 mA off. It now says so in #Info and measures the zero by itself once the supply is there.
  • No undervoltage error while the supply ramps up at power-up.

CAN bus

  • A gripper poll right after a new move command no longer cancels it as new: object detection reports contact again (it read "at position" while pressing on an object). The same in every release before 109.
  • The current and PD frames set their setpoint and mode together. Length codes above 8 are read as 8; extended (29-bit) frames are ignored.
  • Watchdog: setting its time or a save starts a fresh window; a negative time means off; hold and descend no longer use the last moving loop's delay compensation.

Bug fixes

  • After #Cal, a host that takes the driver within 3 s drops the encoder-table and anti-cogging runs (they used to start by themselves at the next idle). #Encal and #Cogcal start only on their own words. While such a run turns the motor, a capture is not armed and the histogram is not changed.
  • A storage block whose check fails is read up to three times before its defaults are used. #Info says the anti-cogging is saved only while what is in RAM equals what is stored.
  • The current-loop integrals are cleared whenever the bridge brakes or coasts. The sound queue and sample buffer no longer replay old content after a stop; a pitch the driver cannot play answers Tone: not played.

Compatibility

  • Python library 1.21 or newer (pip install --upgrade Spectral-BLDC), Motor GUI 0.5.0.
  • The calibration and the settings of 108 are kept. Not tested on the bench for this release: an upgrade from V103 with the ST-Link, and a downgrade.

Assets

  • stepfoc-firmware-V109.bin — application firmware image (flash at 0x08003000, target STM32F103CB).
  • firmware.json — manifest with version, size, and SHA-256 for download verification by the web flasher.

Integrity

  • SHA-256: 94bc56430195b323f48dd47237be99700623ec8d0ae391f974a809e3eae123cc
  • Size: 112088 bytes

Built from commit 118fe17 on bootloader-version (#Info shows it as Build: 118FE17). Includes bootloader entry support (CAN/UART reset-into-bootloader).