Hi everyone,
First of all, thanks for the amazing library that makes BLDC motors more accessible and thanks for the extensive support.
I’m trying to troubleshoot my set-up that is not working properly. I’ve spent a few days looking at the forum and the documentation but now I ran out of ideas.
I’m using a BCG 3.0 clone board (ATMega328 with two discrete FET drivers). My motor is a gimbal BLDC motor 2805 140T (that should have 7 pole pairs). I’m also using an AS5600 connected through I2C. This is the cheapest hardware I found so I hope this post can help other people who want to start using this library with a low funds commitment.
These are my motor and driver instances:
BLDCMotor motor = BLDCMotor(7);
BLDCDriver3PWM driver = BLDCDriver3PWM(9,10,11);
I’m using SimpleFOC 2.1
I’m testing the example codes and my set-up is not working when run in a closed-loop. The motor won’t move at all neither in angle or velocity configuration.
The motor first moves during the calibration executing motor.initFOC()
but then becomes irresponsive inside the main loop and it may start shaking if I try to move it by hand.
I also tried the pole pairs finder code but with unreliable results, always different and oftentimes negative.
The interesting part is that works fine in open-loop.
I believe the motor has 7 pole pairs (I was using the wrong number earlier and corrected it). In open-loop it makes a full turn when I input an angle of 6.28.
I also think the magnetic sensor is working properly as the reading shows consistent angles data when the motor is turned by hand (i.e. 6.3 for a full turn, 12 for two, correct negative values etc…)
Now I have two questions:
-
I’m wondering if the magnet is diametrically magnetized. Is it possible that the magnetic sensor shows correct data even if the magnet is wrong?
-
I tried changing the voltage settings as suggested in other posts with no results. Is it possible the PID tuning is causing problems?
Besides these two doubts I have, I don’t know what else to try.
Can you please suggest any other tests I can try?
Thanks