I’d like to preface this by saying that I’ve already read a similar thread on this, but it seems to have gone silent with no apparent solution, so I’m creating this one. I tried suggestions from that thread, such as increasing the current range, but this has not worked.
I’m using a 56V ODrive 3.6 with FW 0.4, driving an ODrive 6374 150kV motor, with the supplied 2 Ohm 50 Watt brake resistor. My velocity limit is set at 983,040 counts/s, my current limit is set at 60A, and my current range is set to 180A.
Additionally, it should be noted that the motor is installed in a 3d-printed gearbox (below), although this does not add any significant load.
I’ve had no problems running the motor at low speeds under high load, but now that I’m trying to reach the full 7200RPM of the motor, I’m running into problems. When I command a velocity of 983,040 counts/s, the motor spins up rapidly for a moment, then the ODrive throws ERROR_BRAKE_CURRENT _OUT_OF_RANGE and ERROR_BREAK_RESISTOR_DISARMED, and the motor coasts to a stop, never having reached its commanded velocity. I thought this may have been due to the rapid start, so I tried current control mode with a commanded current of 0.5A. This was as low as I could go - so low that I often had to give the motor a little kick-start. The motor spun up slowly as expected, and did reach the velocity limit, but after only a moment of sustained speed, it threw the same errors as before and coasted to a stop. Here is the data streamed from the odrive during this test:
Help would be much appreciated. Thanks!
2 Likes
Hi John, I had shelved this project while a higher priority one took over. Coming back to it, I’ve still got the same problems.
Do you happen to have a second brake resistor? (or just a larger one) I don’t, but I feel like it might help. To me it looks like the current goes in to an uncontrolled oscillation which eventually saturates the brake resistor, so putting a second one in series (and changing the appropriate setting in odrv) might allow it to handle the current spikes.
Actually, it has just occurred to me that I may be able to find one at work, so I’ll try to test this too.
I think I also experimented with that quite a while back, don’t think it was successful, but will be interested to how you get on. I’m trying to get back up to speed myself (no pun intended).
Thanks for the nice graphs. Your current controller is going unstable, which eventually results in a negative current which exceeds the capabilities of the brake resistor, which is why it’s throwing that fault.
Please set your requested_current_range
to 60A and see if that helps.
I switched back to using an encoder from Halls yesterday afternoon and managed to sustain 10,000rpm when Halls were tripping out at 2000rpm. With the new ODrive, I hadn’t added the extra capacitors to the Hall inputs, which was most likely the reason the Hall mode was failing so early.
I can see that you’re not using Halls, John, but wanted to add this feedback for any others interested.
1 Like
Have you tried reducing vel_integrator_gain at the higher speed, I mention this because when I acheived 10,000rpm, I then increased vel_integrator_gain and vel_gain a bit and it began to oscilate slightly then tripped.
That was what it was originally set at, I only changed it following suggestions in the comments of Neil_FV’s post about this issue. It didn’t have any noticeable effect.
Is there a PID loop controlling current specifically? Can I tweak its tuning?
Okay I just tried to spin the motor outside the gearbox (no load) and it spun up to and held 7200 RPM just fine. I had been doing motor calibration with it mounted in the gearbox, which I’m guessing created bad PID values for the current controller. I can’t put it back in the gearbox at the moment, but I will report back once I can.
Also, how do I get it to keep motor calibration after power cycle? It doesn’t seem to want to.
I set these parameters after successful calibration to save and prevent having to repeat on a power cycle.
odrv0.axis0.motor.config.pre_calibrated = True
odrv0.axis0.encoder.config.pre_calibrated = True
odrv0.axis0.config.startup_motor_calibration = False
odrv0.axis0.config.startup_encoder_offset_calibration = False
odrv0.axis0.config.startup_closed_loop_control = True
odrv0.save_configuration()