The Release Candidate for Firmware v0.5.2 is ready! You can find binaries here, and check the instructions “How to flash a custom firmware” here. You can also check out this release on GitHub. This thread is for feedback and discussion about the firmware.
Please let us know in the poll below even if everything works.
Binaries here.
Install the odrivetool release candidate version by running pip install odrive==0.5.2.dev0
Documentation here
A complete list of changes is in the changelog.
Release Candidate 2
Fixed
- Spinout error is no longer sticky and doesn’t trigger on static torque loads due to I^2*R electrical power
- Step and direction mode resets position when entering closed loop just like
input_pos
does - CAN baud rate setting works
Release Candidate 1
Changes
Fixed
- Dual RC PWM no longer causes DEADLINE_MISSED errors
Added
- Added phase balance check to motor calibration and MOTOR_ERROR_UNBALANCED_PHASES to error enums
- Added polarity and phase offset calibration for hall effect encoders
- Mechanical brake support
- Added periodic sending of encoder position on CAN
- Support for UART1 on GPIO3 and GPIO4. UART0 (on GPIO1/2) and UART1 can currently not be enabled at the same time.
- Thermistors now have a 2nd order lowpass filter applied to reduce noise
- 2-norm current clamping is used for AC induction motors
- Added spinout detection to detect incorrect encoder offset and ENCODER_ERROR_INCORRECT_OFFSET to error enums.
- Added AARCH64 support to libfibre
- Tuning input mode added to provide sinusoidal position, velocity, or torque stimulus. See INPUT_MODE_TUNING and the controller class for details.
- Added torque mirroring to INPUT_MODE_MIRROR
Changed
- Step/dir performance improved! Dual axis step rates up to 250kHz have been tested
- Apply_config is called for encoders after a successful direction find
- Full calibration sequence now includes hall polarity calibration if a hall effect encoder is used
- Modified encoder offset calibration to work correctly when calib_scan_distance is not a multiple of 4pi
- Moved thermistors from being a top level object to belonging to Motor objects. Also changed errors: thermistor errors rolled into motor errors
- Use DMA for DRV8301 setup
- Make NVM configuration code more dynamic so that the layout doesn’t have to be known at compile time.
- GPIO initialization logic was changed. GPIOs now need to be explicitly set to the mode corresponding to the feature that they are used by. See
<odrv>.config.gpioX_mode
. - Previously, if two components used the same interrupt pin (e.g. step input for axis0 and axis1) then the one that was configured later would override the other one. Now this is no longer the case (the old component remains the owner of the pin).
- New control loop architecture:
- TIM8 update interrupt handler (CNT = 0) runs at a high priority and invokes the system level function
sample_cb()
to sample all timing critical inputs (currently only encoder state). - TIM8 update interrupt handler (CNT = 0) raises an NVIC flag to kick off a lower priority interrupt.
- The control loop interrupt handler checks if all ADC measurements are ready and informs both motor objects about the current measurements.
- The control loop interrupt handler invokes the system level function
control_loop_cb()
which updates all components (encoders, estimators, torque controllers, etc). The data paths between the components are configured by the Axis threads based on the requested state. This replaces the previous architecture where the components were updated inside the Axis threads inAxis::run_control_loop()
. - Meanwhile the TIM1 and TIM8 updates for CNT = 3500 will have fired. The control loop interrupt handler thus reads the new ADC measurements and informs both motor objects that a DC calibration event has happened.
- Finally, the control loop interrupt invokes
pwm_update_cb
on both motors to make them update their PWM timing registers.
- TIM8 update interrupt handler (CNT = 0) runs at a high priority and invokes the system level function
- Components that need low level control over PWM timings are implemented by inheriting from the
PhaseControlLaw
interface. Three components currently inherit this interface:FieldOrientedController
,ResistanceMeasurementControlLaw
andInductanceMeasurementControlLaw
. - The FOC algorithm is now found in foc.cpp and and is presumably capable of running at a different frequency than the main control tasks (not relevant for ODrive v3).
- ACIM estimator was consolidated into a separate component
<odrv>.acim_estimator
. - The Automatic Output Enable (AOE) flag of TIM1/TIM8 is used to achieve glitch-free motor arming.
- Sensorless mode was merged into closed loop control mode. Use
<axis>.enable_sensorless_mode
to disable the use of an encoder. - More informative profiling instrumentation was added.
- A system-level error property was introduced.
- Added
torque_mirror_ratio
and use it to feed-forwardcontroller_.torque_output
inINPUT_MODE_MIRROR
- Accumulate integer steps in step/dir to avoid float precision errors
- Circular setpoint mode must be enabled when the step/dir interface is used.
Quick feedback
- Calibrate motor works
- Closed loop control works
- CAN works
- Incremental encoder works
- Absolute encoder works
- Step/dir input works
- RC PWM input works
- USB and Python works
- USB and ASCII protocol works
- UART and ASCII protocol works
0 voters
If you have any issues, please report it below.