Practical guides
Hands-on procedures and troubleshooting tips for working with BLDC and stepper motors using the SimpleFOClibrary. This section is community-driven, so contributions are welcome.
Need more help? Visit the community forum: community.simplefoc.com
Getting started
- Choosing PWM pins for your application - selecting appropriate PWM pins.
- Choosing analog pins for your application - selecting ADC inputs.
- Units in the library - units for key motor/sensor parameters and how to transform them.
PID tuning
- Tuning the current control loop - step-by-step tuning process.
- Tuning the velocity control loop - step-by-step tuning process.
- Ziegler-Nichols PID tuning - structured PID tuning method.
Motor parameters and characterization
- Measuring the phase resistance - multimeter method.
- Measuring the KV rating - using SimpleFOC to measure KV.
- Testing and tuning motor parameters - how to manually test and tune motor parameters for optimal performance.
- Automatic motor characterisation with characteriseMotor() - using the built-in function to measure motor parameters.
Advanced control
- Real-time loop with timers - implementing the FOC loop in hard real time.
- Implementing a custom sensor - how to implement a custom sensor class.
- Implementing a custom current sense - how to implement a custom current-sensing setup.
- Regular ADC reads during FOC - reading auxiliary analog signals safely while current sensing is active.
Performance tips
- Open-loop efficiency considerations — efficiency considerations for open-loop control.
Coding guides
- Library options and build flags cheat sheet - compile-time options and build flags.