Skip to content

Commit 040df53

Browse files
committed
DOCS removed a lot od typos
1 parent f86f54b commit 040df53

File tree

25 files changed

+221
-208
lines changed

25 files changed

+221
-208
lines changed

README.md

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,72 @@
11
# Arduino Simple Field Oriented Control (FOC) library
22

3-
43
![Library Compile](https://github.com/askuric/Arduino-FOC/workflows/Library%20Compile/badge.svg)
54
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
65
[![arduino-library-badge](https://www.ardu-badge.com/badge/Simple%20FOC.svg?)](https://www.ardu-badge.com/badge/Simple%20FOC.svg)
76

87
Proper low-cost and low-power FOC supporting boards are very hard to find these days and even may not exist. Even harder to find is a stable and simple FOC algorithm code capable of running on Arduino devices.
98
Therefore this is an attempt to:
10-
- Demistify FOC algorithm and make a robust but simple Arduino library: [Arduino SimpleFOC library](https://askuric.github.io/Arduino-FOC/arduino_simplefoc_library_showcase)
11-
- Develop a modular BLDCdriver boards: [Arduino SimpleFOC shield](https://askuric.github.io/Arduino-FOC/arduino_simplefoc_shield_showcase).
9+
- Demystify FOC algorithm and make a robust but simple Arduino library: [Arduino SimpleFOC library](https://askuric.github.io/Arduino-FOC/arduino_simplefoc_library_showcase)
10+
- Develop a modular BLDC driver board: [Arduino SimpleFOC shield](https://askuric.github.io/Arduino-FOC/arduino_simplefoc_shield_showcase).
11+
12+
## Arduino SimpleFOCShield
1213

13-
## Arduino SimpleFOC Shield
14-
<p align="center"><img src="https://askuric.github.io/Arduino-FOC/extras/Images/shield_to_v13.jpg" height="235px"> <img src="https://askuric.github.io/Arduino-FOC/extras/Images/shield_bo_v13.jpg" height="235px"> <img src="https://askuric.github.io/Arduino-FOC/extras/Images/simple_foc_shield_v13_small.gif" height="235px"></p>
14+
<p align="">
15+
<a href="https://youtu.be/G5pbo0C6ujE">
16+
<img src="https://askuric.github.io/Arduino-FOC/extras/Images/foc_shield_video.jpg" height="350px">
17+
</a>
18+
</p>
1519

1620
### Features
21+
1722
- **Plug & play**: Arduino <span class="simple">Simple<span class="foc">FOC</span>library</span>
1823
- **Low-cost**: Price in the range of \$20-\$40
1924
- **Open Source**: Gerber files and BOM available
2025
- **Stackable**: running 2 motors in the same time
26+
##### If you are interested in this board, preorder your version on this link: [Arduino Simple FOC Shield](https://askuric.github.io/simplefoc_shield_product)
27+
28+
<p align=""><img src="https://askuric.github.io/Arduino-FOC/extras/Images/shield_to_v13.jpg" height="180px"> <img src="https://askuric.github.io/Arduino-FOC/extras/Images/shield_bo_v13.jpg" height="180px"> <img src="https://askuric.github.io/Arduino-FOC/extras/Images/simple_foc_shield_v13_small.gif" height="180x"></p>
2129

22-
##### If you are interested in this board, find more information on this link: [Arduino Simple FOC Shield](https://askuric.github.io/simplefoc.html)
2330

2431
## Arduino SimpleFOClibrary
25-
[![](https://askuric.github.io/Arduino-FOC/extras/Images/youtube.png)](https://youtu.be/N_fRYf7Z80k)
2632

27-
This video demonstrates the Simple FOC library basic usage, electronic connections and shows its capabilities.
33+
<p align="">
34+
<a href="https://youtu.be/N_fRYf7Z80k">
35+
<img src="https://askuric.github.io/Arduino-FOC/extras/Images/youtube.png" height="350px">
36+
</a>
37+
</p>
2838

39+
This video demonstrates the Simple FOC library basic usage, electronic connections and shows its capabilities.
2940

3041
### Features
31-
- **Arduino compatibe**: Arduino library code
42+
- **Arduino compatible**: Arduino library code
3243
- **Easy to setup and configure**:
3344
- Easy hardware configuration
3445
- Easy [tuning the control loops](https://askuric.github.io/Arduino-FOC/control_loops)
3546
- **Modular**:
3647
- Supports as many [sensors , BLDC motors and driver boards](https://askuric.github.io/Arduino-FOC/electrical_connections) as possible
37-
- Supports as many applicaiton requirements as possible
48+
- Supports as many application requirements as possible
3849
- **Plug & play**: Arduino SimpleFOC shield
3950

51+
<p align=""> <img src="https://askuric.github.io/Arduino-FOC/extras/Images/uno_l6234.jpg" height="170px"> <img src="https://askuric.github.io/Arduino-FOC/extras/Images/hmbgc_v22.jpg" height="170px"> <img src="https://askuric.github.io/Arduino-FOC/extras/Images/foc_shield_v12.jpg" height="170px"></p>
52+
4053
## Getting Started
4154
Depending on if you want to use this library as the plug and play Arduino library or you want to get insight in the algorithm and make changes there are two ways to install this code.
4255

4356
- Full library installation [Docs](https://askuric.github.io/Arduino-FOC/library_download)
44-
- Minimal code instalation [Docs](https://askuric.github.io/Arduino-FOC/minimal_download)
57+
- Minimal code installation [Docs](https://askuric.github.io/Arduino-FOC/minimal_download)
4558

4659
### Arduino SimpleFOC library installation to Arduino IDE
4760
#### Arduino Library Manager
48-
The simplest way to get hold of the library is direclty by using Arduino IDE and its integrated Library Manager.
61+
The simplest way to get hold of the library is directly by using Arduino IDE and its integrated Library Manager.
4962
- Open Arduino IDE and start Arduino Library Manager by clicking: `Tools > Manage Libraries...`.
50-
- Serarch for `Simple FOC` library and install the lates version.
63+
- Search for `Simple FOC` library and install the latest version.
5164
- Reopen Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.
5265

5366
### Using Github website
5467
- Go to the [github repository](https://github.com/askuric/Arduino-FOC)
5568
- Click first on `Clone or Download > Download ZIP`.
56-
- Unzip it and place it in `Arduino Libraries` forlder. Windows: `Documents > Arduino > libraries`.
69+
- Unzip it and place it in `Arduino Libraries` folder. Windows: `Documents > Arduino > libraries`.
5770
- Reopen Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.
5871

5972
### Using terminal
@@ -64,15 +77,15 @@ git clone https://github.com/askuric/Arduino-FOC.git
6477
```
6578
- Reopen Arduino IDE and you should have the library examples in `File > Examples > Simple FOC`.
6679

67-
### SimpleFOC library minimal scketch example
80+
### SimpleFOC library minimal sketch example
6881

6982
For those willing to experiment and to modify the code I suggest using the [minimal version](https://github.com/askuric/Arduino-FOC/tree/minimal) of the code.
70-
> This code is completely indepenedet and you can run it as any other Arduino Schetch without the need for any libraries.
83+
> This code is completely independent and you can run it as any other Arduino Sketch without the need for any libraries.
7184
72-
#### Github webiste downlaod
85+
#### Github website download
7386
- Go to [minimal branch](https://github.com/askuric/Arduino-FOC/tree/minimal)
74-
- Downlaod the code by clicking on the `Clone or Download > Download ZIP`.
75-
- Unzip it and open the schetch in Arduino IDE.
87+
- Download the code by clicking on the `Clone or Download > Download ZIP`.
88+
- Unzip it and open the sketch in Arduino IDE.
7689

7790
#### Using terminal
7891
- Open the terminal:
@@ -90,5 +103,5 @@ Find out more information about the Arduino SimpleFOC project in [docs website](
90103
Branch | Description | Status
91104
------------ | ------------- | ------------
92105
[master](https://github.com/askuric/Arduino-FOC) | Stable and tested library version | ![Library Compile](https://github.com/askuric/Arduino-FOC/workflows/Library%20Compile/badge.svg)
93-
[dev](https://github.com/askuric/Arduino-FOC/tree/dev) | Developement library version | ![Library Dev Compile](https://github.com/askuric/Arduino-FOC/workflows/Library%20Dev%20Compile/badge.svg?branch=dev)
106+
[dev](https://github.com/askuric/Arduino-FOC/tree/dev) | Development library version | ![Library Dev Compile](https://github.com/askuric/Arduino-FOC/workflows/Library%20Dev%20Compile/badge.svg?branch=dev)
94107
[minimal](https://github.com/askuric/Arduino-FOC/tree/minimal) | Minimal Arduino example with integrated library | ![MinimalBuild](https://github.com/askuric/Arduino-FOC/workflows/MinimalBuild/badge.svg?branch=minimal)

examples/encoder_examples/HMBGC_example/HMBGC_example.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BLDCMotor motor = BLDCMotor(9, 10, 11, 11);
1414
// - ppr - impulses per rotation (cpr=ppr*4)
1515
// - index pin - (optional input)
1616
Encoder encoder = Encoder(A0, A1, 8192);
17-
// interrupt ruotine intialisation
17+
// interrupt routine intialisation
1818
void doA(){encoder.handleA();}
1919
void doB(){encoder.handleB();}
2020

@@ -30,14 +30,14 @@ void setup() {
3030
encoder.quadrature = Quadrature::ENABLE;
3131

3232
// check if you need internal pullups
33-
// Pullup::EXTERN - external pullup added - dafault
33+
// Pullup::EXTERN - external pullup added - default
3434
// Pullup::INTERN - needs internal arduino pullup
3535
encoder.pullup = Pullup::EXTERN;
3636

3737
// initialise encoder hardware
3838
encoder.init();
3939

40-
// interrupt intitialisation
40+
// interrupt initialization
4141
PciManager.registerListener(&listenerA);
4242
PciManager.registerListener(&listenerB);
4343

@@ -56,7 +56,7 @@ void setup() {
5656
// default P=0.5 I = 10
5757
motor.PI_velocity.P = 0.2;
5858
motor.PI_velocity.I = 20;
59-
//defualt voltage_power_supply/2
59+
//default voltage_power_supply/2
6060
motor.PI_velocity.voltage_limit = 6;
6161
// jerk control using voltage voltage ramp
6262
// default value is 300 volts per sec ~ 0.3V per millisecond
@@ -74,7 +74,7 @@ void setup() {
7474
// link the motor to the sensor
7575
motor.linkSensor(&encoder);
7676

77-
// intialise motor
77+
// initialize motor
7878
motor.init();
7979
// align encoder and start FOC
8080
motor.initFOC();
@@ -88,18 +88,18 @@ float target_velocity=0;
8888

8989
void loop() {
9090
// iterative state calculation calculating angle
91-
// and setting FOC pahse voltage
92-
// the faster you run this funciton the better
91+
// and setting FOC phase voltage
92+
// the faster you run this function the better
9393
// in arduino loop it should have ~1kHz
9494
// the best would be to be in ~10kHz range
9595
motor.loopFOC();
9696

97-
// 0.5 hertz sine weve
97+
// 0.5 hertz sine wave
9898
//target_velocity = sin( micros()*1e-6 *2*M_PI * 0.5 );
9999

100100
// iterative function setting the outter loop target
101101
// velocity, position or voltage
102-
// this funciton can be run at much lower frequency than loopFOC funciton
102+
// this function can be run at much lower frequency than loopFOC function
103103
// it can go as low as ~50Hz
104104
motor.move(target_velocity);
105105

examples/encoder_examples/angle_control/angle_control.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ BLDCMotor motor = BLDCMotor(9, 5, 6, 11, 8);
1818
// - index pin - (optional input)
1919
Encoder encoder = Encoder(arduinoInt1, arduinoInt2, 8192, A0);
2020

21-
// Interrupt rutine intialisation
21+
// Interrupt routine intialisation
2222
// channel A and B callbacks
2323
void doA(){encoder.handleA();}
2424
void doB(){encoder.handleB();}
@@ -37,7 +37,7 @@ void setup() {
3737
encoder.quadrature = Quadrature::ENABLE;
3838

3939
// check if you need internal pullups
40-
// Pullup::EXTERN - external pullup added - dafault
40+
// Pullup::EXTERN - external pullup added - default
4141
// Pullup::INTERN - needs internal arduino pullup
4242
encoder.pullup = Pullup::EXTERN;
4343

@@ -74,7 +74,7 @@ void setup() {
7474
// default P=0.5 I = 10
7575
motor.PI_velocity.P = 0.2;
7676
motor.PI_velocity.I = 20;
77-
//defualt voltage_power_supply/2
77+
//default voltage_power_supply/2
7878
motor.PI_velocity.voltage_limit = 6;
7979
// jerk control using voltage voltage ramp
8080
// default value is 300 volts per sec ~ 0.3V per millisecond
@@ -88,7 +88,7 @@ void setup() {
8888
// angle P controller
8989
// default P=20
9090
motor.P_angle.P = 20;
91-
// maximal velocity of the poisiiton control
91+
// maximal velocity of the position control
9292
// default 20
9393
motor.P_angle.velocity_limit = 4;
9494

@@ -100,7 +100,7 @@ void setup() {
100100
// link the motor to the sensor
101101
motor.linkSensor(&encoder);
102102

103-
// intialise motor
103+
// initialize motor
104104
motor.init();
105105
// align encoder and start FOC
106106
motor.initFOC();
@@ -116,15 +116,15 @@ float target_angle = 0;
116116

117117
void loop() {
118118
// iterative state calculation calculating angle
119-
// and setting FOC pahse voltage
120-
// the faster you run this funciton the better
119+
// and setting FOC phase voltage
120+
// the faster you run this function the better
121121
// in arduino loop it should have ~1kHz
122122
// the best would be to be in ~10kHz range
123123
motor.loopFOC();
124124

125125
// iterative function setting the outter loop target
126126
// velocity, position or voltage
127-
// this funciton can be run at much lower frequency than loopFOC funciton
127+
// this function can be run at much lower frequency than loopFOC function
128128
// it can go as low as ~50Hz
129129
motor.move(target_angle);
130130

examples/encoder_examples/change_direction/change_direction.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BLDCMotor motor = BLDCMotor(9, 5, 6, 11, 8);
1515
// - index pin - (optional input)
1616
Encoder encoder = Encoder(arduinoInt1, arduinoInt2, 8192);
1717

18-
// Interrupt rutine intialisation
18+
// Interrupt routine intialisation
1919
// channel A and B callbacks
2020
void doA(){encoder.handleA();}
2121
void doB(){encoder.handleB();}
@@ -30,7 +30,7 @@ void setup() {
3030
encoder.quadrature = Quadrature::ENABLE;
3131

3232
// check if you need internal pullups
33-
// Pullup::EXTERN - external pullup added - dafault
33+
// Pullup::EXTERN - external pullup added - default
3434
// Pullup::INTERN - needs internal arduino pullup
3535
encoder.pullup = Pullup::EXTERN;
3636

@@ -65,7 +65,7 @@ void setup() {
6565
// default P=0.5 I = 10
6666
motor.PI_velocity.P = 0.2;
6767
motor.PI_velocity.I = 20;
68-
//defualt voltage_power_supply/2
68+
//default voltage_power_supply/2
6969
motor.PI_velocity.voltage_limit = 6;
7070
// jerk control using voltage voltage ramp
7171
// default value is 300 volts per sec ~ 0.3V per millisecond
@@ -82,7 +82,7 @@ void setup() {
8282

8383
// link the motor to the sensor
8484
motor.linkSensor(&encoder);
85-
// intialise motor
85+
// initialise motor
8686
motor.init();
8787
// align encoder and start FOC
8888
motor.initFOC();
@@ -98,13 +98,13 @@ int t = 0;
9898

9999
void loop() {
100100
// iterative state calculation calculating angle
101-
// and setting FOC pahse voltage
102-
// the faster you run this funciton the better
101+
// and setting FOC phase voltage
102+
// the faster you run this function the better
103103
// in arduino loop it should have ~1kHz
104104
// the best would be to be in ~10kHz range
105105
motor.loopFOC();
106106

107-
// direction chnaging logic
107+
// direction changing logic
108108
// change direction each 1000 loop passes
109109
target_velocity *= (t >= 1000) ? -1 : 1;
110110
// loop passes counter
@@ -113,7 +113,7 @@ void loop() {
113113

114114
// iterative function setting the outter loop target
115115
// velocity, position or voltage
116-
// this funciton can be run at much lower frequency than loopFOC funciton
116+
// this function can be run at much lower frequency than loopFOC function
117117
// it can go as low as ~50Hz
118118
motor.move(target_velocity);
119119

examples/encoder_examples/encoder_example/encoder_example.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define arduinoInt2 3 // Arduino UNO interrupt 1
66

77
Encoder encoder = Encoder(arduinoInt1, arduinoInt2, 8192);
8-
// interrupt ruotine intialisation
8+
// interrupt routine intialisation
99
void doA(){encoder.handleA();}
1010
void doB(){encoder.handleB();}
1111

@@ -19,7 +19,7 @@ void setup() {
1919
encoder.quadrature = Quadrature::ENABLE;
2020

2121
// check if you need internal pullups
22-
// Pullup::EXTERN - external pullup added - dafault
22+
// Pullup::EXTERN - external pullup added - default
2323
// Pullup::INTERN - needs internal arduino pullup
2424
encoder.pullup = Pullup::EXTERN;
2525

examples/encoder_examples/find_pole_pairs_number/find_pole_pairs_number.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
BLDCMotor motor = BLDCMotor(9, 10, 11, 0, 8);
1010
// Encoder(int encA, int encB , int cpr, int index)
1111
Encoder encoder = Encoder(arduinoInt1, arduinoInt2, 8192);
12-
// interrupt ruotine intialisation
12+
// interrupt routine intialisation
1313
void doA(){encoder.handleA();}
1414
void doB(){encoder.handleB();}
1515

@@ -23,7 +23,7 @@ void setup() {
2323
encoder.quadrature = Quadrature::ENABLE;
2424

2525
// check if you need internal pullups
26-
// Pullup::EXTERN - external pullup added - dafault
26+
// Pullup::EXTERN - external pullup added - default
2727
// Pullup::INTERN - needs internal arduino pullup
2828
encoder.pullup = Pullup::EXTERN;
2929

@@ -41,7 +41,7 @@ void setup() {
4141

4242
// link the motor to the sensor
4343
motor.linkSensor(&encoder);
44-
// intialise motor
44+
// initialize motor
4545
motor.init();
4646

4747

@@ -74,7 +74,7 @@ void setup() {
7474
motor.setPhaseVoltage(0,0);
7575
_delay(1000);
7676

77-
// caluclate the pole pair number
77+
// calculate the pole pair number
7878
int pp = round((pp_search_angle)/(angle_end-angle_begin));
7979

8080
Serial.print("Estimated pole pairs number is: ");
@@ -91,14 +91,14 @@ void setup() {
9191
// a bit of debugging the result
9292
if(pp <= 0 ){
9393
Serial.println("Pole pair number cannot be negative");
94-
Serial.println(" - Try changing the search_voltage vlaue or motor/encoder configuration.");
94+
Serial.println(" - Try changing the search_voltage value or motor/encoder configuration.");
9595
return;
9696
}else if(pp > 30){
9797
Serial.println("Pole pair number very high, possible error.");
9898
}else{
9999
Serial.println("If pp is estimated well your motor should turn now!");
100100
Serial.println(" - If it is not moving try to relaunch the program!");
101-
Serial.println(" - You can also try to adjust the target votage using serial terminal!");
101+
Serial.println(" - You can also try to adjust the target voltage using serial terminal!");
102102
}
103103

104104

0 commit comments

Comments
 (0)