Greetings, I have embarked on SimpleFOC and BLDC motor controller journey. There is much to learn but I have made a few short videos of my progress so far in the hopes that it will be useful to others.
This is part 1, which is to test out closed loop velocity control and to get the basic code and hardware set up and validated. I would call this mostly a success.
Part 2 Closed loop angle control.
Part 3: Closed loop angle control with centering (like a hobby servo). [video coming soon]
1 Like
video links above updated with angle control. Experiments moving along nicely.
I’ll be honest, starting out with this was a headache for me and took me weeks to figure it out. In the end, the issue was me and not SimpleFOC.
First and foremost get your power inputs right. For me using the 3v3 pin instea of the 5v pins to power the AMT103 encoder, solved the jitteryness I was getting. And this I was trying to fight for weeks!
The other thing is to exactly follow the steps in this link without skipping a step. There is a reason why the guide is written the way it is.
after that, id recomend also looking at this guide which is similar to above except a little more specific to the different control methods:
depending on the MCU you are using, it is also important to verify that you are using the correct pins for the encoder and motor for your MCU:
by this point, you should have the motor mostly working but you still will need to tune PID params and debug motor code. You can use serial.print but I would also highly recomend simplefoc studio:
In terms of motors, id also recomend getting yourself an assortment of motors from Ali express. Each motor has different strengths and without deep knowlege of FOC control, its hard to choose the right motor. Through experimentation, the correct motor for your project can be achieved by testing different BLDC motors with voltage and pole pair specs.
these are the motors I am trying so far:
- iFlight iPower GM4108H-120T Gimbal Brushless Motor
- MiToot 2206 100T.
- TODO: add more motors here
Equally important is trying different encoders. So far, I have used the
As I experiment with these motors, I will post my findings here.