Rs 2205 hobby motor with SS41F hall sensor

Hi,
I am doing a project that needs to control the velocity and position of the hobby motor. I bought

odrv0.axis1.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION

i got message that:

error = 0x0010 (int)
is_ready = False (bool)
index_found = False (bool)
shadow_count = 0 (int)
count_in_cpr = 0 (int)
interpolation = 0.0 (float)
phase = 0.0 (float)
pos_estimate = 0.0 (float)
pos_cpr = 0.0 (float)
hall_state = 7 (int)
vel_estimate = 0.0 (float)
calib_scan_response = 0.0 (float)
config:
mode = 1 (int)
use_index = False (bool)
find_idx_on_lockin_only = False (bool)
pre_calibrated = False (bool)
zero_count_on_find_idx = True (bool)
cpr = 28 (int)
offset = 0 (int)
offset_float = 0.0 (float)
enable_phase_interpolation = True (bool)
bandwidth = 100.0 (float)
calib_range = 0.019999999552965164 (float)
calib_scan_distance = 50.26548385620117 (float)
calib_scan_omega = 12.566370964050293 (float)
idx_search_unidirectional = False (bool)
ignore_illegal_hall_state = False (bool)
set_linear_count(count: int)

Can anyone help me. Did i do anything wrong or i need to change some thing
Thank you so much

I believe you need a 3rd hall sensor on your board?

1 Like

Thank you so much about your advice
There is a function in odrive

encoder without index signal.

Is that right when we dont need third hall sensor in order to give feedback to z.

one more thing. When i run odrivetool in anaconda, system feedback like that

(base) C:\Users\VuTran>odrivetool
ODrive control utility v0.4.12
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py:104: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘import sys’)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py:105: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘superexcepthook = sys.excepthook’)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py:106: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘def newexcepthook(ex_class,ex,trace):\n’
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py:109: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘sys.excepthook=newexcepthook’)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Please connect your ODrive.
You can also type help() or quit().
Connected to ODrive 207739994D4D as odrv0

and when i reboot the odrive i get this

In [4]: odrv0.reboot()

ChannelBrokenException Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py in
----> 1 odrv0.reboot()

C:\ProgramData\Anaconda3\lib\site-packages\fibre\remote_object.py in call(self, *args)
160 for i in range(len(args)):
161 self._inputs[i].set_value(args[i])
–> 162 self._parent.channel.remote_endpoint_operation(self._trigger_id, None, True, 0)
163 if len(self._outputs) > 0:
164 return self._outputs[0].get_value()

C:\ProgramData\Anaconda3\lib\site-packages\fibre\protocol.py in remote_endpoint_operation(self, endpoint_id, input, expect_ack, output_length)
313 return self._responses.pop(seq_no)
314 # TODO: record channel statistics
–> 315 raise ChannelBrokenException() # Too many resend attempts
316 finally:
317 self._expected_acks.pop(seq_no)

ChannelBrokenException:

Reconnected to ODrive 207739994D4D as odrv0

what problem with ordrivetool and how can i fix it. i did search about that problem, in this post,they said that whenever i can get information about Odrive just ignore that.

That’s only for incremental quadrature encoders. If you want to use “hoverboard” mode, e.g. 6-state hall feedback, you need the 3rd hall sensor.

It’s normal to get that error when rebooting the odrive :slight_smile:

1 Like

So with those hardware. it means i am controlling motor with incremental quadrature encoders. which step i need to follow, which configuration i need to set

Hi Wetmelon,
i just erase all config and set again. i use odrive v3.6 24v connecting to 12v power supply.
this what i did.

odrv0.axis0.motor.config.pole_pairs = 7
odrv0.axis0.encoder.config.cpr =28
odrv0.save_configuration()
odrv0.reboot()

after it reconnect again, i go to next step

odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE

i hear peep and motor turns. i saw signals in the oscilloscope of hall sensors.
then i check any error with

odrv0.axis0

No error
then

odrv0.axis0.controller.pos_setpoint = 10000

motor turns a bit. and i check error

axis0
axis: Error(s):
ERROR_MOTOR_FAILED
motor: Error(s):
ERROR_CURRENT_UNSTABLE
encoder: no error
controller: no error

i dont know how to fix it, i searched that error around, but cant get proper answer, i checked the cable connection. Can you show me how to solve it.