[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79860":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":16,"starSnapshotCount":16,"syncStatus":42,"lastSyncTime":43,"discoverSource":44},79860,"Arduino-FOC","simplefoc\u002FArduino-FOC","simplefoc","Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library",null,"https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC","C++",2864,708,82,63,0,8,14,62.95,false,"main",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"foc","motor","encoder","arduino","bldc-motor","low-cost","vector-control","arduino-library","bldc-motor-controller","arduino-foc","bldc-motors","stepper-motor","stepper-motor-control","stepper-library","foc-algorithm","arduino-simplefoc","2026-06-11 04:06:55","# SimpleFOClibrary - **Simple** Field Oriented Control (FOC) **library** \u003Cbr> \n### A Cross-Platform FOC implementation for BLDC and Stepper motors\u003Cbr> based on the Arduino IDE and PlatformIO \n\n[![AVR build](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Farduino.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Farduino.yml)\n[![STM32 build](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fstm32.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fstm32.yml)\n[![ESP32 build](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fesp32.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fesp32.yml)\n[![RP2040 build](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Frpi.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Frpi.yml)\n[![SAMD build](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fsamd.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fsamd.yml)\n[![Teensy build](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fteensy.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Fteensy.yml) \n[![MBED build](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Farduino_mbed.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Factions\u002Fworkflows\u002Farduino_mbed.yml)\n\n![GitHub release (latest by date)](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fsimplefoc\u002Farduino-foc)\n![GitHub Release Date](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease-date\u002Fsimplefoc\u002Farduino-foc?color=blue)\n![GitHub commits since tagged version](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcommits-since\u002Fsimplefoc\u002Farduino-foc\u002Flatest\u002Fdev)\n![GitHub commit activity (branch)](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcommit-activity\u002Fm\u002Fsimplefoc\u002Farduino-foc\u002Fdev)\n\n[![arduino-library-badge](https:\u002F\u002Fwww.ardu-badge.com\u002Fbadge\u002FSimple%20FOC.svg)](https:\u002F\u002Fwww.ardu-badge.com\u002Fbadge\u002FSimple%20FOC.svg)\n[![PlatformIO Registry](https:\u002F\u002Fbadges.registry.platformio.org\u002Fpackages\u002Faskuric\u002Flibrary\u002FSimple%20FOC.svg)](https:\u002F\u002Fregistry.platformio.org\u002Flibraries\u002Faskuric\u002FSimple%20FOC)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![status](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F4382445f249e064e9f0a7f6c1bb06b1d\u002Fstatus.svg)](https:\u002F\u002Fjoss.theoj.org\u002Fpapers\u002F4382445f249e064e9f0a7f6c1bb06b1d)\n\n\nWe 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.\nThe 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.\n\u003Cbr>\nTherefore this is an attempt to: \n- 🎯 Demystify FOC algorithm and make a robust but simple Arduino library: [Arduino \u003Cspan class=\"simple\">Simple\u003Cspan class=\"foc\">FOC\u003C\u002Fspan>library\u003C\u002Fspan>](https:\u002F\u002Fdocs.simplefoc.com\u002Farduino_simplefoc_library_showcase)\n  - \u003Ci>Support as many \u003Cb>motor + sensor + driver + mcu\u003C\u002Fb> combinations out there\u003C\u002Fi>\n  - Make transitioning from one hardware combination to another as seamless as possible\n- 🎯 Develop modular and easy to use FOC supporting driver boards\n   - For official driver boards see [\u003Cspan class=\"simple\">Simple\u003Cspan class=\"foc\">FOC\u003C\u002Fspan>Boards\u003C\u002Fspan>](https:\u002F\u002Fdocs.simplefoc.com\u002Fboards)\n   - Many many more boards developed by the community members, see [\u003Cspan class=\"simple\">Simple\u003Cspan class=\"foc\">FOC\u003C\u002Fspan> Community\u003C\u002Fspan>](https:\u002F\u002Fcommunity.simplefoc.com\u002F)\n\n\n> NEW RELEASE 📢 : \u003Cspan class=\"simple\">Simple\u003Cspan class=\"foc\">FOC\u003C\u002Fspan>library\u003C\u002Fspan> v2.4.0\n> - STM32\n>   - Added support for ADC reads in addition to Lowside current sense [#506](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F506)\n>   - Added support for multiple motors low-side CS (one per ADC) with ADC current sensing [#503](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F503)\n>   - BG341 low-side current sense sync was lost in v2.3.5 - fixed [#482](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F482)\n> - ESP32 \n>   - Many ESP32 safety optimisations by [@uLipe](https:\u002F\u002Fgithub.com\u002FuLipe): [#490](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F490),[#491](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F491),[#492](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F492),[#493](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F493),[#495](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F495)\n>   - Better ADC-Timer alignement for more stable current sensing [See this commit](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fcommit\u002F877699b4db4e6e3ecc16b16cc4337af928e746f4)\n>   - Now compiles for all v3.x arduino-esp32 versions (v2.3.5 was compatible with v3.2.x) \n>   - `adcRead` small refactor - no more magic numbers\n> - Others\n>   - Teensy4 support for phase state setting [#498](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F498) by [@Ragiton](https:\u002F\u002Fgithub.com\u002FRagiton)\n>   - Added support for Arduino Nano Matter board by [@silabs-szabog](https:\u002F\u002Fgithub.com\u002Fsilabs-szabog) : [#485](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F484)\n> - **Major New features**\n>    - Add current and voltage feed forward terms to motor classes by [@Copper280z](https:\u002F\u002Fgithub.com\u002FCopper280z) in [#454](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F454)\n>    - Velocity Calculation rework by [@Copper280z](https:\u002F\u002Fgithub.com\u002FCopper280z) in [#45](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F45)\n>    - Motion control - [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fmotion_control)\n>       - Added `custom` motion control mode - see in [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fcustom_control) and in [examples](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Ftree\u002Fmaster\u002Fexamples\u002Fmotion_control)\n>       - Added `angle_nocascade` control mode for position control without velocity cascade - see in [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fangle_loop)  - [#384](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fpull\u002F384)\n>       - **Now all the closed and open loop modes can be used with any torque control modes (voltage and current)** \n>           - Ex. `velocity_openloop` with `foc_current` torque control\n>   - Torque control - [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Ftorque_control)\n>      - Added `estimated_current` torque control mode for model-based current estimation without current sensing - see in [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Festimated_current_mode) \n>      - Now we can easily switch between voltage and estimated current control\n> - Docs updates - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002F)\n>     - Write the code page updated - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fcode)\n>     - Better step-by-step setup guides - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fexample_from_scratch)\n>     - New motion control documentation - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fmotion_control)\n>     - New torque\u002FFOC control documentation - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Ftorque_control)\n>     - Theory corner updated and extended - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Ftheory_corner)\n>     - Library source updated and extended - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fsource_code)\n>     - Practical guides updated and extended - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fpractical_guides)\n>       - Motor parameter measurement guide - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fpractical_guides#motor-parameters-and-characterization)\n>       - PID tuning guides - see [docs](https:\u002F\u002Fdocs.simplefoc.com\u002Fpractical_guides#pid-tuning)\n> - Examples\n>   - `align_current_sense.ino` example added to the `examples\u002Futils\u002Fcurrent_sense_test` allowing to verify the alignment between the driver and the current sense phases \n> - Changelog\n>    - See the release notes for more details: [see release](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Freleases)\n>    - See the milestones: [v2.3.6 (unreleased)](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fmilestone\u002F14) and [v2.4.0](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC\u002Fmilestone\u002F13)\n\n\n## Arduino *SimpleFOClibrary* ![GitHub release (latest by date)](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fsimplefoc\u002Farduino-foc)\n\n\u003Cp align=\"\">\n\u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FY5kLeqTc6Zk\">\n\u003Cimg src=\"https:\u002F\u002Fdocs.simplefoc.com\u002Fextras\u002FImages\u002Fyoutube.png\"  height=\"320px\">\n\u003C\u002Fa>\n\u003C\u002Fp>\n\nThis video is a bit outdated but it demonstrates the *Simple**FOC**library* basic usage, electronic connections and shows its capabilities.\n\n### Features\n- **Easy install**: \n   - Arduino IDE: Arduino Library Manager integration\n   - PlatformIO\n- **Open-Source**: Full code and documentation available on github\n- **Goal**: \n   - Support as many [sensor](https:\u002F\u002Fdocs.simplefoc.com\u002Fposition_sensors) + [motor](https:\u002F\u002Fdocs.simplefoc.com\u002Fmotors) + [driver](https:\u002F\u002Fdocs.simplefoc.com\u002Fdrivers) + [current sense](https:\u002F\u002Fdocs.simplefoc.com\u002Fcurrent_sense) combinations as possible\n   - Make transitioning from one hardware combination to another as seamless as possible\n   - Provide up-to-date and in-depth documentation with API references and examples\n- **Easy to setup and configure**: \n   - Easy hardware configuration \n   - Each hardware component is a C++ object (easy to understand) \n   - Easy [tuning the control loops](https:\u002F\u002Fdocs.simplefoc.com\u002Fmotion_control)\n   - Advanced control features: velocity and current feed-forward, improved velocity calculation\n   - [*Simple**FOC**Studio*](https:\u002F\u002Fdocs.simplefoc.com\u002Fstudio) configuration GUI tool for real-time tuning and monitoring\n   - Built-in communication and monitoring via Serial, I2C, or custom protocols\n- **Cross-platform**:\n   - Seamless code transfer from one microcontroller family to another \n   - Supports multiple [MCU architectures](https:\u002F\u002Fdocs.simplefoc.commicrocontrollers):\n      - Arduino: UNO R4, UNO, MEGA, DUE, Leonardo, Nano, Nano33, MKR ....\n      - STM32 (Nucleo, Bluepill, B-G431B-ESC1, H7 family, etc.)\n      - ESP32 (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6)\n      - Teensy (3.x, 4.x)\n      - RP2040\u002FRP2350 (Raspberry Pi Pico)\n      - SAMD (Arduino Zero, MKR boards)\n      - MBED (Portenta, Nano 33 BLE)\n      - Silabs\n      - many more ...\n\n\n\n## Documentation\nFull API code documentation as well as example projects and step by step guides can be found on our [docs website](https:\u002F\u002Fdocs.simplefoc.com\u002F).\n\n![image](https:\u002F\u002Fuser-images.githubusercontent.com\u002F36178713\u002F168475410-105e4e3d-082a-4015-98ff-d380c7992dfd.png)\n\n\n## Getting Started\nDepending on if you want to use this library as the plug and play Arduino library or you want to get insight in the algorithm and make changes there are two ways to install this code.\n\n- Full library installation [Docs](https:\u002F\u002Fdocs.simplefoc.com\u002Flibrary_download)\n- PlatformIO [Docs](https:\u002F\u002Fdocs.simplefoc.com\u002Flibrary_platformio)\n\n### Arduino *SimpleFOClibrary* installation to Arduino IDE\n#### Arduino Library Manager \nThe simplest way to get hold of the library is directly by using Arduino IDE and its integrated Library Manager. \n- Open Arduino IDE and start Arduino Library Manager by clicking: `Tools > Manage Libraries...`.\n- Search for `Simple FOC` library and install the latest version.\n- Reopen Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.\n\n#### Using Github website \n- Go to the [github repository](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC)\n- Click first on `Clone or Download > Download ZIP`. \n- Unzip it and place it in `Arduino Libraries` folder. Windows: `Documents > Arduino > libraries`.  \n- Reopen Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.\n\n#### Using terminal\n- Open terminal and run\n```sh  \ncd #Arduino libraries folder\ngit clone https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC.git\n```\n- Reopen Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.\n\n## Community and contributing\n\nFor all the questions regarding the potential implementation, applications, supported hardware and similar please visit our [community forum](https:\u002F\u002Fcommunity.simplefoc.com) or our [discord server](https:\u002F\u002Fdiscord.gg\u002FkWBwuzY32n).\n\nIt is always helpful to hear the stories\u002Fproblems\u002Fsuggestions of people implementing the code and you might find a lot of answered questions there already! \n\n### Github Issues & Pull requests\n\nPlease do not hesitate to leave an issue if you have problems\u002Fadvices\u002Fsuggestions regarding the code!\n\nPull requests are welcome, but let's first discuss them in [community forum](https:\u002F\u002Fcommunity.simplefoc.com)!\n\nIf you'd like to contribute to this project but you are not very familiar with github, don't worry, let us know either by posting at the community forum , by posting a github issue or at our discord server.\n\nIf you are familiar, we accept pull requests to the dev branch!\n\n## Arduino code example\nThis is a simple Arduino code example implementing the velocity control program of a BLDC motor with encoder. \n\nNOTE: This program uses all the default control parameters.\n\n```cpp\n#include \u003CSimpleFOC.h>\n\n\u002F\u002F  BLDCMotor( pole_pairs )\nBLDCMotor motor = BLDCMotor(11);\n\u002F\u002F  BLDCDriver( pin_pwmA, pin_pwmB, pin_pwmC, enable (optional) )\nBLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11, 8);\n\u002F\u002F  Encoder(pin_A, pin_B, CPR)\nEncoder encoder = Encoder(2, 3, 2048);\n\u002F\u002F channel A and B callbacks\nvoid doA(){encoder.handleA();}\nvoid doB(){encoder.handleB();}\n\n\nvoid setup() {  \n  \u002F\u002F initialize encoder hardware\n  encoder.init();\n  \u002F\u002F hardware interrupt enable\n  encoder.enableInterrupts(doA, doB);\n  \u002F\u002F link the motor to the sensor\n  motor.linkSensor(&encoder);\n  \n  \u002F\u002F power supply voltage [V]\n  driver.voltage_power_supply = 12;\n  \u002F\u002F initialise driver hardware\n  driver.init();\n  \u002F\u002F link driver\n  motor.linkDriver(&driver);\n\n  \u002F\u002F set control loop type to be used\n  motor.controller = MotionControlType::velocity;\n  \u002F\u002F initialize motor\n  motor.init();\n  \n  \u002F\u002F align encoder and start FOC\n  motor.initFOC();\n}\n\nvoid loop() {\n  \u002F\u002F FOC algorithm function\n  motor.loopFOC();\n\n  \u002F\u002F velocity control loop function\n  \u002F\u002F setting the target velocity or 2rad\u002Fs\n  motor.move(2);\n}\n```\nYou can find more details in the [SimpleFOC documentation](https:\u002F\u002Fdocs.simplefoc.com\u002F).\n\n## Example projects\nHere are some of the *Simple**FOC**library* and *Simple**FOC**Shield* application examples. \n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FIh-izQyXJCI\">\n\u003Cimg src=\"https:\u002F\u002Fdocs.simplefoc.com\u002Fextras\u002FImages\u002Fyoutube_pendulum.png\"  height=\"200px\" >\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FxTlv1rPEqv4\">\n\u003Cimg src=\"https:\u002F\u002Fdocs.simplefoc.com\u002Fextras\u002FImages\u002Fyoutube_haptic.png\"  height=\"200px\" >\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FRI4nNMF608I\">\n\u003Cimg src=\"https:\u002F\u002Fdocs.simplefoc.com\u002Fextras\u002FImages\u002Fyoutube_drv8302.png\"  height=\"200px\" >\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fyoutu.be\u002Fzcb86TRxTxc\">\n\u003Cimg src=\"https:\u002F\u002Fdocs.simplefoc.com\u002Fextras\u002FImages\u002Fyoutube_stepper.png\"  height=\"200px\" >\n\u003C\u002Fa>\n\u003C\u002Fp>\n\n\n## Citing the *SimpleFOC* \n\nWe are very happy that *Simple**FOC**library* has been used as a component of several research project and has made its way to several scientific papers.  We are hoping that this trend is going to continue as the project matures and becomes more robust! \nA short resume paper about *Simple**FOC*** has been published in the Journal of Open Source Software: \n\u003Cp>\n  \u003Cb>\u003Ci>SimpleFOC\u003C\u002Fi>\u003C\u002Fb>: A Field Oriented Control (FOC) Library for Controlling Brushless Direct Current (BLDC) and Stepper Motors.\u003Cbr>\n  A. Skuric, HS. Bank, R. Unger, O. Williams, D. González-Reyes\u003Cbr>\nJournal of Open Source Software, 7(74), 4232, https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.04232\n\u003C\u002Fp>\n\nIf you are interested in citing  *Simple**FOC**library* or some other component of *Simple**FOC**project* in your research, we suggest you to cite our paper:\n\n```bib\n@article{simplefoc2022,\n  doi = {10.21105\u002Fjoss.04232},\n  url = {https:\u002F\u002Fdoi.org\u002F10.21105\u002Fjoss.04232},\n  year = {2022},\n  publisher = {The Open Journal},\n  volume = {7},\n  number = {74},\n  pages = {4232},\n  author = {Antun Skuric and Hasan Sinan Bank and Richard Unger and Owen Williams and David González-Reyes},\n  title = {SimpleFOC: A Field Oriented Control (FOC) Library for Controlling Brushless Direct Current (BLDC) and Stepper Motors},\n  journal = {Journal of Open Source Software}\n}\n\n```\n","SimpleFOClibrary 是一个基于 Arduino IDE 和 PlatformIO 的跨平台无刷直流电机（BLDC）和步进电机的磁场定向控制（FOC）算法库。该项目采用C++语言编写，支持多种硬件平台如AVR、STM32、ESP32等，并提供丰富的功能以简化FOC算法的实现，包括但不限于编码器支持、低成本矢量控制解决方案。它特别适合于需要高性能但预算有限的应用场景，例如机器人技术、无人机以及各种自动化设备中对电机进行精确控制的情况。此外，该库还具有良好的社区支持与持续更新维护的特点。",2,"2026-06-11 03:58:20","trending"]