Skip to content

Commit 2edc38b

Browse files
committed
sensorless docs improvements
1 parent 4b2ac94 commit 2edc38b

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Please add a note of your changes below this heading if you make a Pull Request.
99
* Step and direction mode resets position when entering closed loop just like `input_pos` does
1010
* CAN baud rate setting is now correctly handled
1111
* `odrivetool dfu` works properly when an ODrive is flashed with the `dfu` switch set to "dfu".
12+
* `odrivetool dfu` now erases the entire flash memory before flashing firmware. This ensures that old configuration parameters are erased.
13+
* ASCII and the Native Protocol do not run at the same time on a UART interface. See `odrv0.config.uart0_protocol` and the `STREAM_PROTOCOL_TYPE` enums for details.
1214

1315
### Added
1416
* `sc` command to ascii protocol to run `odrv.clear_errors()`

docs/commands.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,20 @@ All variables that are part of a `[...].config` object can be saved to non-volat
8080
* `<odrv>.hw_version_major`, `<odrv>.hw_version_minor`, `<odrv>.hw_version_revision`: The hardware version of your ODrive.
8181

8282
## Setting up sensorless
83-
The ODrive can run without encoder/hall feedback, but there is a minimum speed, usually around a few hundred RPM.
83+
The ODrive can run without encoder/hall feedback, but there is a minimum speed, usually around a few hundred RPM. In other words, sensorless mode does not support stopping or changing direction!
84+
85+
Sensorless mode starts by ramping up the motor speed in open loop control and then switches to closed loop control automatically. The sensorless speed ramping parameters are in `axis.config.sensorless_ramp` The `vel` and `accel` (in [radians/s] and [radians/s^2]) control the speed that the ramp tries to reach and how quickly it gets there. When the ramp reaches `sensorless_ramp.vel`, `controller.input_vel` is automatically set to the same velocity, in [turns/s], and the state switches to closed loop control.
86+
87+
If your motor comes to a stop after the ramp, try incrementally raising the `vel` parameter. The goal is to be above the minimum speed necessary for sensorless position and speed feedback to converge - this is not well-parameterized per motor. The parameters suggested below work for the D5065 motor, with 270KV and 7 pole pairs. If your motor grinds and skips during the ramp, lower the `accel` parameter until it is tolerable.
88+
89+
Below are some suggested starting parameters that you can use for the ODrive D5065 motor. Note that you _must_ set the `pm_flux_linkage` correctly for sensorless mode to work. Motor calibration and setup must also be completed before sensorless mode will work.
8490

85-
Below are some suggested starting parameters that you can use. Note that you _must_ set the `pm_flux_linkage` correctly for sensorless mode to work. Motor calibration and setup must also be completed before sensorless mode will work.
8691

8792
```
8893
odrv0.axis0.controller.config.vel_gain = 0.01
8994
odrv0.axis0.controller.config.vel_integrator_gain = 0.05
90-
odrv0.axis0.controller.config.control_mode = 2
91-
odrv0.axis0.controller.input_vel = 10
92-
odrv0.axis0.controller.config.vel_limit = <a value greater than input_vel>
95+
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
96+
odrv0.axis0.controller.config.vel_limit = <a value greater than axis.config.sensorless_ramp.vel / (2pi * <pole_pairs>)>
9397
odrv0.axis0.motor.config.current_lim = 2 * odrv0.axis0.config.sensorless_ramp.current
9498
odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (<pole pairs> * <motor kv>)
9599
odrv0.axis0.config.enable_sensorless_mode = True

tools/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
"""
3333

3434
# Set to true to make the current release
35-
is_release = False
35+
is_release = True
3636

3737
# Set to true to make an official post-release, rather than dev of new version
3838
is_post_release = False
3939
post_rel_num = 0
4040

4141
# To test higher numbered releases, bump to the next rev
42-
devnum = 6
42+
devnum = 0
4343
bump_rev = not is_post_release and not is_release
4444

4545
# TODO: add additional y/n prompt to prevent from erroneous upload

0 commit comments

Comments
 (0)