High performance motor control
View the Project on GitHub odriverobotics/ODrive
Help improve these docs: submit edits using the link in the top right.
If you need help, please search or ask the ODrive Community.
TODO: changing this currently requires a reboot - fix this
uart_baudrate
— uint32
readwrite
Defines the baudrate used on the UART interface. Some baudrates will have a small timing error due to hardware limitations.
Here’s an (incomplete) list of baudrates for ODrive v3.x:
Configured | Actual | Error [%] |
---|---|---|
1.2 KBps | 1.2 KBps | 0 |
2.4 KBps | 2.4 KBps | 0 |
9.6 KBps | 9.6 KBps | 0 |
19.2 KBps | 19.195 KBps | 0.02 |
38.4 KBps | 38.391 KBps | 0.02 |
57.6 KBps | 57.613 KBps | 0.02 |
115.2 KBps | 115.068 KBps | 0.11 |
230.4 KBps | 230.769 KBps | 0.16 |
460.8 KBps | 461.538 KBps | 0.16 |
921.6 KBps | 913.043 KBps | 0.93 |
1.792 MBps | 1.826 MBps | 1.9 |
1.8432 MBps | 1.826 MBps | 0.93 |
For more information refer to Section 30.3.4 and Table 142 (the column with f_PCLK = 42 MHz) in the STM datasheet.
enable_i2c_instead_of_can
— bool
readwrite
Changing this requires a reboot.
enable_ascii_protocol_on_usb
— bool
readwrite
No description
max_regen_current
— float32
readwrite
No description
brake_resistance
— float32
readwrite
Value of the brake resistor connected to the ODrive.
Unit: Ohm
Set to 0 to disable.
dc_bus_undervoltage_trip_level
— float32
readwrite
Minimum voltage below which the motor stops operating.
Unit: V
dc_bus_overvoltage_trip_level
— float32
readwrite
Maximum voltage above which the motor stops operating.
Unit: V
This protects against cases in which the power supply fails to dissipate the brake power if the brake resistor is disabled. The default is 26V for the 24V board version and 52V for the 48V board version.
enable_dc_bus_overvoltage_ramp
— bool
readwrite
Experimental
Enables the DC bus overvoltage ramp feature.
If enabled, if the measured DC voltage exceeds dc_bus_overvoltage_ramp_start, the ODrive will sink more power than usual into the the brake resistor in an attempt to bring the voltage down again.
The brake duty cycle is increased by the following amount:
Remarks:
dc_bus_overvoltage_ramp_start
— float32
readwrite
Experimental
See enable_dc_bus_overvoltage_ramp.
Do not set this lower than your usual vbus_voltage, unless you like fried brake resistors.
dc_bus_overvoltage_ramp_end
— float32
readwrite
Experimental
See enable_dc_bus_overvoltage_ramp.
Must be larger than dc_bus_overvoltage_ramp_start, otherwise the ramp feature is disabled.
dc_max_positive_current
— float32
readwrite
Max current the power supply can source.
Unit: A
dc_max_negative_current
— float32
readwrite
Max current the power supply can sink.
Unit: A
You most likely want a non-positive value here. Set to -INFINITY to disable.
gpio1_pwm_mapping
— Endpoint
No description
gpio2_pwm_mapping
— Endpoint
No description
gpio3_pwm_mapping
— Endpoint
No description
gpio4_pwm_mapping
— Endpoint
No description
gpio3_analog_mapping
— Endpoint
No description
gpio4_analog_mapping
— Endpoint
No description
This interface has no functions.