Using Odrive on BLDC Micromotor with Internal Hall Sensor

Greetings.
I’ve a BLDC micromotor (low current) and Odrive. I want to drive this motor with Odrive. I know, it has low current and I have to change shunt resistors on Odrive. But before that I want to learn, could I drive this motor with full performance? Actually I had received small motions but it was coincidence.

Motor: lm1247-020-01 (Faulhaber)
Datasheet:


2

Parameters I adjusted:
odrv0.axis0.motor.config.current_lim = 1.66 (from datasheet)
odrv0.axis0.controller.config.vel_limit = 50 (average value)
odrv0.axis0.motor.config.calibration_current = 0.8 (I think it’s OK)
odrv0.config.enable_brake_resistor = True (I use)
odrv0.config.brake_resistance = 0.5
odrv0.config.dc_max_negative_current = 0.01 (Actually I don’t know. How can i find?)
odrv0.axis0.motor.config.pole_pairs = 2 (because linear, i think it’s OK)
odrv0.axis0.motor.config.torque_constant = 1
odrv0.axis0.motor.config.motor_type = MOTOR_TYPE_HIGH_CURRENT (?)
odrv0.axis0.encoder.config.cpr = ? (Unfortunately I dont know).

I must write many parameters but they are not included in the datasheet and I don’t know the equivalent of other parameter commands in Odrive.

What should I do step by step? I am not very advanced in these matters. Thank you for your help in advance.

This should be a negative value. Try -1.

This is a crucial piece of information. It is in terms of “counts of encoder per 2 pole pairs” in your case. Everything else can be left the way you put it for now.

Yes. I typed -0.01 to the negative current and 3000 to the cpr. It worked when I type:

odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE

But it went to one direction till the end.

That situation is very good. Now I want position control. I want to go and return between two border lines. Should I look into this issue:
https://docs.odriverobotics.com/control-modes.html#filtered-position-control

Try reducing encoder.config.calib_scan_distance

I did but it doesn’t work. Still same.

odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.input_pos = 1

I’ve ran these codes but nothing happened. By the way, I’m getting error.

ERROR_ILLEGAL_HALL_STATE

I will connect 22nF but could we do anything to during this time?