Skip to content

Commit 7220a7e

Browse files
committed
FIX updated examples to use open loop control and updated readme
1 parent cfe8ce1 commit 7220a7e

File tree

17 files changed

+97
-54
lines changed

17 files changed

+97
-54
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@ Therefore this is an attempt to:
1111
- Develop a modular BLDC driver board: [Arduino *SimpleFOCShield*](https://docs.simplefoc.com/arduino_simplefoc_shield_showcase).
1212

1313

14-
> **DEV Features**<br>
14+
> ***SimpleFOClibrary* v1.6.0📢**<br>
1515
> - Teensy support by Christopher Parrott <br>
1616
> - Pull requests by [@cousinitt](https://github.com/cousinitt) - refactoring and c++11 improvements
17-
18-
<blockquote class="info"><p class="heading"><b>NEWS</b> 📢</p>New version of the Arduino <span class="simple">Simple<span class="foc">FOC</span>library</span> is out! (<a href="https://github.com/askuric/Arduino-FOC/releases">version 1.5.0 <i class="fa fa-tag"></i></a>) <br> <b>New features</b>:<ul><li> Open-loop motor control</li><li> Support Hall sensors</li><li> Support for Analog interface Magnetic sensor</li><li> New alignment procedure <br>- automatic sensor direction detection<br> - possibility to avoid alignment completely</li><li> PI controller updated to PID controller</li><li>...</li></ul>Big thanks to <a href="https://github.com/owennewo">@owennewo</a> for awesome suggestions and pull-requests!</blockquote>
17+
> - Extended configurability of the sensor classes [@owennewo](https://github.com/owennewo)
18+
> - **Stepper motor FOC support 🎨🎉 🎊**
19+
> - Very easy to use and results are great, I love it!
20+
> - Huge refactoring done in the library 😄
21+
>
22+
>
23+
> ***The release is practically complete and the new library release will be created as soon as the docs are updated!📚***
24+
25+
<blockquote class="info"><p class="heading"><b>OLD NEWS (01.09.2020)</b></p>New version of the Arduino <span class="simple">Simple<span class="foc">FOC</span>library</span> is out! (<a href="https://github.com/askuric/Arduino-FOC/releases">version 1.5.0 <i class="fa fa-tag"></i></a>) <br> <b>New features</b>:<ul><li> Open-loop motor control</li><li> Support Hall sensors</li><li> Support for Analog interface Magnetic sensor</li><li> New alignment procedure <br>- automatic sensor direction detection<br> - possibility to avoid alignment completely</li><li> PI controller updated to PID controller</li><li>...</li></ul>Big thanks to <a href="https://github.com/owennewo">@owennewo</a> for awesome suggestions and pull-requests!</blockquote>
1926

2027

2128

examples/motion_control/open_loop_motor_control/open_loop_position_example/open_loop_position_example.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
#include <SimpleFOC.h>
33

44
// motor instance
5-
BLDCMotor motor = BLDCMotor(3, 10, 6, 11, 7);
5+
// BLDCMotor( phA, phB, phC, pp, (en optional))
6+
BLDCMotor motor = BLDCMotor(9, 5, 6, 1, 8);
7+
// StepperMotor(ph1A,ph1B,ph2A,ph2B,pp,( en1, en2 optional))
8+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
69

710
void setup() {
811

examples/motion_control/open_loop_motor_control/open_loop_velocity_example/open_loop_velocity_example.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
#include <SimpleFOC.h>
33

44
// motor instance
5+
// BLDCMotor( phA, phB, phC, pp, (en optional))
56
BLDCMotor motor = BLDCMotor(3, 10, 6, 11, 7);
7+
// StepperMotor(ph1A,ph1B,ph2A,ph2B,pp,( en1, en2 optional))
8+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
9+
610

711
void setup() {
812

examples/motion_control/position_motion_control/encoder/angle_control/angle_control.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
#include <PciManager.h>
2929
#include <PciListenerImp.h>
3030

31-
// motor instance
32-
BLDCMotor motor = BLDCMotor(9, 10, 11, 11, 8);
31+
// BLDC motor instance
32+
BLDCMotor motor = BLDCMotor(9, 5, 6, 11, 8);
33+
// Stepper motor instance
34+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
3335

3436
// encoder instance
3537
Encoder encoder = Encoder(2, 3, 8192, A0);

examples/motion_control/position_motion_control/magnetic_sensor/angle_control/angle_control.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ MagneticSensorSPI sensor = MagneticSensorSPI(10, 14, 0x3FFF);
1616
// magnetic sensor instance - analog output
1717
// MagneticSensorAnalog sensor = MagneticSensorAnalog(A1, 14, 1020);
1818

19-
// Motor instance
19+
// BLDC motor instance
2020
BLDCMotor motor = BLDCMotor(9, 5, 6, 11, 8);
21+
// Stepper motor instance
22+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
2123

2224
void setup() {
2325

examples/motion_control/torque_voltage_control/encoder/voltage_control/voltage_control.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
*/
1010
#include <SimpleFOC.h>
1111

12-
// motor instance
12+
// BLDC motor instance
1313
BLDCMotor motor = BLDCMotor(9, 10, 11, 11, 7);
14+
// Stepper motor instance
15+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
1416

1517
// encoder instance
1618
Encoder encoder = Encoder(2, 3, 8192);

examples/motion_control/torque_voltage_control/magnetic_sensor/voltage_control/voltage_control.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ MagneticSensorSPI sensor = MagneticSensorSPI(10, 14, 0x3FFF);
1515
// magnetic sensor instance - analog output
1616
// MagneticSensorAnalog sensor = MagneticSensorAnalog(A1, 14, 1020);
1717

18-
// Motor instance
18+
// BDLC Motor instance
1919
BLDCMotor motor = BLDCMotor(9, 5, 6, 11, 8);
20+
// Stepper motor instance
21+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
2022

2123
void setup() {
2224

examples/motion_control/velocity_motion_control/encoder/velocity_control/velocity_control.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
#include <PciManager.h>
3030
#include <PciListenerImp.h>
3131

32-
// motor instance
32+
// BLDC motor instance
3333
BLDCMotor motor = BLDCMotor(9, 10, 11, 11, 8);
34+
// Stepper motor instance
35+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
3436

3537
// encoder instance
3638
Encoder encoder = Encoder(2, 3, 8192, A0);

examples/motion_control/velocity_motion_control/magnetic_sensor/velocity_control/velocity_control.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ MagneticSensorSPI sensor = MagneticSensorSPI(10, 14, 0x3FFF);
1919
// magnetic sensor instance - analog output
2020
// MagneticSensorAnalog sensor = MagneticSensorAnalog(A1, 14, 1020);
2121

22-
// Motor instance
22+
// BLDC motor instance
2323
BLDCMotor motor = BLDCMotor(9, 5, 6, 11, 8);
24+
// Stepper motor instance
25+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
2426

2527
void setup() {
2628

examples/motor_commands_serial_examples/encoder/full_control_serial/full_control_serial.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@
3838
*/
3939
#include <SimpleFOC.h>
4040

41-
// motor instance
42-
BLDCMotor motor = BLDCMotor(9, 10, 11, 11, 7);
41+
// BLDC motor instance
42+
BLDCMotor motor = BLDCMotor(9, 5, 6, 11, 8);
43+
// Stepper motor instance
44+
//StepperMotor motor = StepperMotor(9, 5, 10, 6, 50, 8);
4345

4446
// encoder instance
4547
Encoder encoder = Encoder(2, 3, 8192);

0 commit comments

Comments
 (0)