Skip to content

Defaults

The settings of the firmware, read from its source at the release this site describes. The table leaves out the firmware's internal state (counters, flags, scratch variables).

  • Start value is the value in the firmware's structures (common.h). At power-up the firmware loads the saved settings from the EEPROM over it, so for a setting that #Save keeps the start value only shows until the EEPROM is read.
  • After #Default is what the driver runs with after #Default, which writes the factory values to the EEPROM and loads them. A fresh board, and a board whose saved configuration fails its check at power-up, gets the same values.
  • Kept by #Save says whether the setting survives a power cycle. No means the driver starts with the start value again after every power-up.

#Default also erases the calibration; from firmware 109 it keeps a valid stored CAN node ID (existing_id in the table; 0 when none is stored); see Saving the configuration. A name after a value, such as 160 (CURRENT_BANDWIDTH_DEFAULT), is the constant in constants.h the value comes from. The settings of firmware 109 that are parameters, the anti-cogging and the encoder table among them, are in the parameter table with their defaults.

Variable and firmware comment Start value After #Default Kept by #Save
SERIAL_NUMBER 1 1111 in the EEPROM, not read back written, not read back
HARDWARE_VERSION
Version of the Spectral BLDC driver PCB
1 1 yes
BATCH_DATE
Date the batch was produced
1 24092024 yes
SOFTWARE_VERSION
Software release
1 110 no: set by the firmware
I_AM_GRIPPER
Is motor controller gripper (1) or not (0)
1 0 yes
LED_ON_OFF
Use LED for status indication
1 1 yes
theta_offset
will be determined at calibration
0.0f 0 yes
pole_pairs
Number of pole pairs of your BLDC motor
11 7 yes
current_control_bandwidth
Hz: the current PI gains come from R, L
160 (CURRENT_BANDWIDTH_DEFAULT) — no
DIR_
When looking at the magnetic encoder counter-clockwise is POSITIVE rotation.
1 0 yes
Phase_order 2 0 yes
commutation_dir
+1 or -1, auto-detected at calibration so +Iq/+velocity/+rotation map to +encoder rotation
1 1 yes
Thermistor_on_off
Are we taking termistor mesurements? 0 is off, 1 is on
0 0 yes
brake_coast
Idle-mode (Controller_mode == 0) phase behavior: 0 = coast (driver disabled, Hi-Z), 1 = brake (driver stays enabled, zero-voltage PWM vector shorts the phases together)
0 0 (BRAKE_COAST_DEFAULT) yes
Resistance
Resistance of SINGLE PHASE of your BLDC motor
0 0 yes
Total_Resistance
= 2 * Resistance + 2 * R_sense + 2 *Rdson
0 0 yes
Inductance
Inductance of SINGLE PHASE of your BLDC motor
0 0 yes
Kt
Torque constant of your BLDC motor
0 0 yes
flux_linkage
Flux linkage of your BLDC motor
0 0 yes
KV 0 0 yes
Max_temperature
Max temperature in degrees
75 75 yes
Min_temperature
Min temperature in degrees
-20 — no
Max_Vbus
Max vbus voltage in mV
29500 29000 yes
Min_Vbus
Min vbus voltage in mV
9000 — no
watchdog_time_ms 0 0 yes
watchdog_action
0 legacy, 1 hold, 2 brake, 3 coast, 4 descend (watchdog_action.h)
0 0 yes
wd_fallback_time_ms
how long hold/descend may run before the after-action
2000 2000 yes
wd_fallback_current
mA, descend: the current applied (signed)
0 0 yes
wd_fallback_speed
ticks/s, descend: the speed cap in either direction
1000 1000 yes
wd_after_action
after hold/descend: 0 legacy, 2 brake, 3 coast
0 0 (WD_ACTION_LEGACY) yes
calibration_id
parameter 87: new at every successful calibration
0 0 in the EEPROM, not read back written, not read back
tool_id
what the drive is built into: 0 none, 1 SSG-48, 11-33 MSG, 200-254 custom
0 0 yes
board_product
product lock stamp in block 2: 1 STEPFOC, 2 Spectral, 0 none
0 0 yes
sense1_offset
current-sense zero of channel 1, ADC counts from 2048 (start-up)
0 — no
sense2_offset
current-sense zero of channel 2
0 — no
comm_delay_us
parameter 64: commutation delay compensation, us (0 = off)
234 (COMM_DELAY_DEFAULT_US) — no
input_filter_hz
parameter 74: the position input filter, Hz (0 = off)
0 — no
vel_int_deadband
parameter 75: the velocity integral's deadband, ticks (0 = off)
0 — no
sound_limit_mv
parameter 81: the sound's voltage at most (batch 22)
2000 (SOUND_LIMIT_DEFAULT_MV) — no
sound_axis
parameter 82: 1 the q axis (default: much louder on the bench), 0 the d axis
1 — no
fast_trig
parameter 65: 1 the transforms' sin/cos from the integer table (it was
0 — no
speed_estimator
parameter 50
2 (SPEED_ESTIMATOR_DEFAULT) — no
speed_pll_bandwidth
parameter 51, Hz
100 (SPEED_PLL_BANDWIDTH_DEFAULT) — no
Heartbeat_rate_ms
Motor controller will send data every Heartbeat_rate_ms
0 0 yes
Calibrated
0 if motor is not calibrated, 1 if it is calibrated
0 0 yes
Resistance_calc_voltage
Voltage used to calculate resistance //1000
1000 — no
Calibration_power
Max power that can dissipate during inductance test.
12 — no
Open_loop_voltage
Voltage to use when spinning the motor open loop. In mV
5000 — no
Open_loop_speed
Speed to be used when spinning the motor open loop. In RAD/s
20.0 — no
Phase_voltage
Max voltage to be used during Kv calculation
5000 — no
cyclic_period
We send messages every cyclic_period
0 — no
CAN_ID
CAN id of THIS motor driver! No 2 motor drivers can share the same ID.
0 existing_id yes
calibration_offset_current 300 — no
Voltage_limit
Voltage limit for Ud and Uq voltages. If 0 value of controller.VBUS_mV will be used
0 0 yes
Reset_integral_accumulator 0 0 yes
Kp_p 11 11 yes
Position_setpoint 0 — no
Kp_v
0.006 basic values that work for most motors but not optimal
0.03 0.03 yes
Ki_v
0.0001 basic values that work for most motors but not optimal
0.0003 0.0003 yes
Velocity_setpoint
-1.5
0 — no
Velocity_limit
Clamp integrals to this [TICKS/s]
800000 800000 yes
Velocity_limit_error
[TICKS/s] ; Velocity when we will report error
20000000 — no
Kp_id 3 3 yes
Ki_id 1.5 1.5 yes
Id_setpoint 0 — no
Kp_iq 3 3 yes
Ki_iq 1.5 1.5 yes
Iq_current_limit 1000 1000 yes
Id_current_limit 0 0 yes
Feedforward_current 0 — no
KD
[Nm*s/rad] KD 0.002800
0.002800 0.0028 yes
KP
[Nm/rad] KP 0.14000
0.14000 0.1400 yes
Uq_setpoint 0 — no
Ud_setpoint 0 — no
position_setpoint 0 — no
speed_setpoint 20 — no
current_setpoint 200 — no
action_status
-0 Stopped(or performing activation /automatic release).
0 — no
activated 0 — no
release_direction 0 — no
estop_status 0 — no

Comments


Found a mistake on this page? Edit it on GitHub · Report it · Get help · This page as Markdown · llms.txt · The whole manual as PDF