You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Arduino library implements Field Oriented Control (FOC) algorithm for BLDCand Stepper motors. FOC algorithm produces incomparably smooth operation and high degree of torque, velocity and position control.
36
+
This Arduino library implements Field Oriented Control (FOC) algorithm for BLDC, Stepper, and Hybrid Stepper motors. FOC algorithm produces incomparably smooth operation and high degree of torque, velocity and position control.
36
37
The library is intended both for:
37
38
- Beginners searching for a simple and *user-friendly* way to learn how to control BLDC and Stepper motors
38
-
- Advanced users ready to dig deeper into the FOC algorithm and optimize the code for their particular application/hardware.
39
+
- Advanced users ready to dig deeper into the FOC algorithm and optimize the code for their particular application/hardware
We live in very exciting times 😃! BLDC motors are entering the hobby community more and more and many great projects have already emerged leveraging their far superior dynamics and power capabilities. BLDC motors have numerous advantages over regular DC motors but they have one big disadvantage, the complexity of control. Even though it has become relatively easy to design and manufacture PCBs and create our own hardware solutions for driving BLDC motors the proper low-cost solutions are yet to come. One of the reasons for this is the apparent complexity of writing the BLDC driving algorithms, Field oriented control (FOC) being an example of one of the most efficient ones.
21
-
The solutions that can be found on-line are almost exclusively very specific for certain hardware configuration and the microcontroller architecture used.
22
-
Additionally, most of the efforts at this moment are still channeled towards the high-power applications of the BLDC motors and proper low-cost and low-power FOC supporting boards are very hard to find today and even may not exist. <br>
20
+
We live in very exciting times 😃! BLDC motors are entering the hobby community more and more and many great projects have already emerged leveraging their far superior dynamics and power capabilities. These motors have numerous advantages over regular DC motors but they have one big disadvantage, the complexity of control. Even though it has become relatively easy to design and manufacture PCBs and create our own hardware solutions for driving BLDC motors, the proper low-cost solutions have been challenging to develop. One of the reasons for this is the apparent complexity of writing the driving algorithms, Field Oriented Control (FOC) being one of the most efficient ones.
21
+
The solutions that can be found online are almost exclusively very specific for certain hardware configurations and microcontroller architectures. Similar to BLDCs, Stepper motors can hugely benefit from FOC control, but the solutions for FOC controlled stepper motors are even more scarce.
22
+
<br>
23
23
Therefore this is an attempt to:
24
24
- 🎯 Demystify FOC algorithm and make a robust but simple Arduino library: [Arduino <spanclass="simple">Simple<spanclass="foc">FOC</span>library</span>](https://docs.simplefoc.com/arduino_simplefoc_library_showcase)
25
25
- <i>Support as many <b>motor + sensor + driver + mcu</b> combinations out there</i>
26
-
- 🎯 Develop modular and easy to use FOC supporting BLDC driver boards
26
+
- Make transitioning from one hardware combination to another as seamless as possible
27
+
- 🎯 Develop modular and easy to use FOC supporting driver boards
27
28
- For official driver boards see [<spanclass="simple">Simple<spanclass="foc">FOC</span>Boards</span>](https://docs.simplefoc.com/boards)
28
29
- Many many more boards developed by the community members, see [<spanclass="simple">Simple<spanclass="foc">FOC</span> Community</span>](https://community.simplefoc.com/)
- HybridStepperMotor added to the main library [PR457](https://github.com/simplefoc/Arduino-FOC/pull/457) - [see in docs](steppermotor)
39
-
- Motor characterisation (phase resistance and inductance) [PR436](https://github.com/simplefoc/Arduino-FOC/pull/436) - [see in docs](bldcmotor#how-can-i-measure-the-phase-resistance-and-inductance)
40
-
- SAMD21 support for low-side current sensing [PR479](https://github.com/simplefoc/Arduino-FOC/pull/479)
41
-
- RP2350 support [PR435](https://github.com/simplefoc/Arduino-FOC/pull/435)[PR468](https://github.com/simplefoc/Arduino-FOC/pull/468)
- New driver code [PR442](https://github.com/simplefoc/Arduino-FOC/pull/442)
44
-
- Low-side current sensing support for H7 family [PR460](https://github.com/simplefoc/Arduino-FOC/pull/460)
45
-
- Docs
46
-
- Hybrid stepper motor example [see in docs](stepper_control_shield)
47
-
- Sensorless FOC example [see in docs](sensorless_foc_nucleo_example)
48
-
- A short guide to synchronous loop - [see in docs](real_time_loop)
49
-
- See the complete list of bugfixes and new features of v2.3.5 [fixes and PRs](https://github.com/simplefoc/Arduino-FOC/milestone/12)
35
+
- Added support for ADC reads in addition to Lowside current sense [#506](https://github.com/simplefoc/Arduino-FOC/pull/506)
36
+
- Added support for multiple motors low-side CS (one per ADC) with ADC current sensing [#503](https://github.com/simplefoc/Arduino-FOC/pull/503)
37
+
- BG341 low-side current sense sync was lost in v2.3.5 - fixed [#482](https://github.com/simplefoc/Arduino-FOC/pull/482)
38
+
- ESP32
39
+
- Many ESP32 safety optimisations by [@uLipe](https://github.com/uLipe): [#490](https://github.com/simplefoc/Arduino-FOC/pull/490),[#491](https://github.com/simplefoc/Arduino-FOC/pull/491),[#492](https://github.com/simplefoc/Arduino-FOC/pull/492),[#493](https://github.com/simplefoc/Arduino-FOC/pull/493),[#495](https://github.com/simplefoc/Arduino-FOC/pull/495)
40
+
- Better ADC-Timer alignement for more stable current sensing [See this commit](https://github.com/simplefoc/Arduino-FOC/commit/877699b4db4e6e3ecc16b16cc4337af928e746f4)
41
+
- Now compiles for all v3.x arduino-esp32 versions (v2.3.5 was compatible with v3.2.x)
42
+
-`adcRead` small refactor - no more magic numbers
43
+
- Others
44
+
- Teensy4 support for phase state setting [#498](https://github.com/simplefoc/Arduino-FOC/pull/498) by [@Ragiton](https://github.com/Ragiton)
45
+
- Added support for Arduino Nano Matter board by [@silabs-szabog](https://github.com/silabs-szabog) : [#485](https://github.com/simplefoc/Arduino-FOC/pull/484)
46
+
-**Major New features**
47
+
- Add current and voltage feed forward terms to motor classes by [@Copper280z](https://github.com/Copper280z) in [#454](https://github.com/simplefoc/Arduino-FOC/pull/454)
48
+
- Velocity Calculation rework by [@Copper280z](https://github.com/Copper280z) in [#45](https://github.com/simplefoc/Arduino-FOC/pull/45)
49
+
- Motion control - [docs](https://docs.simplefoc.com/motion_control)
50
+
- Added `custom` motion control mode - see in [docs](https://docs.simplefoc.com/custom_control) and in [examples](https://github.com/simplefoc/Arduino-FOC/tree/master/examples/motion_control)
51
+
- Added `angle_nocascade` control mode for position control without velocity cascade - see in [docs](https://docs.simplefoc.com/angle_loop) - [#384](https://github.com/simplefoc/Arduino-FOC/pull/384)
52
+
-**Now all the closed and open loop modes can be used with any torque control modes (voltage and current)**
53
+
- Ex. `velocity_openloop` with `foc_current` torque control
54
+
- Torque control - [docs](https://docs.simplefoc.com/torque_control)
55
+
- Added `estimated_current` torque control mode for model-based current estimation without current sensing - see in [docs](https://docs.simplefoc.com/estimated_current_mode)
56
+
- Now we can easily switch between voltage and estimated current control
57
+
- Docs updates - see [docs](https://docs.simplefoc.com/)
58
+
- Write the code page updated - see [docs](https://docs.simplefoc.com/code)
59
+
- Better step-by-step setup guides - see [docs](https://docs.simplefoc.com/example_from_scratch)
60
+
- New motion control documentation - see [docs](https://docs.simplefoc.com/motion_control)
61
+
- New torque/FOC control documentation - see [docs](https://docs.simplefoc.com/torque_control)
62
+
- Theory corner updated and extended - see [docs](https://docs.simplefoc.com/theory_corner)
63
+
- Library source updated and extended - see [docs](https://docs.simplefoc.com/source_code)
64
+
- Practical guides updated and extended - see [docs](https://docs.simplefoc.com/practical_guides)
65
+
- Motor parameter measurement guide - see [docs](https://docs.simplefoc.com/practical_guides#motor-parameters-and-characterization)
66
+
- PID tuning guides - see [docs](https://docs.simplefoc.com/practical_guides#pid-tuning)
67
+
- Examples
68
+
-`align_current_sense.ino` example added to the `examples/utils/current_sense_test` allowing to verify the alignment between the driver and the current sense phases
69
+
70
+
- Changelog
71
+
- See the release notes for more details: [see release](https://github.com/simplefoc/Arduino-FOC/releases)
72
+
- See the milestones: [v2.3.6 (unreleased)](https://github.com/simplefoc/Arduino-FOC/milestone/14) and [v2.4.0](https://github.com/simplefoc/Arduino-FOC/milestone/13)
50
73
</blockquote>
51
74
52
75
# Arduino <spanclass="simple">Simple<spanclass="foc">FOC</span>library</span> <small>- [Read more ...](arduino_simplefoc_library_showcase)</small>
@@ -56,29 +79,36 @@ Therefore this is an attempt to:
0 commit comments