Skip to content

Defaults

The settings of the firmware at the release this site describes: their start values in common.h, and what EEPROM.cpp does with each.

  • Start value: the value in common.h. A setting the EEPROM does not keep starts from it at every power-up. A kept setting is replaced at power-up by the value in the EEPROM, so its start value is only seen before that.
  • After #Default: what #Default writes to the EEPROM and loads; — means #Default does not change it.
  • Kept by #Save: whether #Save (Send_Save_config) stores it, so that it survives a power cycle.

Internal state (error flags, counters, calibration steps, scratch variables) is left out; the error flags are in Errors and LED states. A name after a value, such as 160 (CURRENT_BANDWIDTH_DEFAULT), is the constant in constants.h the value comes from. existing_id for the CAN ID means that #Default keeps a valid stored ID (0 when none is stored). 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 111 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 125 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 Stepper motor
50 0 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
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
166 (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
60 (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
1 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
brake_coast
1 is brake 0 is coast
1 1 (BRAKE_COAST_DEFAULT) yes
trigger_value
0=low level, 1=high level, 2=any edge
0 — no
calibration_offset_current 500 — no
microstep 16 — no
gosteps 0 — no
step_interval
step interval in microseconds
1000 — no
Voltage_limit
Voltage limit for Ud and Uq voltages. If 0 value of controller.VBUS_mV will be used
6000 6000 yes
Reset_integral_accumulator 0 0 yes
Kp_p 5 5 yes
Position_setpoint 0 — no
Kp_v
bench 2026-11-08: a bare NEMA 17 vibrates at 0.056 (speed PLL) or 0.04
0.02 0.02 yes
Ki_v
bench 2026-11-08 (kiv_sweep.py, KPV 0.02): rings at 0.004; 0.001 halves the
0.001 0.001 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 / For stepper speed runout is around 250 nfo000
30000000 — no
Kp_id
motor1
7 7 yes
Ki_id
motor1
3 3 yes
Id_setpoint 0 — no
Kp_iq
motor1
3 3 yes
Ki_iq
motor1
0.3 0.3 yes
Iq_current_limit 1700 1700 yes
Id_current_limit 0 0 yes
Feedforward_current 0 — no
KD
[Nm*s/rad]
0.0028 0.0028 yes
KP
[Nm/rad]
0.1400 0.1400 yes
Uq_setpoint 0 — no
Ud_setpoint 0 — no
position_setpoint 0 — no
speed_setpoint 50 — no
current_setpoint 400 — 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