oDrive, 8 Inch Hoverboard motor, Hall sensors calibration

i am little desperate with oDrive and HUB(Hoverboard) motors. It is 48V version of oDrive(v3.5) and 48V HUB motors.
I have connected two 8 Inch 48V motors with hall sensors to oDrive and try to
calibrate with this guide: https://docs.odriverobotics.com/hoverboard.html

so i followed this guide and put all commands there then


followed by

odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION

but nothing happens, sometime just motor turned about 1cm and then stopped, then it beeps
and no movement at all.
Same for both motors, i have checked connection, tried different voltages from 24-48V, no movement during calibration.
Problem is that i do not know how many magnets(poles) is inside of that motors, it is impossible to disassembly, but i have tried many combinations from 15 - 30 with

odrv0.axis0.motor.config.pole_pairs = 15

but no movement.

I believe that it does not matter which order i connect 3 phase(thick) wires, yellow, green, blue.
5 wires from Hall sensor is connected as:
Red -> +5V
Yellow -> A
Green -> B
Blue -> Z
Black -> GND

Can i move this motor without hall sensors connected just to determine if problem is in Hall sensor
or problem with connection with these sensors? Or it must be connected all the time?

So when i put to console

odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION

it should beep and then move to both direction right?

Thank you for your support:)

If you turn your motor do you see hall sensor pulses.
If do you can determent the amount of poles by turning the wheel it 360 degree. And I think divide it by 2

I will definetely try it but do you mean see pulses with multimetr for example or there is
some oDrive function to monitor these pulses via odrive tool command line?

take the encoder counts / 6 are the pole
See hover board documentation. for 6.5 inch hover board 360 pulses are 90 divide by 6 you get the poles.

The counts you get from axis[n].encoder.shadow_count

Hmmmm it looks that there is 90 pulses as well so it should be 15, same as in guide.

but when i put


there is error = 0x0002 (int)

OK, after flashing firmware to latest 0.4.4, there is no error 0x0002 but still no movement after

odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION

only beep sound. Not sure if it should move after this command but i think that it should…

No, it is only supposed to make a small twitch and a beep. First movement is in a later step.

Error 2 is phaseinductance is not in range.
I had that same problem with odrive 3.4.
With 3.4 my motor was out of the hard coded range. No problem with 3.5.
I solved it by changing the range in the code.
But I just saw this https://docs.odriverobotics.com/troubleshooting#common-motor-errors

There some steps there that can help and no code change. What is you phase and inductance value.

Ok, this was unclear to me, thank you.
I was able to config those motors according to guide, and motor moves smoothly. Just after


there is

offset_float = 0.504

so it looks just fine but for other motor(motors are same):

offset_float = 1.491

seems to be working but not sure why offset for second motor are so different?
maybe there is some error in my config?

another thing is that after :

odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.vel_setpoint = 120
# Your motor should spin here
odrv0.axis0.controller.vel_setpoint = 0
odrv0.axis0.requested_state = AXIS_STATE_IDLE

motor is moving and than stop after setpoint 0 what is fine but when i execute it same
for second motor - no move
Then i have to reboot it and then i am able to control second motor but not first one and so on.
So i am able to control only one motor, when i want to drive second one i have to reboot it.
Any clue why?



there is:

error = 0x0010 (int)

after reboot no error axis1 working but error 0x0010 on axis0 after reboot OK and so on.

Maybe something with noise on HALL encoders pins, according to this post?

I finally get some 22n capacitors and it is fixed now, thank you and G_Penzo for valuable answers:)