14 magnets = 7 pole pairs. Great glad that is cleared up.
Oh boy that’s a can of worms. Let me see if I can break this down a little.
This is the motor that I am running. Running this at 37 v and at the cut off RPM of 3662ish I should be getting a duty cycle of 78.1%. I am not sure what Lphase is here but plugging in the numbers it looks like I should be getting an amperage ripple of 114 amps at 8kHz. Less than yours. At 24kHz the number is 38 amps. I am not sure at what switching frequency I am running at or how to tell? But…
Maybe this doesn’t even matter because A: doing that didn’t seem to fix your problem and B: I don’t think we are having the same error are we? It looks like I am getting the error ERROR_CURRENT_SENSE_SATURATION and you were getting the error ERROR_BRAKE_CURRENT_OUT_OF_RANGE.
The last post there lost me a little but it sounds like you are still waiting for @madcowswe to get back to you. Oskar, do you want to weigh in here? Do you believe our problems are related or can you shed some light on why I am getting this error?
NOTE: I have an oscilloscope with one working probe right now if anyone has a suggestion for how to use it to gather some more data.
UPDATE: After reading this I started playing around with the various settings on ODrive tool and also hooked it up to my Arduino system where I was using a controller to play with stuff. I noticed a few things.
First, when I used the controller to slowly increase velocity I could get to a higher RPM than when I would start at a high velocity and turn it on from zero. When I turn it on from zero it will often shut off before it reaches even 3000 rpm. Also when this happens it seems to be happening when the motor first starts spinning or when it is turning it off. I believe when it is stoping this is because the motor has stored rotational energy and is acting as a generator and it is causing an amperage spike as this energy is pushed back into the ODrive. Not sure why this is happening when it is starting unless the ODrive is opening up the amperage all the way and causing a spike. Maybe it is trying to ramp too fast?
Second, when I slowly increase the speed it will still shutoff at around 3500 rpm. But this time I noticed that the motor starts to vibrate very hard before it shuts off. Do I need to run a tuning procedure? It doesn’t vibrate when stationary.