Hey @MORDRET_Pierre-Yves,
Welcome to SimpleFOC!
A few points I note:
-
The motors you link, in my experience, have around 5-10ohm phase resistance. Not 100mOhm like you write. Did you measure them?
But in your sample code you’re not using the resistance value, so it should not matter. -
You’re using the same voltage limit on motor and driver, which will lead to a lot of overmodulation. Please try with
motor.voltage_limit = driver.voltage_limit/2.0f; -
Please remove the KV value from the motor constructor for initial testing. You can always add it back later.
-
The L298N is a very old transistor based h-bridge. It’s hard to get good performance out of it. In particular, I think running it at 5V is a bit low, you might have better results with the motor supply voltage at 10V, well above the logic switching voltage (3.3V for the black pill MCUs).