From d2dad065ff7e5c8c766a9a212dc69606f1f6de4d Mon Sep 17 00:00:00 2001 From: uname Date: Thu, 30 Oct 2025 14:53:08 -0600 Subject: [PATCH] Fixed several spelling errors. --- .vscode/settings.json | 9 ++++ docs/boards/index.md | 12 ++--- .../getting_started/connecting/mini_v1.md | 4 +- .../getting_started/connecting/mini_v11.md | 2 +- docs/boards/simplefoc_mini/index.md | 2 +- .../boards/simplefoc_mini/mini_fabrication.md | 2 +- .../simplefoc_shield/fabrication/index.md | 2 +- .../fabrication/shield_fabrication_v1.md | 2 +- .../fabrication/shield_fabrication_v2.md | 4 +- .../fabrication/shield_fabrication_v3.md | 2 +- .../getting_started/connections.md | 2 +- .../getting_started/soldering_pads/pads_v1.md | 2 +- docs/boards/simplefoc_shield/index.md | 2 +- .../libraries/drivers_library.md | 2 +- .../tools/simplefocstudio.md | 2 +- .../tools/webcontroller.md | 4 +- .../code/communication/commander/index.md | 10 ++--- .../code/communication/commander/motor.md | 8 ++-- .../code/communication/step_dir.md | 8 ++-- .../code/current_sense/high_side.md | 2 +- .../code/current_sense/index.md | 6 +-- .../code/current_sense/inline.md | 18 ++++---- .../code/current_sense/low_side.md | 44 +++++++++---------- docs/simplefoc_library/code/debug.md | 10 ++--- .../drivers/bldc_driver/bldc_driver_3pwm.md | 8 ++-- .../drivers/bldc_driver/bldc_driver_6pwm.md | 14 +++--- .../stepper_driver/stepper_driver_2pwm.md | 2 +- .../stepper_driver/stepper_driver_4pwm.md | 2 +- docs/simplefoc_library/code/from_scratch.md | 28 ++++++------ docs/simplefoc_library/code/index.md | 22 +++++----- docs/simplefoc_library/code/monitoring.md | 4 +- .../torque_control/voltage.md | 4 +- .../open_loop/angle_openloop.md | 2 +- .../code/motion_control/open_loop/index.md | 4 +- .../open_loop/velocity_openloop.md | 2 +- .../code/motors/bldc_motors.md | 26 +++++------ .../code/motors/stepper_motors.md | 12 ++--- .../simplefoc_library/code/sensors/generic.md | 12 ++--- .../magnetic/magnetic_sensor_analog.md | 4 +- .../sensors/magnetic/magnetic_sensor_pwm.md | 8 ++-- .../sensors/magnetic/magnetic_sensor_spi.md | 2 +- .../libray_source/communication.md | 2 +- .../digging_deeper/libray_source/index.md | 20 ++++----- .../libray_source/motiron_control.md | 8 ++-- .../digging_deeper/libray_source/sensors.md | 2 +- .../digging_deeper/theory/cs_align.md | 6 +-- .../digging_deeper/theory/init.md | 2 +- docs/simplefoc_library/examples/drv8302.md | 6 +-- .../examples/foc_pendulum.md | 6 +-- docs/simplefoc_library/examples/haptics.md | 18 ++++---- .../examples/position_control_example.md | 2 +- .../examples/position_control_example_mini.md | 4 +- .../position_control_example_mini_nucleo.md | 4 +- .../position_control_example_nucleo.md | 2 +- .../examples/sensorless_example_nucleo.md | 6 +-- .../examples/stepper_control_nucleo.md | 6 +-- .../examples/stepper_control_shield.md | 6 +-- .../hardware/drivers/BLDC_drivers.md | 2 +- .../hardware/drivers/stepper_drivers.md | 2 +- .../hardware/mcus/arduinos.md | 8 ++-- docs/simplefoc_library/hardware/mcus/esp32.md | 2 +- .../hardware/mcus/rpi_pico.md | 4 +- docs/simplefoc_library/hardware/mcus/stm32.md | 2 +- docs/simplefoc_library/hardware/sensors.md | 2 +- .../hardware/setup_examples/arduino_l6234.md | 2 +- docs/simplefoc_library/index.md | 2 +- .../practical/cheatsheet/build_flags.md | 2 +- .../practical/cheatsheet/index.md | 4 +- .../practical/cheatsheet/options.md | 8 ++-- .../practical/choosing_pins.md | 26 +++++------ .../practical/choosing_pins_adc.md | 4 +- docs/simplefoc_library/practical/index.md | 2 +- .../practical/real_time_loop.md | 12 ++--- docs/simplefoc_library/work_roadmap.md | 4 +- 74 files changed, 257 insertions(+), 248 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b6c3f24 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "cSpell.words": [ + "Adafruit", + "Aideepen", + "Aliexpress", + "Atmega", + "autoplay" + ] +} \ No newline at end of file diff --git a/docs/boards/index.md b/docs/boards/index.md index 7aafcd1..f304ce6 100644 --- a/docs/boards/index.md +++ b/docs/boards/index.md @@ -32,7 +32,7 @@ In addition to the official boards, there are many other boards compatible with ## Boards in the Shield form factor -These boards are designed to be compatible with the Arduino UNO R3 headers, enabling an easy to start experience with the SimpleFOClibrary and the Arduino IDE. The boards can be used with any board with the standard Arduino headers, such as the Arduino MEGA, STM32 Nucleo boards, Adafruit Metro, ESP32 D1 R3, Arudino UNO R4 and many others. This format enables usesr to easily exchange the microcontrollers and find the best solution for their application. The boards are fully open-source and the fabrication files are available in the respective repositories, as well as detailed guides on how to fabricate the boards yourself. The boards are additionally available in the [shop](https://www.simplefoc.com/shop) for those who prefer to buy them, as well as on other mainstream platforms like Aliexpress and Ebay (no relation to the SimpleFOCproject). +These boards are designed to be compatible with the Arduino UNO R3 headers, enabling an easy to start experience with the SimpleFOClibrary and the Arduino IDE. The boards can be used with any board with the standard Arduino headers, such as the Arduino MEGA, STM32 Nucleo boards, Adafruit Metro, ESP32 D1 R3, Arduino UNO R4 and many others. This format enables users to easily exchange the microcontrollers and find the best solution for their application. The boards are fully open-source and the fabrication files are available in the respective repositories, as well as detailed guides on how to fabricate the boards yourself. The boards are additionally available in the [shop](https://www.simplefoc.com/shop) for those who prefer to buy them, as well as on other mainstream platforms like Aliexpress and Ebay (no relation to the SimpleFOCproject). ### SimpleFOCShield v3.2 - [Find out more](arduino_simplefoc_shield_showcase) @@ -86,26 +86,26 @@ A powerful arduino shield for running BLDC motors using the FOC algorithm. This

⚠️ BEWARE: BTN8982/IFX007T performance issues

