I’ve decided to run my actuator in sensorless mode until I can get a replacement encoder to test. When I put the actuator in closed loop mode, it drives the motor past my sensorless_ramp.vel and keeps accelerating until I stop it by changing it to an IDLE state. I can tell that changing the parameters in sensorless_ramp is working because when I modify the acceleration, the speed accelerates faster or slower depending on the value. But the sensorless_ramp.vel and ramp_distance seem to have no affect at all on the system’s performance when in sensorless mode. Any ideas on why my motor just accelerates and doesn’t go to the speed I set?
Here are my parameters:
accel: -5.0 (float)
current: 20.0 (float)
finish_distance: -5.0 (float)
finish_on_distance: False (bool)
finish_on_vel: True (bool)
initial_pos: 0.0 (float)
ramp_distance: 1.0 (float)
ramp_time: 1.0 (float)
vel: -6.0 (float)
Does it work when you swap the direction (positive acceleration and velocity)?
Another thing you can try is to apply the same parameters to
odrv0.axis0.config.general_lockin and then do
odrv0.axis0.requested_state = AxisState.LOCKIN_SPIN. Does the ODrive finish (go back to IDLE) when it reaches -6 turns/s, or does it keep accelerating?
Interestingly, the ODrive only seems to work in the positive direction in both LOCKIN_SPIN and sensorless CLOSED_LOOP_CONTROL. When I change the exact same parameters to negative, the ODrive just shoots past the target and keeps going on forever.
Ah I see, so after looking into this,
accel must be positive regardless of the sign of
vel. So when you set a negative
vel with a positive
accel, it will automatically accelerate into the correct (negative) direction and terminate as intended.
Got it working, thanks for your help! Just curious, what is the maximum voltage BLDC motors can be ran at with the ODrive? We have a 300V motor and I am curious if the ODrive would be capable of running such a system.
You can find the specs here: HARDWARE SPECIFICATIONS — ODrive Documentation 0.6.7 documentation
The ODrive Pro can take up to 58V DC. You can still drive a higher-rated motor with it, but you won’t get the maximum rated speed of the motor (note that voltage ratings of motors are often a proxy for maximum speed ratings).
Got it, thank you @Samuel !