I am currently using an ODrive S1 in sensorless mode. Speed control works well, but now I also want to be able to stall my motor. This post seems to point towards the LockinSpin mode to achieve this.
I tried to find more information about this mode, and from what I understand, here’s the step I need to follow:
Will this procedure work? Is it required to set the input velocity to 0?
Do you have any suggestions for the current required to resist to external forces? It doesn’t need to stay at a specific position, I just don’t want my motor to spin freely.
Hi! You currently can’t control lock-in velocity from input_vel. You’ll have to modify general_lockin.vel and then put it in lock-in spin – it only updates the parameters upon entering closed loop control, so it can’t be changed in real time.
Setting general_lockin.vel was the parameter I was missing. Concerning the current, is it the one going to the motor, or the one provided by the bus? I tried to play with the parameter, but the values don’t match. For example, I observed the following ibus values:
1.15 A @ general_lockin.current set to 25
2.40 A @ general_lockin.current set to 40
2.65 A @ general_lockin.current set to 50
2.65 A @ general_lockin.current set to 100
I need to do some more tests to see which config is best, my goal is to keep my fan at 0 RPM even with external forces. The last problem remaining is to get it to stop when already turning, any suggestions?
The current isn’t the same – bus power == motor power, but the ODrive “steps down” the voltage as a property of how motor control works, so motor voltage < bus voltage, motor current > bus current, and motor voltage * motor current == bus voltage * bus current.
Happy to do a better job explaining tomorrow - here’s a good article on it though:
What motor are you using? The S1 will limit the current to around 40-80A depending on your DC bus overvoltage trip threshold (see ODrive S1 Datasheet — ODrive Documentation 0.6.9 documentation). But that 40-80A figure may be massive for your motor, depending on which it is.
To stop when turning, I’d set the velocity as low as it can go while maintaining good sensorless control (usually a few hundred RPM), then set to idle and immediately set lock-in spin with a vel of zero.
Overall though, I’d maybe just recommend using an encoder may I ask why you aren’t able to for this application?
I am working with a Delta PAG fan which is rated 26 A @ 13 V. I don’t know the motor constant (Kv), but I was able to achieve better performance than the original controller (lower current consumption since we use 28 V with the ODrive for the same RPM).
If the motor is spinning too fast in idle, is it possible to make it stop by increasing the lockin spin current? I seem to get the 4096 error if the motor hasn’t slowed down enough. This is also a problem if I try to go into closed loop.
We will definitely include an encoder in our next version! It will simplify a lot of the problems we have with sensorless right now, but it requires several changes to our design.
Quick question, what is the maximum operating temperature of the ODrive S1? I have the heat spreader plate, and the specs says that the board is able to output 40 A continuous with this configuration. In lockin spin, I feel like more heat is generated since the current goes only through one phase.