Hello friends!
- I use ODrive v3.5-48V
- Encoders: AS5047P-TS_EK_AB connected by SPI.
- Firmware: - https://github.com/TobinHall/ODrive/tree/Non-Blocking_Absolute_SPI
Set the settings:
odrv0.axis0.encoder.config.abs_spi_cs_gpio_pin = 4
odrv0.axis0.encoder.config.mode = 257
odrv0.axis0.encoder.config.cpr = 2**14
Encoders:
error = 0x0000 (int) is_ready = True (bool) index_found = False (bool) shadow_count = 20872 (int) count_in_cpr = 4487 (int) interpolation = 1.0 (float) phase = 1.8239965438842773 (float) pos_estimate = 20872.3125 (float) pos_cpr = 4489.6875 (float) hall_state = 7 (int) vel_estimate = -625.0 (float) pos_abs = 4487 (int) config: mode = 257 (int) use_index = False (bool) abs_spi_cs_gpio_pin = 4 (int) pre_calibrated = False (bool) idx_search_speed = 10.0 (float) zero_count_on_find_idx = True (bool) cpr = 16384 (int) offset = 11282 (int) offset_float = 0.7106562852859497 (float) bandwidth = 1000.0 (float) calib_range = 0.019999999552965164 (float) ignore_illegal_hall_state = False (bool)
When turned on, the motor vibrates violently and jitter .
I use - move_to_pos
and my engine shuts off with errors.
In [85]: hex(odrv0.axis0.motor.error) Out[85]: '0x10' In [86]: hex(odrv0.axis0.controller.error) Out[86]: '0x1' In [87]: hex(odrv0.axis0.error) Out[87]: '0x200'
If disconnect <axis>.controller.config.vel_limit_tolerance = 0
Everything is working. But the vibration remains.
For some time the function even works move_to_pos.
But then everything turns off and an error pops up on the sensor.
In [94]: dump_errors(odrv0) axis0 axis: Error(s): ERROR_ENCODER_FAILED motor: no error encoder: Error(s): controller: no error axis1 axis: no error motor: no error encoder: no error controller: no error
In [93]: hex(odrv0.axis0.encoder.error) Out[93]: '0x80'