-BTN8982 and IFX007T drivers have been designed for DC motors and are based on old H-bridge technology. They have very long mosfet rise time (multiple microseconds) which in many cases presents a considerable part of the PWM duty cycle. When runnig the BLDC motors, precise PWM duty cycle setting is crutial for smooth and efficient operation. Therefore these drivers will not be able to provide very smooth operation on high frequency PWM (above 15kHz). Read more about it in the community thread: [link](https://community.simplefoc.com/t/simplefoc-powershield/582).
+BTN8982 and IFX007T drivers have been designed for DC motors and are based on old H-bridge technology. They have very long mosfet rise time (multiple microseconds) which in many cases presents a considerable part of the PWM duty cycle. When running the BLDC motors, precise PWM duty cycle setting is crucial for smooth and efficient operation. Therefore these drivers will not be able to provide very smooth operation on high frequency PWM (above 15kHz). Read more about it in the community thread: [link](https://community.simplefoc.com/t/simplefoc-powershield/582).
This performance constraint is the main reason why the SimpleFOC PowerShield project has for now been put on hold, and although these boards are available through Aliexpress and some other platforms, they will not be available through simplefoc.com.

-This does not mean that the board itself is not functional or that it will not work in your project though. It is still one of the cheepest (simplest) solutions out there for mid to high power BLDC control and with proper tuning of control loops you will still be able to get some good results with it. +This does not mean that the board itself is not functional or that it will not work in your project though. It is still one of the cheapest (simplest) solutions out there for mid to high power BLDC control and with proper tuning of control loops you will still be able to get some good results with it.
### Features {: .no_toc } - **Plug & play**: In combination with Arduino SimpleFOClibrary -- **Low-cost**: Fabrication price under €25/pcs - **⚠️ will not be sold by silplefoc.com** +- **Low-cost**: Fabrication price under €25/pcs - **⚠️ will not be sold by simplefoc.com** - **High-side current sensing**: - not yet supported by *Simple**FOC**library* - **In-line current sensing**: - supported by *Simple**FOC**library* - **Max power <500W**: max current 30A, power-supply 24V -- **Arduino headers**: Arduino UNO, Arduino MEGA, STM32 Nucleo boards, Aruidno DUE... +- **Arduino headers**: Arduino UNO, Arduino MEGA, STM32 Nucleo boards, Arduino DUE... - **Small size**: 53mm x 60mm - **Encoder/Hall sensors interface**: Integrated 3.3kΩ pullups (configurable) - **Open Source**: - Fully available fabrication files - - If never done it before, see a similar guide for *Simple**FOC**Shueld*: [how to make it yourself](https://docs.simplefoc.com/arduino_simplefoc_shield_fabrication) + - If never done it before, see a similar guide for *Simple**FOC**shield*: [how to make it yourself](https://docs.simplefoc.com/arduino_simplefoc_shield_fabrication) - Altium project - 3d model - schematics diff --git a/docs/boards/simplefoc_mini/getting_started/connecting/mini_v1.md b/docs/boards/simplefoc_mini/getting_started/connecting/mini_v1.md index 68c33f2..3d2fc3f 100644 --- a/docs/boards/simplefoc_mini/getting_started/connecting/mini_v1.md +++ b/docs/boards/simplefoc_mini/getting_started/connecting/mini_v1.md @@ -43,7 +43,7 @@ EN | Driver Enable Version v1.1 of the SimpleFOCMini has the order of the IN1,IN2,IN3 and EN changed with respect to the v1.0. -These pins need to ba connected whenever using the SimpleFOCMini. The 3 pwm pins and the enable pin are used to control the DRV8313 driver and in terms of the SimpleFOClibrary they correspond to the entries of the `BLDCDriver3PWM` class. The common ground pin is very important as well in order to make sure that all the PWM and Enable pins are read properly by the driver chip. Once you decide which pins you will be using for `INx` and `EN` pins you will be able to porvide them to the `BLDCDriver3PWM` class in your Arduino sketch. +These pins need to ba connected whenever using the SimpleFOCMini. The 3 pwm pins and the enable pin are used to control the DRV8313 driver and in terms of the SimpleFOClibrary they correspond to the entries of the `BLDCDriver3PWM` class. The common ground pin is very important as well in order to make sure that all the PWM and Enable pins are read properly by the driver chip. Once you decide which pins you will be using for `INx` and `EN` pins you will be able to provide them to the `BLDCDriver3PWM` class in your Arduino sketch. ```cpp BLDCDriver3PWM driver = BLDCDriver3PWM(IN1, IN2, IN3, EN); @@ -64,7 +64,7 @@ nFT | Fault output (active LOW) DRV8313 comes with the 3.3V voltage regulator and it is connected to the SimpleFOCMini's 3.3V pin. However it has a limitation of 10mA, which is in general not enough to power a microcontroller. But it might be enough to power a LED light or some position sensors. -Pin `nFT` (fault) is an active LOW output of the SimpleFOCMini which can be read to verify if the DRV8313 driver is working properly. If this pin is in LOW it means the DRV8313 is its fault state and it cannot drive the motor. Then the pin `nRT` (reset), which is also active LOW, can be used to reset the DRV8313 driver to reinitialise its internal state and exit the fault state, this cannot be done by simply toggling the enable pin. Finally the pin `nSP` (sleep) is an active LOW pin that puts the DRV8313 in the low-power sleep mode, consuming the current of under 1uA. +Pin `nFT` (fault) is an active LOW output of the SimpleFOCMini which can be read to verify if the DRV8313 driver is working properly. If this pin is in LOW it means the DRV8313 is its fault state and it cannot drive the motor. Then the pin `nRT` (reset), which is also active LOW, can be used to reset the DRV8313 driver to reinitialize its internal state and exit the fault state, this cannot be done by simply toggling the enable pin. Finally the pin `nSP` (sleep) is an active LOW pin that puts the DRV8313 in the low-power sleep mode, consuming the current of under 1uA. diff --git a/docs/boards/simplefoc_mini/getting_started/connecting/mini_v11.md b/docs/boards/simplefoc_mini/getting_started/connecting/mini_v11.md index 9596b5d..3836400 100644 --- a/docs/boards/simplefoc_mini/getting_started/connecting/mini_v11.md +++ b/docs/boards/simplefoc_mini/getting_started/connecting/mini_v11.md @@ -63,7 +63,7 @@ nFT | Fault output (active LOW) DRV8313 comes with the 3.3V voltage regulator and it is connected to the SimpleFOCMini's 3.3V pin. However it has a limitation of 10mA, which is in general not enough to power a microcontroller. But it might be enough to power a LED light or some position sensors. -Pin `nFT` (fault) is an active LOW output of the SimpleFOCMini which can be read to verify if the DRV8313 driver is working properly. If this pin is in LOW it means the DRV8313 is its fault state and it cannot drive the motor. Then the pin `nRT` (reset), which is also active LOW, can be used to reset the DRV8313 driver to reinitialise its internal state and exit the fault state, this cannot be done by simply toggling the enable pin. Finally the pin `nSP` (sleep) is an active LOW pin that puts the DRV8313 in the low-power sleep mode, consuming the current of under 1uA. +Pin `nFT` (fault) is an active LOW output of the SimpleFOCMini which can be read to verify if the DRV8313 driver is working properly. If this pin is in LOW it means the DRV8313 is its fault state and it cannot drive the motor. Then the pin `nRT` (reset), which is also active LOW, can be used to reset the DRV8313 driver to reinitialize its internal state and exit the fault state, this cannot be done by simply toggling the enable pin. Finally the pin `nSP` (sleep) is an active LOW pin that puts the DRV8313 in the low-power sleep mode, consuming the current of under 1uA. diff --git a/docs/boards/simplefoc_mini/index.md b/docs/boards/simplefoc_mini/index.md index ede9955..d3efbea 100644 --- a/docs/boards/simplefoc_mini/index.md +++ b/docs/boards/simplefoc_mini/index.md @@ -88,7 +88,7 @@ This project can be entirely done by using the Simple -This video demonstrates SimpleFOCShield support for stacking with Arudino UNO and STM32 Nucleo-64 board. As well as support for different sensors magnetic and encoders with relatively large precision span. +This video demonstrates SimpleFOCShield support for stacking with Arduino UNO and STM32 Nucleo-64 board. As well as support for different sensors magnetic and encoders with relatively large precision span. The control algorithms implemented in this project are : - **Steer by wire** (force feedback): two motors with virtually coupled positions diff --git a/docs/boards/simplefoc_mini/mini_fabrication.md b/docs/boards/simplefoc_mini/mini_fabrication.md index c34cf82..aaeb37d 100644 --- a/docs/boards/simplefoc_mini/mini_fabrication.md +++ b/docs/boards/simplefoc_mini/mini_fabrication.md @@ -33,7 +33,7 @@ The BOM and CPL files should be loaded automatically so then you should be able

In the next window you will see all the components that are shown in the BOM (Bill of materials), here I'd suggest you do uncheck the two through hole female header components H1 and P1. And everything else should be fine, you can click ***Next***.

-And that is it, the last window will show your purchase summary and show you the visualisation of the board. The only thing left to do is to save it to teh cart and go through the payment and shipping information. +And that is it, the last window will show your purchase summary and show you the visualization of the board. The only thing left to do is to save it to teh cart and go through the payment and shipping information.

diff --git a/docs/boards/simplefoc_shield/fabrication/index.md b/docs/boards/simplefoc_shield/fabrication/index.md index 678f230..9f7670b 100644 --- a/docs/boards/simplefoc_shield/fabrication/index.md +++ b/docs/boards/simplefoc_shield/fabrication/index.md @@ -41,7 +41,7 @@ To check the release timeline, click [here](https://github.com/simplefoc/Arduino Version |link | Release date | Comment ----- | ----- | ---- | ---- -*Simple**FOC**Shield* **v1.3** |[release v1.3](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3) | 04/20 | Inital release +*Simple**FOC**Shield* **v1.3** |[release v1.3](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3) | 04/20 | initial release *Simple**FOC**Shield* v1.3.1 | [release v1.3.1](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3.1) | 07/20 | added Nucleo stacking support *Simple**FOC**Shield* v1.3.2 |[release v1.3.2](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3.2) | 09/20 | added I2C pullups *Simple**FOC**Shield* v1.3.3 |[release v1.3.3](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3.3) | 12/20 | adapted L6234 circuit + full Arduino header diff --git a/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v1.md b/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v1.md index 84e4e95..75d8c00 100644 --- a/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v1.md +++ b/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v1.md @@ -23,7 +23,7 @@ To check the release timeline, click [here](https://github.com/simplefoc/Arduino Version | link | Release date | Comment ----- | ----- | ---- | ---- -*Simple**FOC**Shield* v1.3 |[release v1.3](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3) | 04/20 | Inital release +*Simple**FOC**Shield* v1.3 |[release v1.3](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3) | 04/20 | initial release *Simple**FOC**Shield* v1.3.1 | [release v1.3.1](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3.1) | 07/20 | added Nucleo stacking support *Simple**FOC**Shield* v1.3.2 |[release v1.3.2](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3.2) | 09/20 | added I2C pullups *Simple**FOC**Shield* v1.3.3 |[release v1.3.3](https://github.com/simplefoc/Arduino-SimpleFOCShield/releases/tag/v1.3.3) | 12/20 | adapted L6234 circuit + full Arduino header diff --git a/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v2.md b/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v2.md index d0cb015..2e80721 100644 --- a/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v2.md +++ b/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v2.md @@ -48,7 +48,7 @@ The price of the fabrication will highly depend of the number of boards and the But in most of cases it will always boil down to the price :) ## PCB fabrication + Self assembly -Even though most of the components are big smd components and the board is intentionally made to me solderable by hand the curent sense amplifiers are going to be a bit more difficult. But if you are interested in this way of producing this board here is a quick guide how to make it. +Even though most of the components are big smd components and the board is intentionally made to me solderable by hand the current sense amplifiers are going to be a bit more difficult. But if you are interested in this way of producing this board here is a quick guide how to make it. ### PCB fabrication Download the [ gerber files](https://github.com/simplefoc/Arduino-SimpleFOCShield) and provide them to your PCB manufacturer of choice. So far I have used [seeedstrudio](https://www.seeedstudio.com/) and [JLCPCB](https://jlcpcb.com/). The price of 10 PCBs is around 5\$ but the shipping was around 20\$. @@ -165,7 +165,7 @@ Here is a complete list of all the components you will need to make the board: C1206C104M5RECAUTO - Curent sense circuit + current sense circuit CBY1 diff --git a/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v3.md b/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v3.md index 1d3bafe..8ea4ac8 100644 --- a/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v3.md +++ b/docs/boards/simplefoc_shield/fabrication/shield_fabrication_v3.md @@ -57,7 +57,7 @@ In general there are two main ways to fabricate the board: ## PCB fabrication + Self assembly -The version v3 of the shiled does not longer use big SMD components as the versions v1 nad v2 did. So this version is a bit more demanding to self fabricate as all the resistors, capacitors and diods have 0603 footprint (as oposed to 1206 for v1 and v2). However, if you are interested in this way of producing this board here is a quick guide how to make it. +The version v3 of the shield does not longer use big SMD components as the versions v1 nad v2 did. So this version is a bit more demanding to self fabricate as all the resistors, capacitors and diodes have 0603 footprint (as opposed to 1206 for v1 and v2). However, if you are interested in this way of producing this board here is a quick guide how to make it. ### PCB fabrication Download the [ gerber files](https://github.com/simplefoc/Arduino-SimpleFOCShield) and provide them to your PCB manufacturer of choice. So far I have used [seeedstrudio](https://www.seeedstudio.com/) and [JLCPCB](https://jlcpcb.com/). The price of 10 PCBs is around 5\$ but the shipping was around 20\$. diff --git a/docs/boards/simplefoc_shield/getting_started/connections.md b/docs/boards/simplefoc_shield/getting_started/connections.md index cf4141e..f8eb29e 100644 --- a/docs/boards/simplefoc_shield/getting_started/connections.md +++ b/docs/boards/simplefoc_shield/getting_started/connections.md @@ -19,7 +19,7 @@ toc: true Connecting the Arduino SimpleFOCShield to the microcontroller, BLDC motor, power-supply and the sensors is very straight forward. ## Microcontroller -- Arduino SimpleFOCShield is designed to be easily stackable on all the devices featuring arduino headers, such as: [Arudino UNO](arduino_simplefoc_shield), Arudino MEGA, [Stm32 Nucleo](nucleo_connection) and similar. +- Arduino SimpleFOCShield is designed to be easily stackable on all the devices featuring arduino headers, such as: [Arduino UNO](arduino_simplefoc_shield), Arduino MEGA, [Stm32 Nucleo](nucleo_connection) and similar. - Bit it can also be used as a standalone BLDC driver as shown in combination with [Stm32 Bluepill](bluepill_connection). ## BLDC motor diff --git a/docs/boards/simplefoc_shield/getting_started/soldering_pads/pads_v1.md b/docs/boards/simplefoc_shield/getting_started/soldering_pads/pads_v1.md index cf36b15..560d791 100644 --- a/docs/boards/simplefoc_shield/getting_started/soldering_pads/pads_v1.md +++ b/docs/boards/simplefoc_shield/getting_started/soldering_pads/pads_v1.md @@ -127,4 +127,4 @@ BLDCDriver3PWM driver1 = BLDCDriver3PWM(9, 10, 6, 8); BLDCDriver3PWM driver2 = BLDCDriver3PWM(3, 5, 13, 7); ``` -

Pin 13 or pin 11

We advise you to try first with the pin 13 configured and then with pin 11 if this does not work. Tested boards are Nucleo-F401RE - pin 13 works / pin 11 doesn't and Nucleo-F466RE pin 11 works/ pin 13 doesnt.
\ No newline at end of file +

Pin 13 or pin 11

We advise you to try first with the pin 13 configured and then with pin 11 if this does not work. Tested boards are Nucleo-F401RE - pin 13 works / pin 11 doesn't and Nucleo-F466RE pin 11 works/ pin 13 doesn't.
\ No newline at end of file diff --git a/docs/boards/simplefoc_shield/index.md b/docs/boards/simplefoc_shield/index.md index 93ecfa3..146eabe 100644 --- a/docs/boards/simplefoc_shield/index.md +++ b/docs/boards/simplefoc_shield/index.md @@ -97,7 +97,7 @@ For full documentation of necessary components, design choices and the code plea ## Project example : Steer by wire - bidirectional haptic control examples -This video demonstrates SimpleFOCShield support for stacking with Arudino UNO and STM32 Nucleo-64 board. As well as support for different sensors magnetic and encoders with relatively large precision span. +This video demonstrates SimpleFOCShield support for stacking with Arduino UNO and STM32 Nucleo-64 board. As well as support for different sensors magnetic and encoders with relatively large precision span. The control algorithms implemented in this project are : - **Steer by wire** (force feedback): two motors with virtually coupled positions diff --git a/docs/simplefoc_libraries/libraries/drivers_library.md b/docs/simplefoc_libraries/libraries/drivers_library.md index 5f31097..75a00ee 100644 --- a/docs/simplefoc_libraries/libraries/drivers_library.md +++ b/docs/simplefoc_libraries/libraries/drivers_library.md @@ -44,7 +44,7 @@ It is steadily growing, but at the moment we have: - The drivers in the drivers repo enable functionality for components that don't work with the standard core library. For example, the TLE5012B sensor is not supported by the generic MagneticSensorSPI class, but there is a specific driver for it in the drivers repository. -- The drivers in the drivers repo may have extended functionality. So for example while the AS5048A sensor is supported by the generic MagneticSensorSPI class, the specific driver for it allows querying its other registers, allows detecting sensor erros, and is easier to use because it has the correct settings "embedded". +- The drivers in the drivers repo may have extended functionality. So for example while the AS5048A sensor is supported by the generic MagneticSensorSPI class, the specific driver for it allows querying its other registers, allows detecting sensor errors, and is easier to use because it has the correct settings "embedded". - Using the comms drivers provided as a starting point not only gets you off to a quick start, but also makes it more likely your solutions will be interoperable with those of others (or at least easy to adapt). diff --git a/docs/simplefoc_libraries/tools/simplefocstudio.md b/docs/simplefoc_libraries/tools/simplefocstudio.md index 08a27a2..91081d7 100644 --- a/docs/simplefoc_libraries/tools/simplefocstudio.md +++ b/docs/simplefoc_libraries/tools/simplefocstudio.md @@ -81,7 +81,7 @@ Once you have your application running add a device by clicking the Arudino button in the toolbar. +- Click on the Arduino button in the toolbar. - Choose which sets of parameters you wish to generate the code for and click OK - In the new tab you will have a code of your tuned parameters. diff --git a/docs/simplefoc_libraries/tools/webcontroller.md b/docs/simplefoc_libraries/tools/webcontroller.md index 5769488..d41ae52 100644 --- a/docs/simplefoc_libraries/tools/webcontroller.md +++ b/docs/simplefoc_libraries/tools/webcontroller.md @@ -14,7 +14,7 @@ toc: true This is a controller interface for the SimpleFOClibrary. It uses WebSerial to communicate with a suitable micro-controller using serial port communications and the [Commander](commander_interface) interface. Most of the code for this application was provided by [@geekuillaume](https://github.com/geekuillaume), his github repository can be found [here](https://github.com/geekuillaume/simplefoc-webcontroller) and his application can be found [here](https://simplefoc.besson.co/). -Our app is a fork of his code, that has been further extended to support more devices and configuration parameters, as well as to ease the monitoring visualisation. +Our app is a fork of his code, that has been further extended to support more devices and configuration parameters, as well as to ease the monitoring visualization. Github repo Open SimpleFOCwebcontroller @@ -41,7 +41,7 @@ This project is still in its early stage, we are counting on your patience and l *Simple**FOC**WebController* does not require any installation, its only requirement is that your browser has `WebSerial` support. Check the supportedd browsers [here](https://caniuse.com/web-serial). ### Motion control tunning blocks -Once you have your application running in your browser, connected to your microcontroller running the SimpleFOClibrary. You can easily change most of the control parameters of different motion control loops and visualise different monitored variables. +Once you have your application running in your browser, connected to your microcontroller running the SimpleFOClibrary. You can easily change most of the control parameters of different motion control loops and visualize different monitored variables. diff --git a/docs/simplefoc_library/code/communication/commander/index.md b/docs/simplefoc_library/code/communication/commander/index.md index b1e8f20..127f6bc 100644 --- a/docs/simplefoc_library/code/communication/commander/index.md +++ b/docs/simplefoc_library/code/communication/commander/index.md @@ -46,7 +46,7 @@ When the commander received the string: -It first checks the command id, identifies its `M` and sends the remaining string to the motor handling callback. Then the motor callback checks what is the coommand id, finds `V` and sends the remaining string to the PID velocity callbacK. Then the PID velocity callback scans the command id and finds it is the `D`, so derivative gain and sets the value. +It first checks the command id, identifies its `M` and sends the remaining string to the motor handling callback. Then the motor callback checks what is the command id, finds `V` and sends the remaining string to the PID velocity callbacK. Then the PID velocity callback scans the command id and finds it is the `D`, so derivative gain and sets the value. Commander | Motor callback (cmd id `M` ) | PID callback (cmd id `V` ) --- | ---| --- @@ -69,7 +69,7 @@ Command interface is implemented in the `Commander` class. // Commander interface constructor // - serial - optionally receives HardwareSerial/Stream instance // - eol - optionally receives eol character - by default it is the newline: "\n" -// - echo - option echo last typed character (for command line feedback) - defualt false +// - echo - option echo last typed character (for command line feedback) - default false Commander commander = Commander(Serial, "\n", false); ``` The end of line (eol) character is an optional input of the `Commander` class which represents end of command character. User can define its own end of command characters here, but by default the character used is newline character `\n`. For example i @@ -264,16 +264,16 @@ Commander provides a very simple way to extend the command list and implement ne - [Custom commands](commander_custom) - create your own callbacks -## Commander with Serial Monitor in Arudino IDE +## Commander with Serial Monitor in Arduino IDE Once the commander interface is added to the code you will be able to communicate to it using the Serial Monitor of the Arduino IDE -Commander paramters in the serial monitor are the same as for every other Arduino code working with the `Serial`. +Commander parameters in the serial monitor are the same as for every other Arduino code working with the `Serial`. Make sure to: -- Set the baudrate number the same as in the `ino` file : for examle if in the `ino` file you have `Serial.begin(115200)`, the baud rate should be `115200` +- Set the baudrate number the same as in the `ino` file : for example if in the `ino` file you have `Serial.begin(115200)`, the baud rate should be `115200` - Make sure to set the termination character to `newline` ## *Simple**FOC**Studio* by [@JorgeMaker](https://github.com/JorgeMaker) diff --git a/docs/simplefoc_library/code/communication/commander/motor.md b/docs/simplefoc_library/code/communication/commander/motor.md index 05d75a0..35b1cf2 100644 --- a/docs/simplefoc_library/code/communication/commander/motor.md +++ b/docs/simplefoc_library/code/communication/commander/motor.md @@ -178,7 +178,7 @@ Finally once the motor is added to the commander interface the use will be able - **S** - set monitoring variables Using these commands you can change the downsampling rate (`motor.monitor_downsampling`) of the `monitor()` function that will determine your output sampling frequency. For example if your `loop` time is around 1ms, then with downsampling of monitor function with the rate of 100, it will output the motor variables each 100ms. -If monitor dowsampling is set to 0 the `monitor()` function is disabled. The same is true if the `motor.monitor_variables` bitmap is empty (equal to `0`). Therefore the command **C** effectively does: +If monitor downsampling is set to 0 the `monitor()` function is disabled. The same is true if the `motor.monitor_variables` bitmap is empty (equal to `0`). Therefore the command **C** effectively does: ```cpp // when command MC is called motor.monitor_variables = 0; @@ -262,12 +262,12 @@ void setup() { motor.useMonitoring(Serial); motor.monitor_downsample = 0; // initially disable real-time monitoring - // initialise motor + // initialize motor motor.init(); // align encoder and start FOC motor.initFOC(); - // set the inital target value + // set the initial target value motor.target = 2; // define the motor id @@ -284,7 +284,7 @@ void loop() { // iterative setting FOC phase voltage motor.loopFOC(); - // iterative function setting the outter loop target + // iterative function setting the outer loop target motor.move(); // monitoring diff --git a/docs/simplefoc_library/code/communication/step_dir.md b/docs/simplefoc_library/code/communication/step_dir.md index 36a6f22..a50e019 100644 --- a/docs/simplefoc_library/code/communication/step_dir.md +++ b/docs/simplefoc_library/code/communication/step_dir.md @@ -14,7 +14,7 @@ toc: true Step/direction communication is one of the most common communication interface for running stepper motors. It is very basic, it uses two digital signals, `step` and `direction`. `step` signal produces and short impulse which signals that the motor should do a step with predefined length and `direction` signal determines the direction of the movement (ex. `HIGH` forward, `LOW` backward). -As stated before this interface is particularly well suited for stepper motors because their motion is designed to be characterised by steps. But this interface can be used in many different ways that have nothing to do with stepper motors. In general step/dir interface can be described as a counter where `direction` signal determines the counting direction and `step` provides the impulses to be counted: +As stated before this interface is particularly well suited for stepper motors because their motion is designed to be characterized by steps. But this interface can be used in many different ways that have nothing to do with stepper motors. In general step/dir interface can be described as a counter where `direction` signal determines the counting direction and `step` provides the impulses to be counted: ```cpp // on rising edge of step signal if(direction == HIGH) counter++; @@ -34,7 +34,7 @@ In order to do this in a more concise manner SimpleSimpleFOC diff --git a/docs/simplefoc_library/code/current_sense/index.md b/docs/simplefoc_library/code/current_sense/index.md index 753e7da..b3c767f 100644 --- a/docs/simplefoc_library/code/current_sense/index.md +++ b/docs/simplefoc_library/code/current_sense/index.md @@ -24,9 +24,9 @@ up to this moment ( [check the releases ](https://githu Each one of the current sensing classes will implement all the necessary functionalities for simple and robust implementation of FOC algorithm: - Hardware config - - ADC resoluton and frequency + - ADC resolution and frequency - Automatic zero offset finding -- Driver synchronisation +- Driver synchronization - ADC acquisition events triggering - Adaptive alignment with driver phases - Reading the phase currents @@ -37,7 +37,7 @@ Each of the implemented classes can be used as stand-alone classes and they can In order for FOC algorithm to work the current sense classes are linked to a `BLDCMotor` class which uses the driver to read the FOC currents. ## 🎯 Our implementation goals -The current sense code will be written in a way to support as many different drivers out there as possible and in a way to be fully interchangeable. Due to the very hardware specific implementations of the ADC acquisition for different MCU architectures and due to very different driver/adc synchronisation requirements for different current sensing approaches this task is probably one of the most complex challenges for the SimpleFOClibrary so far. Therefore the work will be done in iterations and each release will better and better support. Please make sure to follow out github and [check the releases ](https://github.com/simplefoc/Arduino-FOC/releases). +The current sense code will be written in a way to support as many different drivers out there as possible and in a way to be fully interchangeable. Due to the very hardware specific implementations of the ADC acquisition for different MCU architectures and due to very different driver/adc synchronization requirements for different current sensing approaches this task is probably one of the most complex challenges for the SimpleFOClibrary so far. Therefore the work will be done in iterations and each release will better and better support. Please make sure to follow out github and [check the releases ](https://github.com/simplefoc/Arduino-FOC/releases). Also make sure to follow our [community forum](https://community.simplefoc.com), a lot of discussions is being held about current sensing and its applications! diff --git a/docs/simplefoc_library/code/current_sense/inline.md b/docs/simplefoc_library/code/current_sense/inline.md index 3d46754..a3b591f 100644 --- a/docs/simplefoc_library/code/current_sense/inline.md +++ b/docs/simplefoc_library/code/current_sense/inline.md @@ -170,9 +170,9 @@ current_sense.gain_b *= -1; -## Initialising the current sense +## initializing the current sense -Once the current sense has been created it can be initialised. This `init()` function configures the ADC hardware for reading and finds the zero offsets of the ADC for each channel. +Once the current sense has been created it can be initialized. This `init()` function configures the ADC hardware for reading and finds the zero offsets of the ADC for each channel. ```cpp // init current sense current_sense.init(); @@ -193,7 +193,7 @@ else{ return; } ``` -Once when your current sense has been intialised and calibrated you can start measuring the currents! +Once when your current sense has been initialized and calibrated you can start measuring the currents! ### Enable debugging output If you wish to see a more verbose debugging output of the current sense configuration during the `current_sense.init()` and see more details about the configuration and possible errors, you can use the `SimpleFOCDebug` class. @@ -257,12 +257,12 @@ void setup(){ ``` -Current sense will be using driver parameters for different synchronisation and calibration procedures. +Current sense will be using driver parameters for different synchronization and calibration procedures.

API change - SimpleFOClibrary v2.2.2

-Driver linking to the current sense is introduced from the library version v2.2.2 in order to propagate different hardware specific parameters in between ADC and PWM timers needed for advanced synchronisation for current sensing. +Driver linking to the current sense is introduced from the library version v2.2.2 in order to propagate different hardware specific parameters in between ADC and PWM timers needed for advanced synchronization for current sensing.
Once the driver is linked to the current sense, last step is to link the current sense with the `motor` you wish to use it with: @@ -294,7 +294,7 @@ void loop(){ motor.initFOC(); } ``` -Function `initFOC()` will make sure that the `driver` and `current_sense` classes are both aligned, it is very important that the phase `A` of the current sense is exactly the phase `A` of the driver etc. To verify this, the `initFOC` will be calling the current sense's funciton `current_sense.driverAlign(...)`. +Function `initFOC()` will make sure that the `driver` and `current_sense` classes are both aligned, it is very important that the phase `A` of the current sense is exactly the phase `A` of the driver etc. To verify this, the `initFOC` will be calling the current sense's function `current_sense.driverAlign(...)`. ### Alignment with the driver phases `driverAlign(...)` @@ -431,7 +431,7 @@ Sometimes the phase currents are hard to interpret, therefore this current sense float current_mag = current_sense.getDCCurrent(); ``` -Futhermore if you have an access to the position sensor of the motor connected to the driver you can get signed value of the DC current the motor is drawing by providing it to the `getDCCurrent` method. +Furthermore if you have an access to the position sensor of the motor connected to the driver you can get signed value of the DC current the motor is drawing by providing it to the `getDCCurrent` method. ```cpp float current = current_sense.getDCCurrent(motor_electrical_angle); ``` @@ -463,7 +463,7 @@ Here is a simple example of a inline current sense as a stand-alone sensor using InlineCurrentSense current_sense = InlineCurrentSense(0.01f, 50.0f, A0, A2); void setup() { - // initialise the current sensing + // initialize the current sensing current_sense.init(); // for SimpleFOCShield v2.01/v2.0.2 @@ -502,7 +502,7 @@ Here is a simple example of a inline current sense as a stand-alone sensor using InlineCurrentSense current_sense = InlineCurrentSense(185.0f, A0, A2); void setup() { - // initialise the current sensing + // initialize the current sensing current_sense.init(); Serial.begin(115200); diff --git a/docs/simplefoc_library/code/current_sense/low_side.md b/docs/simplefoc_library/code/current_sense/low_side.md index b35f327..ebd5c32 100644 --- a/docs/simplefoc_library/code/current_sense/low_side.md +++ b/docs/simplefoc_library/code/current_sense/low_side.md @@ -15,7 +15,7 @@ toc: true Low-side current sensing is probably the most common current sensing technique. The main reason why is because it does not require neither high-performance PWM rejection current sense amplifiers (as inline does) neither high-voltage supporting amplifiers (as high-side does). The shunt resistors are always placed in between low side mosfets and the ground making sure that the amplifiers always have very low voltages on their terminals. The main drawback of this approach is that, since the current passing through the shunt resistors is phase current only if the corresponding low side mosfet is ON, we can only measure it in those moments. The PWM frequency is usually 20 to 50 kHz, which means that the low-side mosfets turn on and off 20,000 to 50,000 times per second, therefore the synchronization in between PWM setting and ADC acquisition is very very important. -Low side current sensing for all the architectures is on our road-map and we are actively working on it. The main issue at the moment is very hardware specific synchronisation procedure of the PWM generation and ADC triggering. Therefore we are attacking one MCU architecture at the time. 😃 +Low side current sensing for all the architectures is on our road-map and we are actively working on it. The main issue at the moment is very hardware specific synchronization procedure of the PWM generation and ADC triggering. Therefore we are attacking one MCU architecture at the time. 😃 BLDC motors Stepper motors @@ -34,7 +34,7 @@ See the link

Using `LowsideCurrentSense` class with inline current sensing hardware

-In the SimpleFOClibrary the low-side current sensing is implemented in the `LowsideCurrentSense` class. This class is designed to work with the `BLDCDriver` and `StepperDriver` classes and it is used to measure the phase currents of the motor where the ADC conversions are synchoronised with the PWM generation of the driver. The `LowsideCurrentSense` class is impletmets this synchonisation, and even though it is primarily designed to be used with the low-side current sensing hardware, it can also be used with the inline current sensing hardware. And in some cases it is even suggested to use it with the inline current sensing hardware such as for stm32 architecture, as it has much better performance since it is using DMA for ADC conversions. +In the SimpleFOClibrary the low-side current sensing is implemented in the `LowsideCurrentSense` class. This class is designed to work with the `BLDCDriver` and `StepperDriver` classes and it is used to measure the phase currents of the motor where the ADC conversions are synchronized with the PWM generation of the driver. The `LowsideCurrentSense` class is impletmets this synchronization, and even though it is primarily designed to be used with the low-side current sensing hardware, it can also be used with the inline current sensing hardware. And in some cases it is even suggested to use it with the inline current sensing hardware such as for stm32 architecture, as it has much better performance since it is using DMA for ADC conversions. @@ -42,7 +42,7 @@ In the SimpleFOClibrary the Low side current sensing is currently supported for several MCU architectures supported by the SimpleFOClibrary. ESP32 architecture has the most generic support, supporting multiple motors per chip. Stm32 families f1, f4, l4, g4 and f7 are supported and support low-side sensing for only one motor. A special case of the STM32 board is the B-G431-ESC1 development kit which has very specific low-side implementation for its hardware configuration, and it is fully supported by the library. Samd21 architecture is under development, it has an initial support for only one motor, but for now as it has not been extensively tested, we suggest not to rely on our implementation. Teensy4 has an initial support for low-side sensing for one motor as well. -MCU | Low-side Current sensing | ADC conversion type | Max PWM freqeuncy | supported ADC +MCU | Low-side Current sensing | ADC conversion type | Max PWM frequency | supported ADC --- | --- | --- | --- | --- Arduino (8-bit) | ❌ | - | -| - Arduino DUE | ❌ | - | -| - @@ -60,20 +60,20 @@ ESP8266 | ❌ | -| -| - SAMD21 | ✔️/❌ (one motor, poorly tested) | Interrupts | ?| ? SAMD51 | ❌ | -| -| - Teensy3 | ❌| -| -| - -Teensy4 | ✔️ (inital)| Interrupts| ~20kHz| ADC1 +Teensy4 | ✔️ (initial)| Interrupts| ~20kHz| ADC1 Raspberry Pi Pico | ❌ | -| - Portenta H7 | ❌ | -| -| - Renesas (UNO R4) | ❌ (TBD) | -| -| - ### Important hardware considerations -Low-side current sensing requires very high synchronisation of the PWM generated by the `driver` and the ADC triggering. There are three main considerations to have in mind when choosing the MCU you wish to use and the driver you wish to use with the low-side current sensing: +Low-side current sensing requires very high synchronization of the PWM generated by the `driver` and the ADC triggering. There are three main considerations to have in mind when choosing the MCU you wish to use and the driver you wish to use with the low-side current sensing: 1. ADC conversion type - DMA or Interrupt based 2. PWM frequency considerations 3. Appropriate PWM and ADC pin considerations -See more info about driver paramers in the [driver docs](drivers_config)! +See more info about driver parameters in the [driver docs](drivers_config)! ### 1. ADC conversion type @@ -94,7 +94,7 @@ On the other hand, having higher PWM frequency will produce smoother operation,

RULE OF THUMB: PWM frequency

-The rule of thumb is to stay arround 20kHz. +The rule of thumb is to stay around 20kHz. driver.pwm_frequency = 20000; @@ -103,11 +103,11 @@ driver.pwm_frequency = 20000; ### 3. Appropriate PWM and ADC pin considerations -As ADC conversion has to be synchronised with the PWM generated on ALL the phases, it is important that all the PWM generated for all the phases have aligned PWM and that it supports triggering of the ADC conversion. Since the microcontrollers usually have more than one timer for PWM generation and more than one ADC for reading the analog values it is important to choose the right pins for the right phase. +As ADC conversion has to be synchronized with the PWM generated on ALL the phases, it is important that all the PWM generated for all the phases have aligned PWM and that it supports triggering of the ADC conversion. Since the microcontrollers usually have more than one timer for PWM generation and more than one ADC for reading the analog values it is important to choose the right pins for the right phase.

RULE OF THUMB: PWM timer and ADC pins

-In order to maximise your chances for the low-side current sensing to work well we suggest to make sure that the PWM pins chosen for your driver all belong to the same Timer, and the ADC pins chosen for your current sense all belong to the same ADC.
+In order to maximize your chances for the low-side current sensing to work well we suggest to make sure that the PWM pins chosen for your driver all belong to the same Timer, and the ADC pins chosen for your current sense all belong to the same ADC.
📢 Here is a quick guide to choosing appropriate PWM pins for different MCU architectures
see in docs.
📢 Here is a quick guide to choosing appropriate ADC pins for different MCU architectures see in docs.
@@ -233,7 +233,7 @@ current_sense.gain_b *= -1; -## Synchronising the current sense with the driver PWM +## synchronizing the current sense with the driver PWM @@ -242,15 +242,15 @@ Since the low-side current sensing technique requires triggering of the ADC acqu // link current sense and driver current_sense.linkDriver(&driver); ``` -Current sense will be using driver parameters for different synchronisation and calibration procedures. +Current sense will be using driver parameters for different synchronization and calibration procedures.

API change - SimpleFOClibrary v2.2.2

-Driver linking to the current sense is introduced from the library version v2.2.2 in order to propagate different hardware specific parameters in between ADC and PWM timers needed for advanced synchronisation for current sensing. +Driver linking to the current sense is introduced from the library version v2.2.2 in order to propagate different hardware specific parameters in between ADC and PWM timers needed for advanced synchronization for current sensing.
-## Initialising the current sense +## initializing the current sense -Once the current sense has been created and linked with the driver it can be initialised. This `init()` function configures the ADC hardware for reading and finds the zero offsets of the ADC for each channel. +Once the current sense has been created and linked with the driver it can be initialized. This `init()` function configures the ADC hardware for reading and finds the zero offsets of the ADC for each channel. ```cpp // init current sense current_sense.init(); @@ -272,7 +272,7 @@ else{ } ``` -When your current sense has been intialised and calibrated you can start measuring the currents! +When your current sense has been initialized and calibrated you can start measuring the currents! ### Enable debugging output @@ -336,12 +336,12 @@ void setup(){ ``` -Current sense will be using driver parameters for different synchronisation and calibration procedures. +Current sense will be using driver parameters for different synchronization and calibration procedures.

API change - SimpleFOClibrary v2.2.2

-Driver linking to the current sense is introduced from the library version v2.2.2 in order to propagate different hardware specific parameters in between ADC and PWM timers needed for advanced synchronisation for current sensing. +Driver linking to the current sense is introduced from the library version v2.2.2 in order to propagate different hardware specific parameters in between ADC and PWM timers needed for advanced synchronization for current sensing.
Once the driver is linked to the current sense, last step is to link the current sense with the `motor` you wish to use it with: @@ -376,7 +376,7 @@ void setup(){ motor.initFOC(); } ``` -Function `initFOC()` will make sure that the `BLDCDriver` and `LowsideCurrentSense` classes are both well aligned, it is very important that the phase `A` of the current sense is exactly the phase `A` of the driver, phase `B` of the current sense exactly pahse `B` of the driver and the same for the phase `C`. To verify this, the `initFOC` will be calling the current sense's function `current_sense.driverAlign(...)`. +Function `initFOC()` will make sure that the `BLDCDriver` and `LowsideCurrentSense` classes are both well aligned, it is very important that the phase `A` of the current sense is exactly the phase `A` of the driver, phase `B` of the current sense exactly phase `B` of the driver and the same for the phase `C`. To verify this, the `initFOC` will be calling the current sense's function `current_sense.driverAlign(...)`. ### Alignment with the motor phases `driverAlign(...)` @@ -452,7 +452,7 @@ See the full example for the Aliexpress DRB8302 based board in the library examp BLDC motors Stepper motors -Since the low-side current sense has to be synchornised with PWM of a driver of interest it does not make sense to use it as a stand-alone sensor. +Since the low-side current sense has to be synchronized with PWM of a driver of interest it does not make sense to use it as a stand-alone sensor. But once you have linked the current sense with the `driver` you can use it to read your phase currents, overall current magnitude and DQ currents. Reading the phase currents can be done by calling: @@ -485,7 +485,7 @@ Sometimes the phase currents are hard to interpret, therefore this current sense float current_mag = current_sense.getDCCurrent(); ``` -Futhermore if you have an access to the position sensor of the motor connected to the driver you can get signed value of the DC current the motor is drawing by providing it to the `getDCCurrent` method. +Furthermore if you have an access to the position sensor of the motor connected to the driver you can get signed value of the DC current the motor is drawing by providing it to the `getDCCurrent` method. ```cpp float current = current_sense.getDCCurrent(motor_electrical_angle); ``` @@ -535,7 +535,7 @@ void setup() { motor.init(); ... - // initialise the current sensing + // initialize the current sensing current_sense.init(); motor.linkCurrentSense(¤t_sense); @@ -589,7 +589,7 @@ void setup() { motor.init(); ... - // initialise the current sensing + // initialize the current sensing current_sense.init(); motor.linkCurrentSense(¤t_sense); diff --git a/docs/simplefoc_library/code/debug.md b/docs/simplefoc_library/code/debug.md index e83f2ae..e2ff36a 100644 --- a/docs/simplefoc_library/code/debug.md +++ b/docs/simplefoc_library/code/debug.md @@ -21,7 +21,7 @@ There are different techniques to help you find problems on the software side, b SimpleFOClibrary provides debug output using the `Serial` port which is enabled by adding the following line to your `setup` function. -Place this function call early in the `setup` function to see the debug output of the motor intialization, which can be important to help you find problems with your setup. +Place this function call early in the `setup` function to see the debug output of the motor initialization, which can be important to help you find problems with your setup. ```cpp @@ -107,7 +107,7 @@ Why have our own `SimpleFOCDebug`? Wny not just use `Serial.println`? When supporting many hardware platforms (as SimpleFOClibrary does), we can't make assumptions about the availability of the `Serial` object. While it is a pretty standard feature of Arduino framework, a given board may not support it, or may for whatever reasons have a different name for it. We also can't make assumptions about *which* `Serial` object you would want to use. Some MCUs support 6 or more Serial ports. -We also like the abstraction it provides, making it easier to port SimpleFOClibrary to other platforms/frameworks. In future we may abstract the debug output functionality one level further, allowing debug output via SPI, MQTT or other protocols. For this reason it is also good to have a seperation between debug and `Serial`. +We also like the abstraction it provides, making it easier to port SimpleFOClibrary to other platforms/frameworks. In future we may abstract the debug output functionality one level further, allowing debug output via SPI, MQTT or other protocols. For this reason it is also good to have a separation between debug and `Serial`. ## Other debugging methods @@ -121,7 +121,7 @@ Yes and no... There is no problem with calling Serial.println() in your sketches ### Spare pins -A great way to debug simple things is to use `digitalWrite` and an usused pin: +A great way to debug simple things is to use `digitalWrite` and an unused pin: ```cpp digitalWrite(5, HIGH); // 5 is an unused pin @@ -130,7 +130,7 @@ digitalWrite(5, HIGH); // 5 is an unused pin digitalWrite(5, LOW); ``` -Using this technique will not impact the execution time, and using your oscilloscope or logic analyser you can check the output pin and see things like how long calls are taking to execute, whether the code is taking certain branches, etc... +Using this technique will not impact the execution time, and using your oscilloscope or logic analyzer you can check the output pin and see things like how long calls are taking to execute, whether the code is taking certain branches, etc... ### IDE Debugger @@ -142,7 +142,7 @@ But it would depend on the problem you're trying to catch, the MCU and debugging We can't stress enough how much help the SimpleFOClibrary communities can be if you're having problems! -We have a [Discourse Forum](https://community.simplefoc.com/) and a [Discord Server](https://discord.com/invite/JbH772tfnB) you can join any time and ask questions. Our members are both knowledgable and helpful, so rather than sweat it out by yourself, drop by and ask some like-minded souls for advice. +We have a [Discourse Forum](https://community.simplefoc.com/) and a [Discord Server](https://discord.com/invite/JbH772tfnB) you can join any time and ask questions. Our members are both knowledgeable and helpful, so rather than sweat it out by yourself, drop by and ask some like-minded souls for advice. ### Report it! diff --git a/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_3pwm.md b/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_3pwm.md index 6f38204..9b46852 100644 --- a/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_3pwm.md +++ b/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_3pwm.md @@ -99,12 +99,12 @@ BLDCDriver3PWM driver = BLDCDriver3PWM(PIN_A, PIN_B, PIN_C, ENABLE); ### Low-side current sensing considerations -As ADC conversion has to be synchronised with the PWM generated on ALL the phases, it is important that all the PWM generated for all the phases have aligned PWM. Since the microcontrollers usually have more than one timer for PWM generation on its pins, different architectures of microcontrollers have different degrees of alinement in between the PWM generated from different timers. +As ADC conversion has to be synchronized with the PWM generated on ALL the phases, it is important that all the PWM generated for all the phases have aligned PWM. Since the microcontrollers usually have more than one timer for PWM generation on its pins, different architectures of microcontrollers have different degrees of alinement in between the PWM generated from different timers.

RULE OF THUMB: PWM timer pins

-In order to maximise your chances for the low-side current sensing to work well we suggest to make sure that the PWM pins chosen for your driver all belong to the same Timer. +In order to maximize your chances for the low-side current sensing to work well we suggest to make sure that the PWM pins chosen for your driver all belong to the same Timer. Finding out which pins belong to different timers might require some time to be spent in the MCU datasheet 😄 You can also always ask the community for help - community link! @@ -137,7 +137,7 @@ On the other hand, having higher PWM frequency will produce smoother operation,

RULE OF THUMB: PWM frequency

-The rule of thumb is to stay arround 20kHz. +The rule of thumb is to stay around 20kHz. driver.pwm_frequency = 20000; @@ -171,7 +171,7 @@ This parameter is used by the `BLDCMotor` class as well. As shown on the figure Therefore this parameter is very important if there is concern of too high currents generated by the motor. In those cases this parameter can be used as a security feature. -## Step 2.3 Initialisation +## Step 2.3 initialization Once when all the necessary configuration parameters are set the driver function `init()` is called. This function uses the configuration parameters and configures all the necessary hardware and software for driver code execution. ```cpp // driver init diff --git a/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_6pwm.md b/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_6pwm.md index 81529f5..8f050c6 100644 --- a/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_6pwm.md +++ b/docs/simplefoc_library/code/drivers/bldc_driver/bldc_driver_6pwm.md @@ -124,7 +124,7 @@ BLDCDriver6PWM driver = BLDCDriver6PWM(PA8, PB13, PA9, PB14, PA10, PB15); ``` #### Software 6 PWM mode -If it is not possible to use the hardware 6 PWM mode with your board SimpleFOClibrary enables you to use any two channels of any of the timers as your high/low side PWM pair. Basically, the library will automatically configure the complementary channels on the provided low side pins. The only requirement for this code to work properly is exatcly the same as for the Arudino UNO, each phase high/low PWM pair needs to belong to the same timer. +If it is not possible to use the hardware 6 PWM mode with your board SimpleFOClibrary enables you to use any two channels of any of the timers as your high/low side PWM pair. Basically, the library will automatically configure the complementary channels on the provided low side pins. The only requirement for this code to work properly is exactly the same as for the Arduino UNO, each phase high/low PWM pair needs to belong to the same timer. For example, if we take STM32 Nucleo F401RE board we can take for example: ```cpp // BLDCDriver6PWM( int phA_h, int phA_l, int phB_h, int phB_l, int phC_h, int phC_l, int en) @@ -153,12 +153,12 @@ ESP32 boards support `MCPWM` interface that is intended for this kind of applica ### Low-side current sensing considerations -As ADC conversion has to be synchronised with the PWM generated on ALL the phases, it is important that all the PWM generated for all the phases have aligned PWM. Since the microcontrollers usually have more than one timer for PWM generation on its pins, different architectures of microcontrollers have different degrees of alinement in between the PWM generated from different timers. +As ADC conversion has to be synchronized with the PWM generated on ALL the phases, it is important that all the PWM generated for all the phases have aligned PWM. Since the microcontrollers usually have more than one timer for PWM generation on its pins, different architectures of microcontrollers have different degrees of alinement in between the PWM generated from different timers.

RULE OF THUMB: PWM timer pins

-In order to maximise your chances for the low-side current sensing to work well we suggest to make sure that the PWM pins chosen for your driver all belong to the same timer. +In order to maximize your chances for the low-side current sensing to work well we suggest to make sure that the PWM pins chosen for your driver all belong to the same timer. Finding out which pins belong to different timers might require some time to be spent in the MCU datasheet 😄 To try to save you some time, we have created a quick guide to choosing appropriate PWM pins for different MCU architectures see in docs. @@ -192,7 +192,7 @@ On the other hand, having higher PWM frequency will produce smoother operation,

RULE OF THUMB: PWM frequency

-The rule of thumb is to stay arround 20kHz. +The rule of thumb is to stay around 20kHz. driver.pwm_frequency = 20000; @@ -210,7 +210,7 @@ driver.pwm_frequency = 20000; // dead_zone [0,1] - default 0.02 - 2% driver.dead_zone = 0.05; ``` -The dead zone parameter is defined as the amount of the duty cycle that is reserved in between changing the active mosfet. Each time the high/low side is deacitvated and low/high side is activated half of the `dead_zone` is injected. This parameter is equivalent to the dead time, dead_time can be calculated as: +The dead zone parameter is defined as the amount of the duty cycle that is reserved in between changing the active mosfet. Each time the high/low side is deactivated and low/high side is activated half of the `dead_zone` is injected. This parameter is equivalent to the dead time, dead_time can be calculated as: ```cpp dead_time = 1/pwm_frequency*dead_zone ``` @@ -240,7 +240,7 @@ This parameter is used by the `BLDCMotor` class as well. As shown on the figure Therefore this parameter is very important if there is concern of too high currents generated by the motor. In those cases this parameter can be used as a security feature. -## Step 2.3 Initialisation +## Step 2.3 initialization Once when all the necessary configuration parameters are set the driver function `init()` is called. This function uses the configuration parameters and configures all the necessary hardware and software for driver code execution. ```cpp // driver init @@ -305,7 +305,7 @@ void setup() { driver.voltage_power_supply = 12; // Max DC voltage allowed - default voltage_power_supply driver.voltage_limit = 12; - // daad_zone [0,1] - default 0.02 - 2% + // dead_zone [0,1] - default 0.02 - 2% driver.dead_zone = 0.05; // driver init diff --git a/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_2pwm.md b/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_2pwm.md index ab0de7d..8a99d9a 100644 --- a/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_2pwm.md +++ b/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_2pwm.md @@ -95,7 +95,7 @@ This parameter is used by the `StepperMotor` class as well. As shown on the figu Therefore this parameter is very important if there is concern of too high currents generated by the motor. In those cases this parameter can be used as a security feature. -## Step 2.3 Initialisation +## Step 2.3 initialization Once when all the necessary configuration parameters are set the driver function `init()` is called. This function uses the configuration parameters and configures all the necessary hardware and software for driver code execution. ```cpp // driver init diff --git a/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_4pwm.md b/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_4pwm.md index 022166f..4a5ddd8 100644 --- a/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_4pwm.md +++ b/docs/simplefoc_library/code/drivers/stepper_driver/stepper_driver_4pwm.md @@ -71,7 +71,7 @@ This parameter is used by the `StepperMotor` class as well. As shown on the figu Therefore this parameter is very important if there is concern of too high currents generated by the motor. In those cases this parameter can be used as a security feature. -## Step 2.3 Initialisation +## Step 2.3 initialization Once when all the necessary configuration parameters are set the driver function `init()` is called. This function uses the configuration parameters and configures all the necessary hardware and software for driver code execution. ```cpp // driver init diff --git a/docs/simplefoc_library/code/from_scratch.md b/docs/simplefoc_library/code/from_scratch.md index 6ad9d57..ba18ff5 100644 --- a/docs/simplefoc_library/code/from_scratch.md +++ b/docs/simplefoc_library/code/from_scratch.md @@ -42,7 +42,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor.init(); Serial.println("Sensor ready"); @@ -79,7 +79,7 @@ void setup() { // configure i2C Wire.setClock(400000); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor.init(); Serial.println("Sensor ready"); @@ -117,7 +117,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor.init(); Serial.println("Sensor ready"); @@ -155,7 +155,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise sensor hardware + // initialize sensor hardware sensor.init(); Serial.println("Sensor ready"); @@ -183,7 +183,7 @@ void loop() { #include Encoder encoder = Encoder(2, 3, 500); -// interrupt routine initialisation +// interrupt routine initialization void doA(){encoder.handleA();} void doB(){encoder.handleB();} @@ -191,7 +191,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise encoder hardware + // initialize encoder hardware encoder.init(); // hardware interrupt enable encoder.enableInterrupts(doA, doB); @@ -296,7 +296,7 @@ void setup() { driver.voltage_power_supply = 12; // Max DC voltage allowed - default voltage_power_supply driver.voltage_limit = 12; - // daad_zone [0,1] - default 0.02f - 2% + // dead_zone [0,1] - default 0.02f - 2% driver.dead_zone = 0.05f; // driver init @@ -407,7 +407,7 @@ void loop() { ``` -Once you have the code ready, upload it to your board and open the serial terminal. If everything is connected correctly your PWM driver should be ready and you should see the `Driver ready!` message in the serial terminal. If the driver does not initialise correctly, please check the following things: +Once you have the code ready, upload it to your board and open the serial terminal. If everything is connected correctly your PWM driver should be ready and you should see the `Driver ready!` message in the serial terminal. If the driver does not initialize correctly, please check the following things: 1. Make sure to change the driver parameters to suit your application, such as pin numbers, PWM frequency, power supply voltage and similar. Make sure to go through the [driver docs](drivers_config) if you are not sure about some of the parameters. 2. Make sure you use the right driver class and right pwm pins, this one is usually very simple and you can find a lot of docs about these things in our [driver docs](drivers_config) and in our [guide to choosing the PWM pins](choosing_pwm_pins). If you are not sure and cannot seem to make it work please do not hesitate to ask in our [community forum](https://community.simplefoc.com). @@ -749,7 +749,7 @@ If you cannot find the phase resistance of your motor and cannot measure it with 3. Make sure to put the right pole pair number. This you can find in most data-sheets, if you are not sure what is the true number don't worry this step is intended to test/find exactly this value. 😄

☑️ Simple tests

-1. Verify in your serial terminal that the motor and the driver have been initialised without any issues. That you can see `Motor ready!` and not see `Motor init failed!` or `Driver init failed!`. +1. Verify in your serial terminal that the motor and the driver have been initialized without any issues. That you can see `Motor ready!` and not see `Motor init failed!` or `Driver init failed!`. 2. In velocity mode: (`motor.controller = MotionControlType::velocity_openloop;`)
set your target velocity (`T6.28`) to 6.28 ($$2\pi$$) rad/s (type `T6.28`), this should be exactly one rotation per second. 3. In position mode, (`motor.controller = MotionControlType::angle_openloop;`)
@@ -1037,12 +1037,12 @@ Until now, you already know the good configuration of your sensor, your driver a

☑️ Simple test

1. If everything is connected correctly you should see the motor spinning and you should be able to set the target voltage through the serial terminal (command `M`). -2. If the motor is not spinning please verify that the motor and driver have been initialised without any issues by checking the serial terminal output (make sure that you can see `Motor ready!` and not see `Motor init failed!` or `Driver init failed!`). +2. If the motor is not spinning please verify that the motor and driver have been initialized without any issues by checking the serial terminal output (make sure that you can see `Motor ready!` and not see `Motor init failed!` or `Driver init failed!`).
The most common issues that might arise are: - The motor does not spin at all - - The driver is probably not initialised correctly, check the serial terminal output for any errors. + - The driver is probably not initialized correctly, check the serial terminal output for any errors. - The motor spins during the `motor.initFOC()` function but it does not spin afterwards - Verify the output of the `motor.initFOC()` function, there is probably an error with the sensor alignment or pole pairs number. - The motor spins but is unstable and makes a lot of noise @@ -1401,7 +1401,7 @@ void loop() { ``` -This example code is almost exactly the same as the Step 3. code so you should not have much trouble configuring motor, sensor and driver. In this step you will be testing if your current sense is working well. In the call of the `motor.monitor()` function the current sense will be read and the current d and q are going to be printed to the serial terminal. You can open the Serial Plotter to visualise them. +This example code is almost exactly the same as the Step 3. code so you should not have much trouble configuring motor, sensor and driver. In this step you will be testing if your current sense is working well. In the call of the `motor.monitor()` function the current sense will be read and the current d and q are going to be printed to the serial terminal. You can open the Serial Plotter to visualize them.

☑️ Simple test

1. If everything is connected correctly you should see the motor spinning and you should be able to set the target voltage through the serial terminal (command `M`). @@ -1409,12 +1409,12 @@ This example code is almost exactly the same as the Step 3. code so you should n 3. Leave the motor to rotate. See that your currents d and q drop to a lower level than for static motor. Also try to see that the current d is almost 0 for low velocities and starts rising proportionally to the motor velocity.
-If the motor is not spinning please verify that the motor and driver have been initialised without any issues by checking the serial terminal output (make sure that you can see `Motor ready!` and not see `Motor init failed!`, `Driver init failed!` or `Current sense init failed!`). Our debugging interface will output a lot of information during the driver, current sense and motor init that can help you debug potential issues with your setup. If you are having issues with the current sense please go through the [current sense docs](current_sense) to see the supported sensors and all the configuration parameters. +If the motor is not spinning please verify that the motor and driver have been initialized without any issues by checking the serial terminal output (make sure that you can see `Motor ready!` and not see `Motor init failed!`, `Driver init failed!` or `Current sense init failed!`). Our debugging interface will output a lot of information during the driver, current sense and motor init that can help you debug potential issues with your setup. If you are having issues with the current sense please go through the [current sense docs](current_sense) to see the supported sensors and all the configuration parameters. The most common issues that might arise are: - Current sense pins are not ADC pins - see our [guide to choosing ADC pins](choosing_adc_pins) for more info. - The driver is not linked to the current sense - make sure you have the `current_sense.linkDriver(&driver);` line in your code. -- PWM timer and ADC cannot be synchronised - see our [guide to choosing PWM pins](choosing_pwm_pins) for more info. +- PWM timer and ADC cannot be synchronized - see our [guide to choosing PWM pins](choosing_pwm_pins) for more info. - Current sense alignment has failed - verify the debugging output of the `motor.initFOC()` function and try to change the `motor.voltage_sensor_align` value. ## Step 5. Full FOC motion control using current sensing - if available diff --git a/docs/simplefoc_library/code/index.md b/docs/simplefoc_library/code/index.md index 6278fe8..eee23b3 100644 --- a/docs/simplefoc_library/code/index.md +++ b/docs/simplefoc_library/code/index.md @@ -88,10 +88,10 @@ void loop() { } ``` -This is an example initialisation of a 14 bit SPI based magnetic sensor such as the AS5047u , connected to pin `10`.
+This is an example initialization of a 14 bit SPI based magnetic sensor such as the AS5047u , connected to pin `10`.
Magnetic sensors using the SPI protocol are implemented in the class `MagneticSensorSPI` and are defined with their - `chip_select` pin: `10` - - bit resoluion of the sensor overall `12` the `CPR` can be calculated as `CPR = 2^14bit =16384` + - bit resolution of the sensor overall `12` the `CPR` can be calculated as `CPR = 2^14bit =16384` - `angle` SPI register: `0x3FFF` @@ -390,7 +390,7 @@ void setup() { // link driver and the current sense // link the motor to current sense - motor.linkCurrentSense(¤t_sese); + motor.linkCurrentSense(¤t_sense); // set control loop type to be used motor.controller = MotionControlType::velocity; @@ -432,7 +432,7 @@ void setup() { // link driver and the current sense // link the motor to current sense - motor.linkCurrentSense(¤t_sese); + motor.linkCurrentSense(¤t_sense); // set control loop type to be used motor.controller = MotionControlType::velocity; @@ -576,7 +576,7 @@ This debugging interface will output a more detailed information about: - motor FOC initialization (during the `motor.initFOC()` function) The debugging output will provide more information about the state of the motor, driver and current sense during and after the initialization process and will help you to debug your setup. -It will also provide MCU architecture specific information such as which Timers and channels are used for PWM generation, which ADC is used for current sensing, did the TIME-ADC synchronisation work, etc. +It will also provide MCU architecture specific information such as which Timers and channels are used for PWM generation, which ADC is used for current sensing, did the TIME-ADC synchronization work, etc.
📢 We strongly advise to use the debugging mode when starting with the SimpleFOClibrary. @@ -588,7 +588,7 @@ It provides much more information than the standard monitoring output and can he Debugging outputs are strings which can take a considerable amount of memory space, so it's not recommended to use it in the final application.
-Debugging output is disabled by default and can be enabled by calling the `SimpleFOCDebug::enable(&Serial)` function before any of the `driver`, `sensor`, `current_sense` or `motor` initalisation (`init` calls). Preferably put the `SimpleFOCDebug::enable(&Serial)` function call at the beginning of the `setup()` function. +Debugging output is disabled by default and can be enabled by calling the `SimpleFOCDebug::enable(&Serial)` function before any of the `driver`, `sensor`, `current_sense` or `motor` initialization (`init` calls). Preferably put the `SimpleFOCDebug::enable(&Serial)` function call at the beginning of the `setup()` function. ```cpp #include @@ -847,7 +847,7 @@ void setup() { // enable the debugging output SimpleFOCDebug::enable(&Serial); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor.init(); // link the motor to the sensor motor.linkSensor(&sensor); @@ -862,7 +862,7 @@ void setup() { // set control loop type to be used motor.controller = MotionControlType::torque; - // contoller configuration based on the control type + // controller configuration based on the control type motor.PID_velocity.P = 0.2; motor.PID_velocity.I = 20; motor.PID_velocity.D = 0; @@ -881,12 +881,12 @@ void setup() { // comment out if not needed motor.useMonitoring(Serial); - // initialise motor + // initialize motor motor.init(); // align encoder and start FOC motor.initFOC(); - // set the inital target value + // set the initial target value motor.target = 2; // define the motor id @@ -903,7 +903,7 @@ void loop() { // iterative setting of the FOC phase voltage motor.loopFOC(); - // iterative function setting the outter loop target + // iterative function setting the outer loop target // velocity, position or voltage // if target not set in parameter uses motor.target variable motor.move(); diff --git a/docs/simplefoc_library/code/monitoring.md b/docs/simplefoc_library/code/monitoring.md index c63284e..4b4e479 100644 --- a/docs/simplefoc_library/code/monitoring.md +++ b/docs/simplefoc_library/code/monitoring.md @@ -29,7 +29,7 @@ Note: you can also use other serial ports, e.g. Serial1, Serial2, as supported b
At the moment, enabling monitoring using motor.useMonitoring will also enable debug output - see [debugging](debugging) for details. -In a future release, debug output and telemetry output will be seperated and the motor.useMonitoring function will likely be deprecated. +In a future release, debug output and telemetry output will be separated and the motor.useMonitoring function will likely be deprecated. If the debug output is undesired or causing you problems, you can disable debug output (but keep monitoring) like this:
@@ -148,7 +148,7 @@ motor.monitor_start_char = '\0'; //!< monitor starting character motor.monitor_end_char = '\0'; //!< monitor outputs ending character motor.monitor_separator = '\t'; //!< monitor outputs separation character ``` -The initial parameters are set so that the Arduino IDE's serial plotter can nicely parse the variables. However if you wish to use some other serial plotter application, for example [CieNTi/serial_port_plotter](https://github.com/CieNTi/serial_port_plotter), you can easily adapt the monitoring format so that you can visualise motor variables in it +The initial parameters are set so that the Arduino IDE's serial plotter can nicely parse the variables. However if you wish to use some other serial plotter application, for example [CieNTi/serial_port_plotter](https://github.com/CieNTi/serial_port_plotter), you can easily adapt the monitoring format so that you can visualize motor variables in it ```cpp motor.monitor_separator= ' '; diff --git a/docs/simplefoc_library/code/motion_control/closed_loop_control/torque_control/voltage.md b/docs/simplefoc_library/code/motion_control/closed_loop_control/torque_control/voltage.md index 793df0e..77ab4d5 100644 --- a/docs/simplefoc_library/code/motion_control/closed_loop_control/torque_control/voltage.md +++ b/docs/simplefoc_library/code/motion_control/closed_loop_control/torque_control/voltage.md @@ -206,7 +206,7 @@ With the $$R$$ and $$KV$$ information the Simple

⚠️ Practical limitations

-Back-EMF voltage is defined as \(U_{bemf} = k_{bemf}v\) and calculating it based on the motor \(KV\) rating of the motor is just an approximation because the motor BEMF constant \(k_{bemf}\) is not exacly \(k_{bemf}=1/KV\). +Back-EMF voltage is defined as \(U_{bemf} = k_{bemf}v\) and calculating it based on the motor \(KV\) rating of the motor is just an approximation because the motor BEMF constant \(k_{bemf}\) is not exactly \(k_{bemf}=1/KV\). It can be shown that the back-emf constant is always somewhat smaller than the inverse of the KV rating: \[k_{bemf}<\frac{1}{KV}\]
@@ -290,7 +290,7 @@ With the $$R$$ and $$KV$$ information the Simple

⚠️ Practical limitations

-Back-EMF voltage is defined as \(U_{bemf} = k_{bemf}v\) and calculating it based on the motor \(KV\) rating of the motor is just an approximation because the motor BEMF constant \(k_{bemf}\) is not exacly \(k_{bemf}=1/KV\). +Back-EMF voltage is defined as \(U_{bemf} = k_{bemf}v\) and calculating it based on the motor \(KV\) rating of the motor is just an approximation because the motor BEMF constant \(k_{bemf}\) is not exactly \(k_{bemf}=1/KV\). It can be shown that the back-emf constant is always somewhat smaller than the inverse of the KV rating: \[k_{bemf}<\frac{1}{KV}\]
diff --git a/docs/simplefoc_library/code/motion_control/open_loop/angle_openloop.md b/docs/simplefoc_library/code/motion_control/open_loop/angle_openloop.md index 9ef5e97..aa3dbad 100644 --- a/docs/simplefoc_library/code/motion_control/open_loop/angle_openloop.md +++ b/docs/simplefoc_library/code/motion_control/open_loop/angle_openloop.md @@ -97,7 +97,7 @@ U_{limit} \quad [Volts] $$ This is very inefficient, as for different motors with different phase resistances the same voltage values can produce wildly different currents. -For gimbal motor, you can run it in the open loop with the voltage limits of 5-10 Volts and it will reach the currents of 0.5-2 amps as it has the phase resistance from 5-15 Ohms. For drone motors, the voltage limits should stay very low, under 1 volt. Because they have phase resisatnce of 0.05 to 0.2 Ohms. +For gimbal motor, you can run it in the open loop with the voltage limits of 5-10 Volts and it will reach the currents of 0.5-2 amps as it has the phase resistance from 5-15 Ohms. For drone motors, the voltage limits should stay very low, under 1 volt. Because they have phase resistance of 0.05 to 0.2 Ohms. ### Current limiting approaches diff --git a/docs/simplefoc_library/code/motion_control/open_loop/index.md b/docs/simplefoc_library/code/motion_control/open_loop/index.md index 8c1acac..e1d7e9e 100644 --- a/docs/simplefoc_library/code/motion_control/open_loop/index.md +++ b/docs/simplefoc_library/code/motion_control/open_loop/index.md @@ -22,8 +22,8 @@ Choose the voltage control type: Velocity control
- - + +
diff --git a/docs/simplefoc_library/code/motion_control/open_loop/velocity_openloop.md b/docs/simplefoc_library/code/motion_control/open_loop/velocity_openloop.md index 734bdfc..031d7c9 100644 --- a/docs/simplefoc_library/code/motion_control/open_loop/velocity_openloop.md +++ b/docs/simplefoc_library/code/motion_control/open_loop/velocity_openloop.md @@ -76,7 +76,7 @@ U_{limit} \quad [Volts] $$ This is very inefficient, as for different motors with different phase resistances the same voltage values can produce wildly different currents. -For gimbal motor, you can run it in the open loop with the voltage limits of 5-10 Volts and it will reach the currents of 0.5-2 amps as it has the pahse resistance from 5-15 Ohms. For drone motors, the voltage limits should stay very low, under 1 volt. Because they have phase resistance of 0.05 to 0.2 Ohms. +For gimbal motor, you can run it in the open loop with the voltage limits of 5-10 Volts and it will reach the currents of 0.5-2 amps as it has the phase resistance from 5-15 Ohms. For drone motors, the voltage limits should stay very low, under 1 volt. Because they have phase resistance of 0.05 to 0.2 Ohms. ### Current limiting approaches diff --git a/docs/simplefoc_library/code/motors/bldc_motors.md b/docs/simplefoc_library/code/motors/bldc_motors.md index e595e82..e8850a8 100644 --- a/docs/simplefoc_library/code/motors/bldc_motors.md +++ b/docs/simplefoc_library/code/motors/bldc_motors.md @@ -47,7 +47,7 @@ If you are not sure what your motor's KV ```cpp KV = velocity_at_one_volt * 30/pi ``` -You can also use the provided libray examples `examples/utils/calibration/find_KV_rating.ino`. +You can also use the provided library examples `examples/utils/calibration/find_KV_rating.ino`.
@@ -61,8 +61,8 @@ It is important to say that once you specify the phase resistance value, you wil Finally, this parameter is suggested to be used if one whats to switch in real time in between voltage ([voltage mode](voltage_torque_mode)) and current based ([DC current](dc_current_torque_mode) and [FOC current](foc_current_torque_mode)) torque control strategies. Since in this way all the torque control loops will have current as input (target value) the user will not have to change the motion control parameters (PID values).
-

Open-loop motion control will use KV and phase resitance values

-KV rating and the pahse resitance values will be used in te open loop contol as well to let the user to limit the current drawn by the motor instead of limitting the volatge. Read more in the open-loop motion control docs. +

Open-loop motion control will use KV and phase resistance values

+KV rating and the phase resistance values will be used in te open loop control as well to let the user to limit the current drawn by the motor instead of limiting the voltage. Read more in the open-loop motion control docs.
### How can I measure the phase resistance and inductance? @@ -77,7 +77,7 @@ Once you have the current sensor set up, you can use the `motor.characteriseMoto
- Example code for motor phase characterisation + Example code for motor phase characterization ```cpp @@ -113,7 +113,7 @@ void setup() { current_sense.init(); motor.linkCurrentSense(¤t_sense); - // initialise motor + // initialize motor motor.init(); // find the motor parameters @@ -177,7 +177,7 @@ motor.linkCurrentSense(¤t_sense); ``` This linking step is only necessary if you have a current sense supported by this library. See the [current sense docs](current_sense) for more info! -## Step 5. Configuration paramters +## Step 5. Configuration parameters If you choose not to set some of the configuration parameters they will take values defined in the `defaults.h` file. Check the [library source code](source_code) to dig deeper. @@ -188,8 +188,8 @@ There are four types of Field Oriented Control modulation types implemented for - Sinusoidal PWM modulation - Space Vector PWM modulation - Block commutation - *beneficial for current control applications* - - Trapesoidal 120 - - Trapesoidal 150 + - trapezoidal 120 + - trapezoidal 150 You can set them by changing the `motor.foc_modulation` variable: ```cpp @@ -200,7 +200,7 @@ You can set them by changing the `motor.foc_modulation` variable: // FOCModulationType::Trapezoid_150; motor.foc_modulation = FOCModulationType::SpaceVectorPWM; ``` -Sinusoidal PWM and Space vector commutation patters will produce sinusoidal currents and smooth operation but block commutation will be faster to execute, therefore more suitable for higher velocities. It is suggested to use the Trapesoidal 120 commutation with Hall sensors. Other commutation patterns will work as well but this one will have the best performance. +Sinusoidal PWM and Space vector commutation patters will produce sinusoidal currents and smooth operation but block commutation will be faster to execute, therefore more suitable for higher velocities. It is suggested to use the trapezoidal 120 commutation with Hall sensors. Other commutation patterns will work as well but this one will have the best performance.

FOC currents torque control requirements

FOC torque control requires sinusoidal currents therefore please use either Sinusoidal PWM or Space vector PWM
@@ -315,7 +315,7 @@ motor.init(); ## Step 6. Align motor and all the sensors - Field Oriented Control init -After the position sensor, current sense, driver and the motor are configured, and before we can start the motion control we need to align all hardware components in order to initialize the FOC algorithm. This is done in the scope of the funciton `motor.initFOC()` +After the position sensor, current sense, driver and the motor are configured, and before we can start the motion control we need to align all hardware components in order to initialize the FOC algorithm. This is done in the scope of the function `motor.initFOC()` ```cpp // align sensor and start FOC motor.initFOC(); @@ -323,7 +323,7 @@ motor.initFOC();

Can be skipped for openloop control!

If no sensor is attached this function will not really do anything, but you can still call it if necessary or more convenient.
This function does several things: -- Checks if driver (and current sense if available) are well initialised +- Checks if driver (and current sense if available) are well initialized - Checks/modifies position sensor direction in respect to the motor's direction - Searches for encoder index if necessary - Finds the motor electrical offset in respect to the position sensor @@ -373,7 +373,7 @@ The real-time motion control of theArduino SimpleUq voltage command `motor.voltage_q` to the appropriate phase voltages ua, ub and uc which are set then set to the motor. Whereas if it is used in DC of FOC current modes it additionally reads the current sensor and runs the closed loop current control. +The function `loopFOC()` behavior directly depends of the torque control mode usd. If used in voltage mode it gets the current motor angle from the sensor, turns it into the electrical angle and transforms the q-axis Uq voltage command `motor.voltage_q` to the appropriate phase voltages ua, ub and uc which are set then set to the motor. Whereas if it is used in DC of FOC current modes it additionally reads the current sensor and runs the closed loop current control. ```cpp // Function running the low level torque control loop @@ -388,7 +388,7 @@ motor.loopFOC(); This function is execution time is critical both in the voltage mode and in current control modes. Therefore it is very important that the `motor.loopFOC()` function is executed as fast as possible.

Rule od thumb: execution time

-The faster you can run this function the better, here is approximative loops execution time using different torque modes. +The faster you can run this function the better, here are some approximate execution times using different torque modes. diff --git a/docs/simplefoc_library/code/motors/stepper_motors.md b/docs/simplefoc_library/code/motors/stepper_motors.md index 11f5b48..352e4f9 100644 --- a/docs/simplefoc_library/code/motors/stepper_motors.md +++ b/docs/simplefoc_library/code/motors/stepper_motors.md @@ -78,7 +78,7 @@ If you are not sure what your motor's KV ```cpp KV = velocity_at_one_volt * 30/pi ``` -You can also use the provided libray examples `examples/utils/calibration/find_KV_rating.ino`. +You can also use the provided library examples `examples/utils/calibration/find_KV_rating.ino`.
@@ -93,8 +93,8 @@ It is important to say that once you specify the phase resistance value, you wil Finally, this parameter is suggested to be used if one whats to switch in real time in between voltage ([voltage mode](voltage_torque_mode)) and current based ([DC current](dc_current_torque_mode) and [FOC current](foc_current_torque_mode)) torque control strategies. Since in this way all the torque control loops will have current as input (target value) the user will not have to change the motion control parameters (PID values).
-

Open-loop motion control will use KV and phase resitance values

-KV rating and the pahse resitance values will be used in te open loop contol as well to let the user to limit the current drawn by the motor instead of limitting the volatge. Read more in the open-loop motion control docs. +

Open-loop motion control will use KV and phase resistance values

+KV rating and the phase resistance values will be used in te open loop control as well to let the user to limit the current drawn by the motor instead of limiting the voltage. Read more in the open-loop motion control docs.
@@ -238,7 +238,7 @@ motor.init(); ## Step 5. Align motor and all the sensors - Field Oriented Control init -After the position sensor, driver and the motor are configured, and before we can start the motion control we need to align all hardware components in order to initialize the FOC algorithm. This is done in the scope of the funciton `motor.initFOC()` +After the position sensor, driver and the motor are configured, and before we can start the motion control we need to align all hardware components in order to initialize the FOC algorithm. This is done in the scope of the function `motor.initFOC()` ```cpp // align sensor and start FOC motor.initFOC(); @@ -246,7 +246,7 @@ motor.initFOC();

Can be skipped for openloop control!

If no sensor is attached this function will not really do anything, but you can still call it if necessary or more convenient.
This function does several things: -- Checks if driver (and current sense if available) are well initialised +- Checks if driver (and current sense if available) are well initialized - Checks/modifies position sensor direction in respect to the motor's direction - Searches for encoder index if necessary - Finds the motor electrical offset in respect to the position sensor @@ -290,7 +290,7 @@ The real-time motion control of theArduino SimpleUq voltage command `motor.voltage_q` to the appropriate phase voltages ua, ub and uc which are set then set to the motor. If the stepper motor's phase resistance and KV rating are provided this function will furthermore calculate the estimated current and the user will be able to control this estiamted current value Iq directly. +The function `loopFOC()` implements the torque control loop. As the stepper motors only support [torque using voltage mode](voltage_torque_mode) this function will read the current motor angle from the sensor, turn it into the electrical angle and transforms the q-axis Uq voltage command `motor.voltage_q` to the appropriate phase voltages ua, ub and uc which are set then set to the motor. If the stepper motor's phase resistance and KV rating are provided this function will furthermore calculate the estimated current and the user will be able to control this estimated current value Iq directly. ```cpp // Function running the low level torque control loop diff --git a/docs/simplefoc_library/code/sensors/generic.md b/docs/simplefoc_library/code/sensors/generic.md index 86abce2..0573013 100644 --- a/docs/simplefoc_library/code/sensors/generic.md +++ b/docs/simplefoc_library/code/sensors/generic.md @@ -27,7 +27,7 @@ float readMySensorCallback(){ } ``` -additionally you can optionally implement a function that initialises your sensor +additionally you can optionally implement a function that initializes your sensor ```cpp void initMySensorCallback(){ // do the init @@ -35,11 +35,11 @@ void initMySensorCallback(){ ``` ## Step 2. Instantiate `GenericSensor` class -To initialize the sensor class you need to provide it the pointer to your function reading the sensor, and optionally the pointer to the function that initialises your sensor. +To initialize the sensor class you need to provide it the pointer to your function reading the sensor, and optionally the pointer to the function that initializes your sensor. ```cpp // GenericSensor class constructor // - readCallback pointer to the function reading the sensor angle -// - initCallback pointer to the function initialising the sensor (optional) +// - initCallback pointer to the function initializing the sensor (optional) GenericSensor sensor = GenericSensor(readMySensorCallback, initMySensorCallback); ``` @@ -177,7 +177,7 @@ To setup the counters and all the hardware parameters here we use the library [E ESP32Encoder encoder; // define the sensor cpr (500x4) int64_t cpr = 2000; -// function intialising the sensor +// function initializing the sensor void initMySensorCallback(){ // use pin 25 and 26 (Arduino pins 2,3) for the encoder encoder.attachFullQuad(25, 26); @@ -223,7 +223,7 @@ void setup() { // comment out if not needed motor.useMonitoring(Serial); - // initialise motor + // initialize motor motor.init(); // align encoder and start FOC motor.initFOC(); @@ -239,7 +239,7 @@ void loop() { // iterative setting FOC phase voltage motor.loopFOC(); - // iterative function setting the outter loop target + // iterative function setting the outer loop target motor.move(); // user communication diff --git a/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_analog.md b/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_analog.md index 206e91e..03ef3d4 100644 --- a/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_analog.md +++ b/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_analog.md @@ -33,7 +33,7 @@ The parameters of the class are - `max_raw_count` - the largest value read. Whilst you might expect it to be 2^10 = 1023 it is often ~ 1020. Note: For ESP32 (with 12bit ADC the value will be nearer 4096)

💡 Find out min and max

-Every mcu is a bit different and every sensor as well so we advise you to use the provided example in the examples/sensor_test/magentic_sensor_analog_example/find_raw_min_max to find out the maximal and minimal values of your sensor. +Every mcu is a bit different and every sensor as well so we advise you to use the provided example in the examples/sensor_test/magnetic_sensor_analog_example/find_raw_min_max to find out the maximal and minimal values of your sensor.
Finally after the initialization the only thing you need to do afterwards is to call the `init()` function. This function initializes the sensor hardware. So your magnetic sensor initialization code will look like: ```cpp @@ -176,7 +176,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor.init(); Serial.println("Sensor ready"); diff --git a/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_pwm.md b/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_pwm.md index fdf6066..b2b89a0 100644 --- a/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_pwm.md +++ b/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_pwm.md @@ -34,7 +34,7 @@ The parameters of the class are - `max_raw_count` - the largest pulse time in microseconds. This is the value of init pulse time plus the data sending time.

💡 Find out min and max

-Every mcu is a bit different and every sensor as well so we advise you to use the provided example in the examples/sensor_test/magentic_sensor_pwm_example/find_raw_min_max to find out the maximal and minimal values of your sensor. +Every mcu is a bit different and every sensor as well so we advise you to use the provided example in the examples/sensor_test/magnetic_sensor_pwm_example/find_raw_min_max to find out the maximal and minimal values of your sensor.
📚 See page 27 of the AS5048 datasheet or AS5600 datasheet for more in depth explanation about how the PWM sensors encode the angle. AS5048 , AS5600
@@ -90,7 +90,7 @@ MagneticSensorPWM sensor = MagneticSensorPWM(3, 4, 904); void doPWM(){sensor.handlePWM();} ``` -And then, in the `setup` function, user needs to call `init()` funciton and afterwards call the `attachInterrupt` function with the buffering function in the argument. Here is an example code: +And then, in the `setup` function, user needs to call `init()` function and afterwards call the `attachInterrupt` function with the buffering function in the argument. Here is an example code: ```cpp // create the class MagneticSensorPWM sensor = MagneticSensorPWM(3, 4, 904); @@ -291,7 +291,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor.init(); // comment out to use sensor in blocking (non-interrupt) way sensor.enableInterrupt(doPWM); @@ -328,7 +328,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor.init(); Serial.println("Sensor ready"); diff --git a/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_spi.md b/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_spi.md index 7212db7..23f7ada 100644 --- a/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_spi.md +++ b/docs/simplefoc_library/code/sensors/magnetic/magnetic_sensor_spi.md @@ -221,7 +221,7 @@ void setup() { // monitoring port Serial.begin(115200); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware as5047u.init(); Serial.println("as5047u ready"); diff --git a/docs/simplefoc_library/digging_deeper/libray_source/communication.md b/docs/simplefoc_library/digging_deeper/libray_source/communication.md index 6115b2f..a7d0179 100644 --- a/docs/simplefoc_library/digging_deeper/libray_source/communication.md +++ b/docs/simplefoc_library/digging_deeper/libray_source/communication.md @@ -29,7 +29,7 @@ The command ids used by the commander interface are defined in the library sourc #define CMD_RESIST 'R' //!< motor phase resistance // commander configuration - #define CMD_SCAN '?' //!< command scaning the network - only for commander + #define CMD_SCAN '?' //!< command scanning the network - only for commander #define CMD_VERBOSE '@' //!< command setting output mode - only for commander #define CMD_DECIMAL '#' //!< command setting decimal places - only for commander diff --git a/docs/simplefoc_library/digging_deeper/libray_source/index.md b/docs/simplefoc_library/digging_deeper/libray_source/index.md index 480ad15..967329b 100644 --- a/docs/simplefoc_library/digging_deeper/libray_source/index.md +++ b/docs/simplefoc_library/digging_deeper/libray_source/index.md @@ -62,7 +62,7 @@ All the drivers that are supported in this library are placed in the drivers dir | | | | | ├─ hardware_api.h # common mcu specific api handling pwm setting and configuration | | | -| | ├─── hardware_specific # mcu specific hadrware_api.h implementations +| | ├─── hardware_specific # mcu specific hardware_api.h implementations | | | ├─ atmega2560_mcu.cpp # ATMega 2560 implementation | | | ├─ atmega328_mcu.cpp # ATMega 328 (Arduino UNO) implementation | | | ├─ esp_mcu.cpp # esp32 implementation @@ -75,7 +75,7 @@ ALl BLDC drivers implement the abstract class `BLDCDriver`. class BLDCDriver{ public: - /** Initialise hardware */ + /** initialize hardware */ virtual int init(); /** Enable hardware */ virtual void enable(); @@ -107,7 +107,7 @@ And all the stepper drivers implement the `StepperDriver` abstract class. class StepperDriver{ public: - /** Initialise hardware */ + /** initialize hardware */ virtual int init(); /** Enable hardware */ virtual void enable(); @@ -167,16 +167,16 @@ public: | | | | | ├─ hardware_api.h # common mcu specific api handling adc setting and configuration | | | -| | ├─── hardware_specific # mcu specific hadrware_api.h implementations +| | ├─── hardware_specific # mcu specific hardware_api.h implementations | | └─ generic_mcu./h # generic implementation - for now generic mcu does the job ``` -All the current sense classes implement the `CurrentSense` interface. This interface is still quiet new and might be supject to change for the future releases when more current control loops are implemented. +All the current sense classes implement the `CurrentSense` interface. This interface is still quiet new and might be subject to change for the future releases when more current control loops are implemented. ```cpp class CurrentSense{ public: - // Function intialising the CurrentSense class - // All the necessary intialisations of adc and sync should be implemented here + // Function initializing the CurrentSense class + // All the necessary initializations of adc and sync should be implemented here virtual void init() = 0; // Function reading the phase currents a, b and c @@ -187,14 +187,14 @@ class CurrentSense{ // @return PhaseCurrent_s current values virtual PhaseCurrent_s getPhaseCurrents() = 0; // Function reading the magnitude of the current set to the motor - // It returns the abosolute or signed magnitude if possible + // It returns the absolute or signed magnitude if possible // It can receive the motor electrical angle to help with calculation // This function is used with the current control (not foc) // // @param angle_el - electrical angle of the motor (optional) virtual float getDCCurrent(float angle_el = 0); - // Function used for FOC contorl, it reads the DQ currents of the motor + // Function used for FOC control, it reads the DQ currents of the motor // It uses the function getPhaseCurrents internally // // @param angle_el - motor electrical angle @@ -286,7 +286,7 @@ Header file containing all the default configuration variables // index search #define DEF_INDEX_SEARCH_TARGET_VELOCITY 1 //!< default index search velocity // align voltage -#define DEF_VOLTAGE_SENSOR_ALIGN 6.0 //!< default voltage for sensor and motor zero alignemt +#define DEF_VOLTAGE_SENSOR_ALIGN 6.0 //!< default voltage for sensor and motor zero alignment // low pass filter velocity #define DEF_VEL_FILTER_Tf 0.005 //!< default velocity filter time constant ``` diff --git a/docs/simplefoc_library/digging_deeper/libray_source/motiron_control.md b/docs/simplefoc_library/digging_deeper/libray_source/motiron_control.md index 6031b2d..10abe92 100644 --- a/docs/simplefoc_library/digging_deeper/libray_source/motiron_control.md +++ b/docs/simplefoc_library/digging_deeper/libray_source/motiron_control.md @@ -18,7 +18,7 @@ toc: true - Velocity motion control - Position/angle control -The motion control algorithm is chosen by seting the `motor.controller` variables with one of the `ControlType` structure: +The motion control algorithm is chosen by setting the `motor.controller` variables with one of the `ControlType` structure: ```cpp // Motion control type @@ -45,7 +45,7 @@ The real-time motion control is executed inside `move()` function. Move function Here is the implementation: ```cpp -// Iterative function running outer loop of the FOC algorithm +// Iterative function running motor loop of the FOC algorithm // Behavior of this function is determined by the motor.controller variable // It runs either angle, velocity or voltage loop // - needs to be called iteratively it is asynchronous function @@ -82,7 +82,7 @@ void BLDCMotor::move(float new_target = NOT_SET) { ## Shaft velocity filtering `shaftVelocity` The first step for velocity motion control is the getting the velocity value from sensor. Because some sensors are very noisy and especially since in most cases velocity value is calculated by -derivating the position value we have implemented a Low Pass filter velocity filter to smooth out the measurement. +deviating the position value we have implemented a Low Pass filter velocity filter to smooth out the measurement. The velocity calculating function is `shaftVelocity()` with implementation: ```cpp // shaft velocity calculation @@ -196,7 +196,7 @@ For more info about the theory of hte PI controller implemented in this library Now when we have the velocity control loop explained we can build our position control loop in cascade as shown on the image. -When we have target angle we want to achieve, we will use the P controller to calculate necessary velocity we need and then the velocity loop will calculate the necessary voltage `votage_q` to achieve both velocity and angle that we want. +When we have target angle we want to achieve, we will use the P controller to calculate necessary velocity we need and then the velocity loop will calculate the necessary voltage `voltage_q` to achieve both velocity and angle that we want. The position P controller is implemented in `positionP()` function: ```cpp diff --git a/docs/simplefoc_library/digging_deeper/libray_source/sensors.md b/docs/simplefoc_library/digging_deeper/libray_source/sensors.md index 6c8bdfe..f9ac92a 100644 --- a/docs/simplefoc_library/digging_deeper/libray_source/sensors.md +++ b/docs/simplefoc_library/digging_deeper/libray_source/sensors.md @@ -81,7 +81,7 @@ class Sensor{ /** * returns 0 if it does need search for absolute zero * 0 - magnetic sensor (& encoder with index which is found) - * 1 - ecoder with index (with index not found yet) + * 1 - encoder with index (with index not found yet) */ virtual int needsSearch(); protected: diff --git a/docs/simplefoc_library/digging_deeper/theory/cs_align.md b/docs/simplefoc_library/digging_deeper/theory/cs_align.md index 2711d1f..1f9d465 100644 --- a/docs/simplefoc_library/digging_deeper/theory/cs_align.md +++ b/docs/simplefoc_library/digging_deeper/theory/cs_align.md @@ -36,7 +36,7 @@ The procedure is simple and is based on the view of the motor as an electrical c Also the assumption taken by the align is that the phase resistances of the motor are equal. This is a common assumption for the BLDC and Stepper motors and it is a good starting point for the current sense alignment. -The alignment procedure then applies phase volatges on one phase and keeps the other phases connected to the ground. Then by knowing the phase voltages applied and abstarcting the motor as a simple three resistance circuit, we can calculate the currents that should flow through the motor phases and compare them to the currents measured by the current sense. If the currents are not the same, the current sense is not aligned and the procedure will try to align it. +The alignment procedure then applies phase voltages on one phase and keeps the other phases connected to the ground. Then by knowing the phase voltages applied and abstracting the motor as a simple three resistance circuit, we can calculate the currents that should flow through the motor phases and compare them to the currents measured by the current sense. If the currents are not the same, the current sense is not aligned and the procedure will try to align it. As the architecture of Stepper and BLDC motors is different the alignment procedure is also different. @@ -105,7 +105,7 @@ $$I_b = \frac{U_b}{R_b}, \quad I_a = I_c = -0.5 I_b$$ ### The procedure in the code The current sense alignment procedure is implemented in the `current_sense.alignBLDCDriver()` function which is called within `motor.initFOC()`. -The function is called automatically when the motor is initialised and the `current_sense.skip_align` is not set to `true`. The code of the function can be found [here](https://github.com/simplefoc/Arduino-FOC/blob/996f312841812f1bf5d2f724a7d3e37edd6d9343/src/common/base_classes/CurrentSense.cpp#L167-L383). +The function is called automatically when the motor is initialized and the `current_sense.skip_align` is not set to `true`. The code of the function can be found [here](https://github.com/simplefoc/Arduino-FOC/blob/996f312841812f1bf5d2f724a7d3e37edd6d9343/src/common/base_classes/CurrentSense.cpp#L167-L383). @@ -155,6 +155,6 @@ $$I_b = \frac{U_b}{R_b}, \quad I_a = 0$$ ### The procedure in the code The current sense alignment procedure is implemented in the `current_sense.alignStepperDriver()` function which is called within `motor.initFOC()`. -The function is called automatically when the motor is initialised and the `current_sense.skip_align` is not set to `true`. The code of the function can be found [here](https://github.com/simplefoc/Arduino-FOC/blob/996f312841812f1bf5d2f724a7d3e37edd6d9343/src/common/base_classes/CurrentSense.cpp#L386-L473). +The function is called automatically when the motor is initialized and the `current_sense.skip_align` is not set to `true`. The code of the function can be found [here](https://github.com/simplefoc/Arduino-FOC/blob/996f312841812f1bf5d2f724a7d3e37edd6d9343/src/common/base_classes/CurrentSense.cpp#L386-L473). diff --git a/docs/simplefoc_library/digging_deeper/theory/init.md b/docs/simplefoc_library/digging_deeper/theory/init.md index f492c2c..726300f 100644 --- a/docs/simplefoc_library/digging_deeper/theory/init.md +++ b/docs/simplefoc_library/digging_deeper/theory/init.md @@ -36,7 +36,7 @@ From the graphic, and whats intuitive, you can see that regardless of the rotor' ## Definition of the field vectors -Now when talking about how to align different magnetic fields, what does it mean in practice and how do we characterise the force that actually makes the rotor move it is usual to introduce the field vectors. Basically the magnetic field vector by its length shows the strength of the magnetic field and its direction will be determined going from the north to south pole. It is very simple, here is a quick visualisation: +Now when talking about how to align different magnetic fields, what does it mean in practice and how do we characterize the force that actually makes the rotor move it is usual to introduce the field vectors. Basically the magnetic field vector by its length shows the strength of the magnetic field and its direction will be determined going from the north to south pole. It is very simple, here is a quick visualization: diff --git a/docs/simplefoc_library/examples/drv8302.md b/docs/simplefoc_library/examples/drv8302.md index 63f9c26..fc1020e 100644 --- a/docs/simplefoc_library/examples/drv8302.md +++ b/docs/simplefoc_library/examples/drv8302.md @@ -53,7 +53,7 @@ Here is an example of the connection scheme using the Arduino UNO:

-## Arudino code 3PWM +## Arduino code 3PWM The code to run the DRV8302 board with 3PWM is almost exactly the same as for the other low-power BLDC drivers. The only difference is the configuration procedure of the DRV8302. @@ -196,7 +196,7 @@ void loop() { // iterative setting FOC phase voltage motor.loopFOC(); - // iterative function setting the outer loop target + // iterative function setting the motor loop target // velocity, position or voltage // if target not set in parameter uses motor.target variable motor.move(); @@ -372,7 +372,7 @@ void loop() { // iterative setting FOC phase voltage motor.loopFOC(); - // iterative function setting the outer loop target + // iterative function setting the motor loop target // velocity, position or voltage // if target not set in parameter uses motor.target variable motor.move(); diff --git a/docs/simplefoc_library/examples/foc_pendulum.md b/docs/simplefoc_library/examples/foc_pendulum.md index 9b3de3e..6357ad6 100644 --- a/docs/simplefoc_library/examples/foc_pendulum.md +++ b/docs/simplefoc_library/examples/foc_pendulum.md @@ -156,7 +156,7 @@ Next we need to define the `BLDCDriver3PWM` class with the PWM pin numbers and t BLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11, 8); ``` -Then in the `setup()` we configure first the voltage of the power supply if it is not `12` Volts and intialise the driver. +Then in the `setup()` we configure first the voltage of the power supply if it is not `12` Volts and initialize the driver. ```cpp // power supply voltage // default 12V @@ -221,7 +221,7 @@ Also maybe interesting to say is that for a system like this one there is really #### Swing-up -The swingup implemented in this example is the simples one possible, that is always good, it means that the hardware is well designed so you dont need to make some fancy algorithm to make it work :D +The swingup implemented in this example is the simples one possible, that is always good, it means that the hardware is well designed so you don't need to make some fancy algorithm to make it work :D This is hte code of the swing-up: ```cpp @@ -233,7 +233,7 @@ The voltage value you are setting is something you will tune. I have found that #### The integration -Now we jsut need to decide when do we do the swing up and when do we do the stabilization. Basically we need to decide the angle from which we decide that it is not possible to recover and we should proceed with the swing-up. +Now we just need to decide when do we do the swing up and when do we do the stabilization. Basically we need to decide the angle from which we decide that it is not possible to recover and we should proceed with the swing-up. I my case I have decided it is `0.5 radians`, `~30degrees`. So the full control algorithm code looks like this: diff --git a/docs/simplefoc_library/examples/haptics.md b/docs/simplefoc_library/examples/haptics.md index 60ec3e2..011dde3 100644 --- a/docs/simplefoc_library/examples/haptics.md +++ b/docs/simplefoc_library/examples/haptics.md @@ -67,7 +67,7 @@ MagneticSensorI2C sensor2 = MagneticSensorI2C(0x36, 12, 0x0E, 4); void setup() { - // initialise encoder hardware + // initialize encoder hardware encoder1.init(); // interrupt initialization PciManager.registerListener(&listenerA); @@ -83,12 +83,12 @@ void setup() { // set control loop type to be used motor1.controller = MotionControlType::torque; - // initialise motor + // initialize motor motor1.init(); // align encoder and start FOC motor1.initFOC(); - // initialise magnetic sensor hardware + // initialize magnetic sensor hardware sensor2.init(); // link the motor to the sensor motor2.linkSensor(&sensor2); @@ -98,7 +98,7 @@ void setup() { motor2.linkDriver(&driver2); // set control loop type to be used motor2.controller = MotionControlType::torque; - // initialise motor + // initialize motor motor2.init(); // align encoder and start FOC motor2.initFOC(); @@ -155,7 +155,7 @@ void doB2(){encoder2.handleB();} void setup() { - // initialise encoder hardware + // initialize encoder hardware encoder1.init(); encoder1.enableInterrupts(doA1,doB1); @@ -202,7 +202,7 @@ This control strategy basically says that the target velocity of the `motor2` wi Constant `5` is the scaling gain with the same role as in the previous example. It will just make the `motor1` be more or less responsive while following the `motor2` velocity and it will want to maintain the difference in 0. -Constant `10` is a bit different. It is a scaling factor which helps to better map velocity to the positon. For example in the example we are using the `motor2` has maximal velocity of `60rad/s`, but we don't want our gauge to rotate 10 rotations to show this velocity. we would like it to rotate maximally 1 rotation `~6rad` therefore the constant `10`. But in your case maybe you will be running a drone motor, which turns with thousands of RPM and you might want to have even larger scaling 100 or even a 1000. +Constant `10` is a bit different. It is a scaling factor which helps to better map velocity to the position. For example in the example we are using the `motor2` has maximal velocity of `60rad/s`, but we don't want our gauge to rotate 10 rotations to show this velocity. we would like it to rotate maximally 1 rotation `~6rad` therefore the constant `10`. But in your case maybe you will be running a drone motor, which turns with thousands of RPM and you might want to have even larger scaling 100 or even a 1000. On the other hand, maybe you will want to have a very precise slow moving motor which will go under 1 radian/s. And you will want to go to the values of `~0.1` or even less. Therefore this will depend on your application and the precisions you will need to have. @@ -227,7 +227,7 @@ void doB2(){encoder2.handleB();} void setup() { - // initialise encoder hardware + // initialize encoder hardware encoder1.init(); encoder1.enableInterrupts(doA1,doB1); @@ -258,7 +258,7 @@ void setup() { motor1.useMonitoring(Serial); motor2.useMonitoring(Serial); - // initialise motor + // initialize motor motor1.init(); motor2.init(); // align encoder and start FOC @@ -275,7 +275,7 @@ void loop() { motor1.loopFOC(); motor2.loopFOC(); - // iterative function setting the outter loop target + // iterative function setting the outer loop target motor1.move(5*(motor2.shaft_velocity/10 - motor1.shaft_angle)); motor2.move(10*dead_zone(motor1.shaft_angle)); diff --git a/docs/simplefoc_library/examples/position_control_example.md b/docs/simplefoc_library/examples/position_control_example.md index 0466044..f58a122 100644 --- a/docs/simplefoc_library/examples/position_control_example.md +++ b/docs/simplefoc_library/examples/position_control_example.md @@ -240,7 +240,7 @@ void loop() { // iterative FOC function motor.loopFOC(); - // function calculating the outer position loop and setting the target position + // function calculating the motor position loop and setting the target position motor.move(target_angle); // user communication diff --git a/docs/simplefoc_library/examples/position_control_example_mini.md b/docs/simplefoc_library/examples/position_control_example_mini.md index 1c0a262..1ff33ae 100644 --- a/docs/simplefoc_library/examples/position_control_example_mini.md +++ b/docs/simplefoc_library/examples/position_control_example_mini.md @@ -309,7 +309,7 @@ void loop() { // iterative FOC function motor.loopFOC(); - // function calculating the outer position loop and setting the target position + // function calculating the motor position loop and setting the target position motor.move(); // commander interface with the user @@ -398,7 +398,7 @@ void loop() { // iterative FOC function motor.loopFOC(); - // function calculating the outer position loop and setting the target position + // function calculating the motor position loop and setting the target position motor.move(); // commander interface with the user diff --git a/docs/simplefoc_library/examples/position_control_example_mini_nucleo.md b/docs/simplefoc_library/examples/position_control_example_mini_nucleo.md index 2b831dd..cd0b715 100644 --- a/docs/simplefoc_library/examples/position_control_example_mini_nucleo.md +++ b/docs/simplefoc_library/examples/position_control_example_mini_nucleo.md @@ -289,7 +289,7 @@ void loop() { // iterative FOC function motor.loopFOC(); - // function calculating the outer position loop and setting the target position + // function calculating the motor position loop and setting the target position motor.move(); // commander interface with the user @@ -379,7 +379,7 @@ void loop() { // iterative FOC function motor.loopFOC(); - // function calculating the outer position loop and setting the target position + // function calculating the motor position loop and setting the target position motor.move(); // commander interface with the user diff --git a/docs/simplefoc_library/examples/position_control_example_nucleo.md b/docs/simplefoc_library/examples/position_control_example_nucleo.md index 9e22d9f..c099e83 100644 --- a/docs/simplefoc_library/examples/position_control_example_nucleo.md +++ b/docs/simplefoc_library/examples/position_control_example_nucleo.md @@ -88,7 +88,7 @@ Then in the `setup()` we configure first the voltage of the power supply if it i // default 12V driver.voltage_power_supply = 12; driver.init(); -```oltage_power_supply = 12; +```voltage_power_supply = 12; ``` Next thing we can change is the index search velocity: ```cpp diff --git a/docs/simplefoc_library/examples/sensorless_example_nucleo.md b/docs/simplefoc_library/examples/sensorless_example_nucleo.md index 6b3262c..7cb5b09 100644 --- a/docs/simplefoc_library/examples/sensorless_example_nucleo.md +++ b/docs/simplefoc_library/examples/sensorless_example_nucleo.md @@ -121,7 +121,7 @@ void setup() { current_sense.init(); motor.linkCurrentSense(¤t_sense); - // initialise motor + // initialize motor motor.init(); // find the motor parameters @@ -227,7 +227,7 @@ void setup() { current_sense.init(); motor.linkCurrentSense(¤t_sense); - // initialise motor + // initialize motor motor.init(); // skip the sensor alignment motor.sensor_direction= Direction::CW; @@ -249,7 +249,7 @@ void loop() { // iterative setting FOC phase voltage motor.loopFOC(); - // iterative function setting the outter loop target + // iterative function setting the outer loop target motor.move(); // motor monitoring diff --git a/docs/simplefoc_library/examples/stepper_control_nucleo.md b/docs/simplefoc_library/examples/stepper_control_nucleo.md index 1515d81..d6c0f34 100644 --- a/docs/simplefoc_library/examples/stepper_control_nucleo.md +++ b/docs/simplefoc_library/examples/stepper_control_nucleo.md @@ -104,7 +104,7 @@ void setup() { // comment out if not needed motor.useMonitoring(Serial); - // initialise motor + // initialize motor motor.init(); // align encoder and start FOC motor.initFOC(); @@ -126,9 +126,9 @@ void loop() { // iterative setting FOC phase voltage motor.loopFOC(); - // iterative function setting the outter loop target + // iterative function setting the outer loop target // velocity, position or voltage - // if tatget not set in parameter uses motor.target variable + // if target not set in parameter uses motor.target variable motor.move(); // user communication diff --git a/docs/simplefoc_library/examples/stepper_control_shield.md b/docs/simplefoc_library/examples/stepper_control_shield.md index 8c45ee6..658d538 100644 --- a/docs/simplefoc_library/examples/stepper_control_shield.md +++ b/docs/simplefoc_library/examples/stepper_control_shield.md @@ -28,7 +28,7 @@ Here is an example of the connection scheme using the SimpleFOCShield and Nucleo ## Nema 17 stepper motor connection using 3 phases -As nema 17 steppers have 2 phases and 4 wires, we need to transform them to 3 phases to connect them to the SimpleFOCShiled. So we will connect one wire from each phase to the shield spearately and the third wire of each phase will be connected together to the common phase. +As nema 17 steppers have 2 phases and 4 wires, we need to transform them to 3 phases to connect them to the SimpleFOCshield. So we will connect one wire from each phase to the shield separately and the third wire of each phase will be connected together to the common phase. Pin | Nema 17 wire | Shield phase --- | --- | --- @@ -163,7 +163,7 @@ void setup() { current_sense.init(); motor.linkCurrentSense(¤t_sense); - // initialise motor + // initialize motor motor.init(); // align encoder and start FOC motor.initFOC(); @@ -182,7 +182,7 @@ void loop() { // iterative setting FOC phase voltage motor.loopFOC(); - // iterative function setting the outter loop target + // iterative function setting the outer loop target motor.move(); // motor monitoring diff --git a/docs/simplefoc_library/hardware/drivers/BLDC_drivers.md b/docs/simplefoc_library/hardware/drivers/BLDC_drivers.md index 3717383..71eeede 100644 --- a/docs/simplefoc_library/hardware/drivers/BLDC_drivers.md +++ b/docs/simplefoc_library/hardware/drivers/BLDC_drivers.md @@ -62,7 +62,7 @@ Examples | Description | Specifications | Link | Price ---- | ---- | ---- | --- [](https://fr.aliexpress.com/item/4000126430773.html?spm=a2g0o.productlist.0.0.702a312aXmzuUK&algo_pvid=50131a88-ac88-4755-bb71-978c07ec461e&algo_expid=50131a88-ac88-4755-bb71-978c07ec461e-5&btsid=0b0a119a15957548552557385e6f5e&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_)| DRV8302 driver | - DRV8302 chip
- 1 motor
- 45V/27A
- BEMF/current sensing
- fault protection| [Aliexpress](https://fr.aliexpress.com/item/4000126430773.html?spm=a2g0o.productlist.0.0.702a312aXmzuUK&algo_pvid=50131a88-ac88-4755-bb71-978c07ec461e&algo_expid=50131a88-ac88-4755-bb71-978c07ec461e-5&btsid=0b0a119a15957548552557385e6f5e&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_) | 30€ [](https://fr.aliexpress.com/item/4000203180955.html?spm=a2g0o.productlist.0.0.39871962xgolNI&algo_pvid=a86f85ad-3d0b-46cd-a05a-cb7c89e92c9e&algo_expid=a86f85ad-3d0b-46cd-a05a-cb7c89e92c9e-4&btsid=0b0a01f815957554085321097e9fdf&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_)| DRV8301 driver | - DRV8301 chip
- 1 motor
- 45V/27A
- BEMF/current sensing
- fault protection
- SPI configuration| [Aliexpress](https://fr.aliexpress.com/item/4000203180955.html?spm=a2g0o.productlist.0.0.39871962xgolNI&algo_pvid=a86f85ad-3d0b-46cd-a05a-cb7c89e92c9e&algo_expid=a86f85ad-3d0b-46cd-a05a-cb7c89e92c9e-4&btsid=0b0a01f815957554085321097e9fdf&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_) | 45€ -[](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)| B-G431B-ESC1 | - STM32G431CB chip
- On-board ST-LINK/V2-1
- 1 motor
- 30V/40A
- low-side current sensing
- fault protection | [STM webiste](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)
[Mouser](https://eu.mouser.com/ProductDetail/STMicroelectronics/B-G431B-ESC1/?qs=%2Fha2pyFaduj9HtQf9%2FgsBmvGqEl7EbEPOyTxg06xIidkuUIykXhpkA%3D%3D) | 16€ +[](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)| B-G431B-ESC1 | - STM32G431CB chip
- On-board ST-LINK/V2-1
- 1 motor
- 30V/40A
- low-side current sensing
- fault protection | [STM website](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)
[Mouser](https://eu.mouser.com/ProductDetail/STMicroelectronics/B-G431B-ESC1/?qs=%2Fha2pyFaduj9HtQf9%2FgsBmvGqEl7EbEPOyTxg06xIidkuUIykXhpkA%3D%3D) | 16€ [](https://www.infineon.com/cms/en/product/evaluation-boards/bldc-shield_ifx007t/)| Infineon
BLDC-SHIELD_IFX007T shield | - IFX007T half-bridges
- 1 motor
- 40V/30A
- BEMF/low-side current sensing
- fault protection | [Infineon](https://www.infineon.com/cms/en/product/evaluation-boards/bldc-shield_ifx007t/) | 40€ [](https://github.com/byDagor/Dagor-Brushless-Controller)| [@byDagor](https://github.com/byDagor)
Dagor Brushless Controller | - DRV8305 driver
- 1 motor
- 25V/40A
- Current sensing
- Integrated sensor
- Esp32 based
- fault protection | [simplefoc shop](https://simplefoc.com/shop)
alpha batch sold out | 40€ [](https://github.com/simplefoc/Arduino-SimpleFOC-PowerShield)| Arduino
SimpleFOCPowerShield | - BTN8982 half-bridges
- 1 motor
- 40V/30A
- fault protection
Release v1:
- In-line current sensing
- I2C/Hall/Encoder pullups*
- 2x Stackable* | [fabricate](https://github.com/simplefoc/Arduino-SimpleFOC-PowerShield) | ~20€ diff --git a/docs/simplefoc_library/hardware/drivers/stepper_drivers.md b/docs/simplefoc_library/hardware/drivers/stepper_drivers.md index 331b7bb..90e2b37 100644 --- a/docs/simplefoc_library/hardware/drivers/stepper_drivers.md +++ b/docs/simplefoc_library/hardware/drivers/stepper_drivers.md @@ -40,7 +40,7 @@ Examples | Description | Specifications | Link | Price Examples | Description | Specifications | Link | Price ---- | ---- | ---- | --- [](https://fr.aliexpress.com/item/1005002994341057.html?spm=a2g0o.productlist.0.0.6b7c1dc3oF0O7M&algo_pvid=211a8bd5-fe47-4797-aab2-afb283ded43b&algo_exp_id=211a8bd5-fe47-4797-aab2-afb283ded43b-37&pdp_ext_f=%7B%22sku_id%22%3A%2212000023120630182%22%7D)| Misfit Smart Stepper| - samd21 mcu
- A4954 driver chip
- Easy install om NEMA17
- AS5047A sensor integrated
- 1 motor
- 8V-32V
- 2A | [AliExpress](https://fr.aliexpress.com/item/1005002994341057.html?spm=a2g0o.productlist.0.0.6b7c1dc3oF0O7M&algo_pvid=211a8bd5-fe47-4797-aab2-afb283ded43b&algo_exp_id=211a8bd5-fe47-4797-aab2-afb283ded43b-37&pdp_ext_f=%7B%22sku_id%22%3A%2212000023120630182%22%7D)
[MisfitTech](https://misfittech.net/nema-17-smart-stepper/) | 20-40€ -[](https://fr.aliexpress.com/wholesale?catId=0&initiative_id=SB_20211004101249&SearchText=BIGTREETECH+S42B)| BIGTREETECH S42B | - stm32 mcu
- 2x A4950 driver chips
- Easy install om NEMA17
- TLE5012 sensor integrated
- 1 motor
- 12V-24V
- 2A
[see comunity post](https://community.simplefoc.com/t/running-simplefoc-on-a-bigtreetech-s42b/736) | [AliExpress](https://fr.aliexpress.com/wholesale?catId=0&initiative_id=SB_20211004101249&SearchText=BIGTREETECH+S42B)
[Amazon](https://www.amazon.fr/BIGTREETECH-commande-emp%C3%AAche-limpression-multiples/dp/B08JLN4PJR/ref=sr_1_5?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=BIGTREETECH+S42B&qid=1633371175&qsid=259-6486797-8245010&sr=8-5&sres=B08JLN4PJR%2CB0991B8ZRL%2CB0882QGFZR%2CB07WC71M4R%2CB08182XHZZ%2CB091M7MDS3%2CB08BR7WMS7%2CB08VRM44Z2%2CB097Y5N5KG%2CB07WPY4979%2CB07TJWSV51%2CB089SPPGKJ%2CB08N6C9XCL%2CB08FHM91F2%2CB08B67DHWZ%2CB08ZSD3QBP%2CB08B1G8W39%2CB097RBJ3YR%2CB07W1Q42KK%2CB08VS8PJX7) | 20-40€ +[](https://fr.aliexpress.com/wholesale?catId=0&initiative_id=SB_20211004101249&SearchText=BIGTREETECH+S42B)| BIGTREETECH S42B | - stm32 mcu
- 2x A4950 driver chips
- Easy install om NEMA17
- TLE5012 sensor integrated
- 1 motor
- 12V-24V
- 2A
[see community post](https://community.simplefoc.com/t/running-simplefoc-on-a-bigtreetech-s42b/736) | [AliExpress](https://fr.aliexpress.com/wholesale?catId=0&initiative_id=SB_20211004101249&SearchText=BIGTREETECH+S42B)
[Amazon](https://www.amazon.fr/BIGTREETECH-commande-emp%C3%AAche-limpression-multiples/dp/B08JLN4PJR/ref=sr_1_5?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=BIGTREETECH+S42B&qid=1633371175&qsid=259-6486797-8245010&sr=8-5&sres=B08JLN4PJR%2CB0991B8ZRL%2CB0882QGFZR%2CB07WC71M4R%2CB08182XHZZ%2CB091M7MDS3%2CB08BR7WMS7%2CB08VRM44Z2%2CB097Y5N5KG%2CB07WPY4979%2CB07TJWSV51%2CB089SPPGKJ%2CB08N6C9XCL%2CB08FHM91F2%2CB08B67DHWZ%2CB08ZSD3QBP%2CB08B1G8W39%2CB097RBJ3YR%2CB07W1Q42KK%2CB08VS8PJX7) | 20-40€ Alternatively, you can use two DC motor driver boards, one for each phase of the motor. Here are some examples: diff --git a/docs/simplefoc_library/hardware/mcus/arduinos.md b/docs/simplefoc_library/hardware/mcus/arduinos.md index 46c9e90..5f96486 100644 --- a/docs/simplefoc_library/hardware/mcus/arduinos.md +++ b/docs/simplefoc_library/hardware/mcus/arduinos.md @@ -20,7 +20,7 @@ This table shows the 8-bit Arduino supported features. Basically everything exce Board | Name | Specifications | Link | Price ---- | --- | --- | --- | --- | --- -[](https://store.arduino.cc/arduino-uno-rev3-smd) | Arduino UNO | ATMega328
- 5V logic
- 6 PWMs
- 2 interrupts
- 16Mhz| [Ebay](https://www.ebay.com/itm/NEW-Arduino-UNO-R3-ATMEGA328P-CH340G-Microcontroller-Board-Bootloader-USB/323962801627?hash=item4b6db00ddb:g:ihUAAOSwLc1dNWCd)
[Arudino Store](https://store.arduino.cc/arduino-uno-rev3-smd) | 5€
25€ +[](https://store.arduino.cc/arduino-uno-rev3-smd) | Arduino UNO | ATMega328
- 5V logic
- 6 PWMs
- 2 interrupts
- 16Mhz| [Ebay](https://www.ebay.com/itm/NEW-Arduino-UNO-R3-ATMEGA328P-CH340G-Microcontroller-Board-Bootloader-USB/323962801627?hash=item4b6db00ddb:g:ihUAAOSwLc1dNWCd)
[Arduino Store](https://store.arduino.cc/arduino-uno-rev3-smd) | 5€
25€ [](https://store.arduino.cc/arduino-mega-2560-rev3) | Arduino Mega | ATMega2560
- 5V logic
- 15 PWMs
- 6 interrupts
- 16Mhz | [Ebay](https://www.ebay.com/itm/MEGA-2560-R3-Development-Board-CH340G-ATMEGA-2560-Kit-USB-Cable-For-Arduino-New/253764643649?epid=25019988960&_trkparms=ispr%3D1&hash=item3b158d2b41:g:C44AAOSwomJapjfF&enc=AQAEAAACYIQvEcHUrT7nmUC3yY5qbPyaBN1nJEDYW8MyypsJPgXK3AqiNsU0sSphPu4g6Qid31UfuUmxbibd03S6nwGFOtPRQtA6b7fwyQa%2BlHjHz58lNHKPszpYYTTo0kkJEDqmhf4Wiz0dmrGPE5aFjKQswyzpK0%2FagGHK8e518kkvgI15vEk3BEXEnW%2BgpNypJKacwMKe1INf06jl%2BrC%2FW50ef2gL1FPUQyUq9fK4Rm4tPSr28E52usHYczBDbdMdghFUExt3Ge%2B0iSj4t%2BcsyM2NGC%2BjCDDA8FBe3W5K8wg80e2DQwtM1R8Bpxrt6qJdyWZWigo8m4dpWLS%2Brmys9YJWASnU6mnFZoy4SLPUBLFK560rONYnB7aPohtZNJ%2BjCJPDLOQISm6tmGZVF5fMNu6iLYwYG8WG7J3c7rGVeUiDnJdf%2Fz68BNLAvth%2FnSoI9w7Jau%2Fd19gx3WYQbxgipDAmxgrVhGYlPrEvTSqCLIno1u3W%2FTI7FhSpNW%2Bgzw94kG%2FFgR9ieLRyv9p0w%2BYY3rrJepqCtlCJNkKflPpj4WAcXxBHHaQLJOr2mr7E2wRdwTBstIdCtoMmIp%2BjTRJFApIoT7fnEEIcMZyfLvbQZtemIQKHxpuibWKjQZU99awWsbMBlE0SRWaxRhML5YGORIjmgbIUyFdy9fiWHDcRpoKQJPsV6N3HUkRg9yU9cZ0m5w4ywXpiv7vHA8JFZg7hy5INiPGWwcxTRabpanq%2FWCB%2Bb4AN6%2BFP4%2Bqes86XVNe0YemDM1cBQWiHHjGxAHbw8gWuCZvXoc7XsJE5lrmQTsB1%2F%2FG6&checksum=253764643649687cd36869924033b58b75e082ef568d)
[Arduino Store](https://store.arduino.cc/arduino-mega-2560-rev3) | 10€
35€ [](https://www.ebay.com/itm/Nano-V3-0-USB-ATmega328P-AU-16MHz-5V-CH340G-Micro-Controller-Board-For-Arduino/223471184608?hash=item3407ebaae0:g:-gMAAOSwdzBcpfIA) | Arduino NANO | ATMega328
-5V logic
- 6 PWMs
- 2 interrupts
- 16Mhz | [Ebay](https://www.ebay.com/itm/Nano-V3-0-USB-ATmega328P-AU-16MHz-5V-CH340G-Micro-Controller-Board-For-Arduino/223471184608?hash=item3407ebaae0:g:-gMAAOSwdzBcpfIA) | 3€ [](https://www.ebay.com/itm/273179578365?_trkparms=ispr%3D1&hash=item3f9ac58ffd:g:YfwAAOSwPHxa4ZlY&amdata=enc%3AAQAGAAACoPYe5NmHp%252B2JMhMi7yxGiTJkPrKr5t53CooMSQt2orsSlHY%252FYTip4QFVjNQrCEJt6hoLoNTcHEHwr8khbAFvff6C28MEXvk7mrnZA4pnppdXKQsL%252FE9Wh8pAUc3iWzm1VJuF%252FS5wNILaEU4f7M8nBd0QJTxlrqHLkH3pOz3U%252B3sQ8%252B0KzepjpsiVtDx8Mb3TzypIm%252FmlUEMVUVW2UTJUHVzzjFjTPCATEWPIB4zndeCTbYhRS%252B7liEL%252BVUmcgbVcIcyrRXDzBsVdgvAa91GftapFNDglXxkR%252Bp9iR1C68H9v5%252B2YcMo6jqYJFuxxUQNW19o3woxchbmhxAhx1iGBYe86d%252FyD%252FUKX8c0sdKPTDGbzEh1XInVUQTM1h%252B%252FiU8cevC1RlPYF7wk0TER7vrptfpP%252BN1QOo726q7kCLOP2raujcGnPDQ77VWTt5RVl1uaKgB4ir2fPSGmQp%252BPmtysS7YSj0MjXlEdh%252FLFkM%252FPNR6Ty1dIE1KKq0ky98Vzi5mbOsN7SmyzLPRCM5sb6ecB%252Ff4vhFnVCqdDzKcjssSAlZk5xA4bBKRPXL7KF3FB%252F1jDXsCTK%252B20YnLh4aL4d2MVYYzGlE7376p8OALxJPnP85C3dUCpqfXen%252BApo0qwcv2vaxJXLwAm5I9c92EDOqd7Uux%252BK2O8flq%252BqMnv747wbUi0M%252BSMiBu8oE41TsibPTuskN9iatKrvaSGClewOK7GWErvTdEA3XowqzP6yVd6ZnAqC%252BbH47zHhm6GengdbCxu5ls5YwinEgFtzI6YW4SdRpoaLHosmKFo291YEZlCoSwZ7PpMddXD%252FW8rBq647RjFSZGWhiU3AEC03N9H1mJGhbAkSkX4LH11VprxwYEkhVnIpDR7v0MGFgxdfr37i3eDxUw%253D%253D%7Campid%3APL_CLK%7Cclp%3A2334524) | Arduino Leonardo | ATMega32u4
-5V logic
- 7 PWMs
- 5 interrupts
- 16Mhz | [Arduino Store](https://store-usa.arduino.cc/products/arduino-leonardo-with-headers)
[Ebay](https://www.ebay.com/itm/273179578365?_trkparms=ispr%3D1&hash=item3f9ac58ffd:g:YfwAAOSwPHxa4ZlY&amdata=enc%3AAQAGAAACoPYe5NmHp%252B2JMhMi7yxGiTJkPrKr5t53CooMSQt2orsSlHY%252FYTip4QFVjNQrCEJt6hoLoNTcHEHwr8khbAFvff6C28MEXvk7mrnZA4pnppdXKQsL%252FE9Wh8pAUc3iWzm1VJuF%252FS5wNILaEU4f7M8nBd0QJTxlrqHLkH3pOz3U%252B3sQ8%252B0KzepjpsiVtDx8Mb3TzypIm%252FmlUEMVUVW2UTJUHVzzjFjTPCATEWPIB4zndeCTbYhRS%252B7liEL%252BVUmcgbVcIcyrRXDzBsVdgvAa91GftapFNDglXxkR%252Bp9iR1C68H9v5%252B2YcMo6jqYJFuxxUQNW19o3woxchbmhxAhx1iGBYe86d%252FyD%252FUKX8c0sdKPTDGbzEh1XInVUQTM1h%252B%252FiU8cevC1RlPYF7wk0TER7vrptfpP%252BN1QOo726q7kCLOP2raujcGnPDQ77VWTt5RVl1uaKgB4ir2fPSGmQp%252BPmtysS7YSj0MjXlEdh%252FLFkM%252FPNR6Ty1dIE1KKq0ky98Vzi5mbOsN7SmyzLPRCM5sb6ecB%252Ff4vhFnVCqdDzKcjssSAlZk5xA4bBKRPXL7KF3FB%252F1jDXsCTK%252B20YnLh4aL4d2MVYYzGlE7376p8OALxJPnP85C3dUCpqfXen%252BApo0qwcv2vaxJXLwAm5I9c92EDOqd7Uux%252BK2O8flq%252BqMnv747wbUi0M%252BSMiBu8oE41TsibPTuskN9iatKrvaSGClewOK7GWErvTdEA3XowqzP6yVd6ZnAqC%252BbH47zHhm6GengdbCxu5ls5YwinEgFtzI6YW4SdRpoaLHosmKFo291YEZlCoSwZ7PpMddXD%252FW8rBq647RjFSZGWhiU3AEC03N9H1mJGhbAkSkX4LH11VprxwYEkhVnIpDR7v0MGFgxdfr37i3eDxUw%253D%253D%7Campid%3APL_CLK%7Cclp%3A2334524) | 10€-20€ @@ -44,14 +44,14 @@ At this moment Arduino DUE does not support 6pwm mode. If you are interested in Board | Name | Specifications | Link | Price ---- | --- | --- | --- | --- | --- -[](https://store.arduino.cc/arduino-due) | Arduino DUE | ARM Cortex-M3
- 3.3V logic
- 12 PWMs
- nterrupts on all pins
- 12 analog inputs
- 84Mhz| [Ebay](https://www.ebay.com/itm/ARM-Cortex-M3-Control-Board-Module-DUE-R3-SAM3X8E-32-bit-Arduino-Without-Cable/113795035918?hash=item1a7eb6730e:g:7usAAOSws3ldD45r)
[Arudino Store](https://store.arduino.cc/arduino-due) | 15€
35€ +[](https://store.arduino.cc/arduino-due) | Arduino DUE | ARM Cortex-M3
- 3.3V logic
- 12 PWMs
- interrupt on all pins
- 12 analog inputs
- 84Mhz| [Ebay](https://www.ebay.com/itm/ARM-Cortex-M3-Control-Board-Module-DUE-R3-SAM3X8E-32-bit-Arduino-Without-Cable/113795035918?hash=item1a7eb6730e:g:7usAAOSws3ldD45r)
[Arduino Store](https://store.arduino.cc/arduino-due) | 15€
35€ Arduino SimpleFOClibrary will support ARM based Arduino DUE board as well! ## Arduino IDE support package In order to use the Arduino DUE in the Arduino IDE please install the Arduino DUE boards support package using Arduino IDE board manager. -# Arudino UNO R4 +# Arduino UNO R4 MCU | 2 PWM mode | 4PWM mode | 3 PWM mode | 6 PWM mode | pwm frequency config --- | --- |--- |--- |--- |--- @@ -62,7 +62,7 @@ At this moment Arduino UNO R4 does not support current sensing. If you are inter Board | Name | Specifications | Link | Price ---- | --- | --- | --- | --- | --- -[](https://store.arduino.cc/pages/uno-r4) | Arduino UNO R4 Minima | ARM Cortex-M4
- 5V logic
- 6 PWMs
- nterrupts on all pins
-6 analog inputs
- 48Mhz| [Arudino Store](https://store.arduino.cc/products/uno-r4-minima) | 18€ +[](https://store.arduino.cc/pages/uno-r4) | Arduino UNO R4 Minima | ARM Cortex-M4
- 5V logic
- 6 PWMs
- interrupt on all pins
-6 analog inputs
- 48Mhz| [Arduino Store](https://store.arduino.cc/products/uno-r4-minima) | 18€ ## Arduino IDE support package In order to use the Arduino UNO R4 in the Arduino IDE please install the corresponding support package using Arduino IDE board manager. \ No newline at end of file diff --git a/docs/simplefoc_library/hardware/mcus/esp32.md b/docs/simplefoc_library/hardware/mcus/esp32.md index e9f61dc..9cb0916 100644 --- a/docs/simplefoc_library/hardware/mcus/esp32.md +++ b/docs/simplefoc_library/hardware/mcus/esp32.md @@ -24,7 +24,7 @@ Esp32 devices are fully configurable using the SimpleSimpleFOClibrary. The `LEDC` driver is a simpler driver that is by default intended for LED control but can also be used for motor control. The `LEDC` driver is a lot les flexible than the `MCPWM` driver but SimpleFOClibrary supports it as well. By default the `MCPWM` driver is used on all other esp32 devices if available, if not the `LEDC` driver is used (ex. esp32-s2 and esp32-c3 devices). +Esp32 mcus have two different low-level drivers for PWM generation: `MCPWM` and `LEDC`. The `MCPWM` driver (**M**motor **C**control **PWM**) is a more advanced driver that allows more control over the PWM signals and is used by default in the SimpleFOClibrary. The `LEDC` driver is a simpler driver that is by default intended for LED control but can also be used for motor control. The `LEDC` driver is a lot les flexible than the `MCPWM` driver but SimpleFOClibrary supports it as well. By default the `MCPWM` driver is used on all other esp32 devices if available, if not the `LEDC` driver is used (ex. esp32-s2 and esp32-c3 devices). If you are using an esp32 device that supports the `MCPWM` driver and you want to use the `LEDC` driver, you can force the use of the `LEDC` driver by defining the `SIMPLEFOC_ESP32_USELEDC` build flag.

RULE OF THUMB: `MCPWM` vs `LEDC`

diff --git a/docs/simplefoc_library/hardware/mcus/rpi_pico.md b/docs/simplefoc_library/hardware/mcus/rpi_pico.md index 538f68a..3f99207 100644 --- a/docs/simplefoc_library/hardware/mcus/rpi_pico.md +++ b/docs/simplefoc_library/hardware/mcus/rpi_pico.md @@ -15,7 +15,7 @@ MCU | 2 PWM mode | 4 PWM mode | 3 PWM mode | 6 PWM mode | pwm frequency config --- | --- |--- |--- |--- |--- (RP2040) RPI Pico | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ -Arduino SimpleFOClibrary recently started supporting the Raspberry pi Pico board due to a lot of effort put in by [@runger1101001](https://github.com/runger1101001). The support is stil in its intial stage but most of the PWM related features are already implemented. +Arduino SimpleFOClibrary recently started supporting the Raspberry pi Pico board due to a lot of effort put in by [@runger1101001](https://github.com/runger1101001). The support is still in its initial stage but most of the PWM related features are already implemented. Board | Name | Specifications | Link | Price ---- | --- | --- | --- | --- | --- @@ -29,7 +29,7 @@ Raspberry Pi Pico's ADC features are not sufficient for low-side current sensing ## Arduino IDE support package In order to use the Pico boards in the Arduino IDE please install the Arduino MBED OS RP2040 boards support package using Arduino IDE board manager. -If using windows you might have to do a bit of acrobatics with the USB driver, but the soluion is reasonably fast and straingth forward. Here is [the link](https://arduino-pico.readthedocs.io/en/latest/install.html#uploading-sketches) with a bit of info how to do it. +If using windows you might have to do a bit of acrobatics with the USB driver, but the solution is reasonably fast and straight forward. Here is [the link](https://arduino-pico.readthedocs.io/en/latest/install.html#uploading-sketches) with a bit of info how to do it. Here is quick video showing how to do it: \ No newline at end of file diff --git a/docs/simplefoc_library/hardware/mcus/stm32.md b/docs/simplefoc_library/hardware/mcus/stm32.md index 1aa3a7c..8875376 100644 --- a/docs/simplefoc_library/hardware/mcus/stm32.md +++ b/docs/simplefoc_library/hardware/mcus/stm32.md @@ -45,7 +45,7 @@ There is a lot of stm32 based fully integrated boards for bldc motion control ou Board | Name | Specifications | Link | Price ---- | --- | --- | --- | --- | --- -[](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)| B-G431B-ESC1 | - STM32G431CB chip
- On-board ST-LINK/V2-1
- 1 motor
- 30V/40A
- current sensing
- fault protection | [STM webiste](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)
[Mouser](https://eu.mouser.com/ProductDetail/STMicroelectronics/B-G431B-ESC1/?qs=%2Fha2pyFaduj9HtQf9%2FgsBmvGqEl7EbEPOyTxg06xIidkuUIykXhpkA%3D%3D) | 16€ +[](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)| B-G431B-ESC1 | - STM32G431CB chip
- On-board ST-LINK/V2-1
- 1 motor
- 30V/40A
- current sensing
- fault protection | [STM website](https://www.st.com/en/evaluation-tools/b-g431b-esc1.html)
[Mouser](https://eu.mouser.com/ProductDetail/STMicroelectronics/B-G431B-ESC1/?qs=%2Fha2pyFaduj9HtQf9%2FgsBmvGqEl7EbEPOyTxg06xIidkuUIykXhpkA%3D%3D) | 16€ [](https://www.ebay.com/itm/Storm32-BGC-32Bit-3-Axis-Brushless-Gimbal-Controller-V1-32-DRV8313-Motor-Driver/174343022855?hash=item2897a76907:g:20YAAOSwbEhfBo28) | Storm32 BGC | - DRV8313
- 3 motors
- 50x50mm
- Stm32f103 | [Ebay](https://www.ebay.com/itm/Storm32-BGC-32Bit-3-Axis-Brushless-Gimbal-Controller-V1-32-DRV8313-Motor-Driver/174343022855?hash=item2897a76907:g:20YAAOSwbEhfBo28) | 25€ ## Arduino IDE support package diff --git a/docs/simplefoc_library/hardware/sensors.md b/docs/simplefoc_library/hardware/sensors.md index 696aa6b..2ebd469 100644 --- a/docs/simplefoc_library/hardware/sensors.md +++ b/docs/simplefoc_library/hardware/sensors.md @@ -26,7 +26,7 @@ Examples | Description | Link | Price ---- | ---- | ---- | ---- [](https://www.ebay.com/itm/360-600P-R-Photoelectric-Incremental-Rotary-Encoder-5V-24V-AB-Two-Phases-Shaft/254214673272?hash=item3b30601378:m:mDiuW1F2qXINSH51TqAjhTg) | Optical encoder
2400cpr | [Ebay](https://www.ebay.fr/itm/L6234-Breakout-Board-/153204519965) | 10$ [](https://www.ebay.com/itm/HMBGC-V2-0-3-Axle-Gimbal-Controller-Control-Plate-Board-Module-with-Sensor/351497840990?hash=item51d6e7695e:g:BAsAAOSw0QFXBxrZ:rk:1:pf:1) | Optical encoder
AMT103
configurable cpr 48-8192 | [Mouser](https://www.mouser.fr/ProductDetail/CUI-Devices/AMT103-V?qs=%2Fha2pyFaduiAsBlScvLoAWHUnKz39jAIpNPVt58AQ0PVb84dpbt53g%3D%3D) | 20$ -[](hhttps://www.mouser.fr/ProductDetail/ams/AS5X47U-TS_EK_AB?qs=sGAEpiMZZMve4%2FbfQkoj%252BBDLPCj82ZLyYIPEtADg0FE%3D) | Margetic encoder
AS5047U
16384cpr | [Mouser](https://www.mouser.fr/ProductDetail/ams/AS5X47U-TS_EK_AB?qs=sGAEpiMZZMve4%2FbfQkoj%252BBDLPCj82ZLyYIPEtADg0FE%3D)
[Youtube demo](https://www.youtube.com/watch?v=Gl-DiOqXXJ8) | 15$ +[](hhttps://www.mouser.fr/ProductDetail/ams/AS5X47U-TS_EK_AB?qs=sGAEpiMZZMve4%2FbfQkoj%252BBDLPCj82ZLyYIPEtADg0FE%3D) | Magnetic encoder
AS5047U
16384cpr | [Mouser](https://www.mouser.fr/ProductDetail/ams/AS5X47U-TS_EK_AB?qs=sGAEpiMZZMve4%2FbfQkoj%252BBDLPCj82ZLyYIPEtADg0FE%3D)
[Youtube demo](https://www.youtube.com/watch?v=Gl-DiOqXXJ8) | 15$ diff --git a/docs/simplefoc_library/hardware/setup_examples/arduino_l6234.md b/docs/simplefoc_library/hardware/setup_examples/arduino_l6234.md index 63e2f02..634649e 100644 --- a/docs/simplefoc_library/hardware/setup_examples/arduino_l6234.md +++ b/docs/simplefoc_library/hardware/setup_examples/arduino_l6234.md @@ -14,7 +14,7 @@ toc: true # Arduino UNO + L6234 driver [Drotek's L6234 breakout board](https://store-drotek.com/212-brushless-gimbal-controller-l6234.html) is a very minimalistic 3-phase BLDC motor driver and is very suitable for jump-starting your FOC experience. Here we show two example connections using this board and Arduino UNO: - [Arduino UNO + Drotek L6134 + Encoder](#encoder-example) -- [Arduino UNO + Drotek L6234 + Margentic sensor AS5048A](#magnetic-sensor-as5048-example) +- [Arduino UNO + Drotek L6234 + magnetic sensor AS5048A](#magnetic-sensor-as5048-example) ## Encoder example

diff --git a/docs/simplefoc_library/index.md b/docs/simplefoc_library/index.md index 625133e..cbfba56 100644 --- a/docs/simplefoc_library/index.md +++ b/docs/simplefoc_library/index.md @@ -80,7 +80,7 @@ BLDC Gimbal Motor -This video demonstrates SimpleFOClibrary support for high-performance BLDC drivers such as DRV8302 and the support for Arudino and STM32 MCU architectures. +This video demonstrates SimpleFOClibrary support for high-performance BLDC drivers such as DRV8302 and the support for Arduino and STM32 MCU architectures. **The video hardware setup consists of:**
MCU