Skip to content

merge #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
678c6f2
working on SAMD51
runger1101001 Mar 5, 2021
adf457e
Merge branch 'dev' into samd21_dev
runger1101001 Mar 5, 2021
0ba325c
Adding MagneticSensorPWM
jordancormack Mar 18, 2021
531247e
Added new line at end of files
jordancormack Mar 18, 2021
19e220d
SAMD refactoring - in progress
runger1101001 Apr 3, 2021
eed0387
prepare readme for 2.1.1
askuric Apr 9, 2021
bf00d4f
Merge pull request #61 from jordancormack/dev
askuric Apr 9, 2021
c4ff6e1
refactored code. SAMD51 initial support working
runger1101001 Apr 9, 2021
6a42185
Merge branch 'samd21_dev' into dev
runger1101001 Apr 9, 2021
eaf37ca
magnetic pwm sensors initial implementation
askuric Apr 10, 2021
ca63c46
Merge pull request #66 from runger1101001/dev
runger1101001 Apr 22, 2021
273bcf8
fix compile problem on AVR due to SAMD header
runger1101001 Apr 22, 2021
e68ca71
Merge pull request #67 from runger1101001/dev
runger1101001 Apr 22, 2021
dce7906
extension of the commander, + typo fix in pwm mag sensor
askuric Apr 24, 2021
2f3b5ff
Avoid the need for a custom header file for ESP32 compilation.
tschundler Apr 25, 2021
fd78d2e
Fix consistency error in calibrateOffsets.
sDessens Apr 28, 2021
7bacc20
CurrentSense::gain_x must be a float
sDessens Apr 28, 2021
dd73d88
CurrentSense correct filtering if 3 current measurements are available
sDessens Apr 29, 2021
37fd4af
Merge pull request #69 from sDessens/random_fixes
askuric Apr 29, 2021
f2ae008
added an enable_active_high field (default true) to BLDCDriver6PWM
runger1101001 Apr 29, 2021
3cc6933
Merge remote-tracking branch 'simplefoc/dev' into dev
runger1101001 Apr 29, 2021
8ecc1b6
fixing SAMD21 PWM - now it's really nice...
runger1101001 Apr 30, 2021
62534c2
optimized the enable_active_high setting for enable/disable
runger1101001 May 2, 2021
c43f1e3
fix samd51 pwm glitch and enable same51 support
runger1101001 May 2, 2021
ebd4906
move the sensor calls to before the enable checks in move and loopFOC
runger1101001 May 2, 2021
9f73d60
Merge pull request #68 from tschundler/fix-esp32-missing-constant
askuric May 4, 2021
20e16d7
FEAT added raw analog/pwm
askuric May 4, 2021
13a7a98
FEAT integrated eps32 avoid mcpwm.h file updating
askuric May 4, 2021
483c6f0
FEAT added readme updates with the new changes
askuric May 4, 2021
f3988ba
FEAT moved simplefocshield to the end
askuric May 4, 2021
1a37cad
FEAT added the shaft_angle to the motor.initFOC() - issue #62
askuric May 4, 2021
4aac992
added issue #62
askuric May 4, 2021
c9ff03e
Merge pull request #72 from runger1101001/dev
runger1101001 May 4, 2021
8ff4630
FIX read sensor after the openloop check
askuric May 6, 2021
ce52535
Issue #46: motor.command() and CRLF
maxlem-neuralium May 10, 2021
2abb7ed
Issue #46 : missing use of isSentinel
maxlem-neuralium May 10, 2021
5a9f092
prevent buffer overrun when commands sent are too long
runger1101001 May 10, 2021
ef7cf73
unfortunately, the string "EXTERN" is defined in rp2040 headers
runger1101001 May 10, 2021
1fa5dd7
the constants SDA and SCL are not defined in rp2040.
runger1101001 May 10, 2021
8da3507
unfortunately this code does not work with rp2040
runger1101001 May 10, 2021
3fc05d2
rp2040 (aka Raspberry Pi Pico) support
runger1101001 May 10, 2021
d8011fc
Merge branch 'dev' of https://github.com/simplefoc/Arduino-FOC.git in…
runger1101001 May 10, 2021
5fa5893
Merge branch 'dev' into rp2040
runger1101001 May 10, 2021
8246fe5
Merge pull request #75 from maxlem/master
askuric May 13, 2021
a8a72b2
Merge branch 'dev' into dev
askuric May 13, 2021
5e6dc72
Merge pull request #77 from runger1101001/dev
askuric May 13, 2021
9220ead
division by zero issue fix #76 + defines for default pwm freq
askuric May 13, 2021
e3c91e1
reduced \r error string + target setting separated + unknowm cmd error
askuric May 13, 2021
ffdc4b1
dead zone as5600 register fix - set to 0x0C
askuric May 13, 2021
39d2cef
removed old fix in drivers for issue #76
askuric May 13, 2021
b893f11
removed old fix in drivers for issue #76 2
askuric May 13, 2021
b5dccfb
readme prepared for v2.1.1
askuric May 13, 2021
bf45b6a
FIX phase resitence not changing voltage_limit
askuric May 13, 2021
3ec3038
examples for 6mOhm resistor
askuric May 13, 2021
d1b41d0
v2.1.1 update readme
askuric May 13, 2021
a3741bf
readme html problem resolution
askuric May 13, 2021
5fcfbfe
FEAT pwm sensor can be blocking or nonblocking
askuric May 13, 2021
b1d26d2
examples for nonblocking
askuric May 13, 2021
e43425c
Merge pull request #78 from runger1101001/rp2040
askuric May 13, 2021
3fde38d
support for RPI Pico to readme + Pullup naming update
askuric May 13, 2021
a4f9999
Annoying pullup struct rename from EXTERN/INTERN to USE_EXTERN/USE_IN…
askuric May 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 45 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,24 @@ Therefore this is an attempt to:
- ***NEW*** 📢: *Medium-power* BLDC driver (<30Amps): [Arduino <span class="simple">Simple<b>FOC</b>PowerShield</span> ](https://github.com/simplefoc/Arduino-SimpleFOC-PowerShield).
- See also [@byDagor](https://github.com/byDagor)'s *fully-integrated* ESP32 based board: [Dagor Brushless Controller](https://github.com/byDagor/Dagor-Brushless-Controller)

##### <b> NEW RELEASE 📢:</b> <i>Simple<b>FOC</b>library v2.1
> - **Initial current sensing support**🎉
> - Inline current sensors
> - adaptive zero finding and shunt direction
> - **Implemented real torque control**
> - using voltage
> - using current magnitude (one current)
> - using FOC currents ( d-q currents ) - real foc control
> - SVPWM full implementation d+q axis
> - **Simplified sensor implementation**📢
> - For new sensor implementation only one function necessary `getAngle()`
> - Upgrade of the HallSensor implementation by [@owennewo](https://github.com/owennewo)
> - Support for Arduino DUE - everything except the 6PWM mode
> - Support for ATMega328pb
> - bugfix for the Teensy boards ( setting 3pwm )
> - extended support for 2PWM stepper drivers - by [@zjor](https://github.com/zjor)
> - included F macro for shrinking string memory usage - moved to programming memory
> - disable phase support for 3pwm driver
> - not yet for 6pwm
> - rewritten `initFOC()`
> - can be skipped and outputs much more info
> - align sensor: direction + zero offset + pole pair check
> - align current sense
> - sensor offset supported (`motor.sensor_offset`)
> - **refactored motor commands interface**
> - much more flexible and easy to extend
> - very easy to add new commands and function callbacks
> - implemented motor+pid+lpf commands of-the-shelf
> - Added **step/dir interface**
> - integrated as an optional communication channel
>
> BEWARE 📢 slight API changes included
> - `ControlType` renamed into `MotionControlType`
> - `ControlType::voltage` does not exist any more now - `MotionControlType::torque`


## Arduino *SimpleFOCShield* v2.0.3
<p align="">
<a href="https://youtu.be/G5pbo0C6ujE">
<img src="https://docs.simplefoc.com/extras/Images/foc_shield_video.jpg" height="320px">
</a>
</p>

### Features
- **Plug & play**: In combination with Arduino *Simple**FOC**library* - [github](https://github.com/simplefoc/Arduino-FOC)
- **Low-cost**: Price of €15 - [Check the pricing](https://www.simplefoc.com/shop)
- **In-line current sensing**: Up to 3Amps/5Amps bidirectional
- configurable: 3.3Amps - 3.3V adc, 5Amps - 5V adc
- **Integrated 8V regulator**:
- Enable/disable by soldering pads
- **Max power 120W** - max current 5A, power-supply 12-24V
- Designed for Gimbal motors with the internal resistance >10 Ωs.
- **Stackable**: running 2 motors in the same time
- **Encoder/Hall sensors interface**: Integrated 3.3kΩ pullups (configurable)
- **I2C interface**: Integrated 4.7kΩ pullups (configurable)
- **Configurable pinout**: Hardware configuration - soldering connections
- **Arduino headers**: Arduino UNO, Arduino MEGA, STM32 Nucleo boards...
- **Open Source**: Fully available fabrication files - [how to make it yourself](https://docs.simplefoc.com/arduino_simplefoc_shield_fabrication)

<p align=""><img src="https://simplefoc.com/assets/img/v2.jpg" height="180px"> <img src="https://simplefoc.com/assets/img/v1.jpg" height="180px"> <img src="https://docs.simplefoc.com/extras/Images/simple_foc_shield_v13_small.gif" height="180x"></p>

##### <b> Release notes be:</b> <i>Simple<b>FOC</b>library</i> v2.1.1
> - bugfixes commander
> - bugfix `voltage_limit` when provided `phase_resistance`
> - bugfix `hall_sensor` examples
> - added examples fot the PowerShield
> - added initial support for `MagneticSensorPWM`
> - SAMD51 support
> - **initial support for Raspberry pi Pico**
> - added examples to find the raw max and min of the analog and pwm sensor
> - extension of the `Commander` interface
> - added pwm centering option `WC`
> - added pwm modulation cmd `WT`
> - improved esp32 implementation to avoid the need for mcpwm.h changes by @tschundler
> - issue #62: motor.shaft_angle setting in the motor.initFOC()
> - issue #76: esp32 division by zero
> - issue #46: commander end of line character - by @maxlem
> - [community fix](https://community.simplefoc.com/t/as5600-dead-spot-around-0/208) AS5600 register value
> - renamed `Pullup::EXTERN` and `Pullup::INTERN` to `Pullup::USE_EXTERN` and `Pullup::USE_INTERN`

## Arduino *SimpleFOClibrary* v2.1

Expand Down Expand Up @@ -108,6 +65,33 @@ This video demonstrates the *Simple**FOC**library* basic usage, electronic conne

<p align=""> <img src="https://docs.simplefoc.com/extras/Images/uno_l6234.jpg" height="170px"> <img src="https://docs.simplefoc.com/extras/Images/hmbgc_v22.jpg" height="170px"> <img src="https://docs.simplefoc.com/extras/Images/foc_shield_v13.jpg" height="170px"></p>

## Arduino *SimpleFOCShield* v2.0.3
<p align="">
<a href="https://youtu.be/G5pbo0C6ujE">
<img src="https://docs.simplefoc.com/extras/Images/foc_shield_video.jpg" height="320px">
</a>
</p>

### Features
- **Plug & play**: In combination with Arduino *Simple**FOC**library* - [github](https://github.com/simplefoc/Arduino-FOC)
- **Low-cost**: Price of €15 - [Check the pricing](https://www.simplefoc.com/shop)
- **In-line current sensing**: Up to 3Amps/5Amps bidirectional
- configurable: 3.3Amps - 3.3V adc, 5Amps - 5V adc
- **Integrated 8V regulator**:
- Enable/disable by soldering pads
- **Max power 120W** - max current 5A, power-supply 12-24V
- Designed for Gimbal motors with the internal resistance >10 Ωs.
- **Stackable**: running 2 motors in the same time
- **Encoder/Hall sensors interface**: Integrated 3.3kΩ pullups (configurable)
- **I2C interface**: Integrated 4.7kΩ pullups (configurable)
- **Configurable pinout**: Hardware configuration - soldering connections
- **Arduino headers**: Arduino UNO, Arduino MEGA, STM32 Nucleo boards...
- **Open Source**: Fully available fabrication files - [how to make it yourself](https://docs.simplefoc.com/arduino_simplefoc_shield_fabrication)

<p align=""><img src="https://simplefoc.com/assets/img/v2.jpg" height="180px"> <img src="https://simplefoc.com/assets/img/v1.jpg" height="180px"> <img src="https://docs.simplefoc.com/extras/Images/simple_foc_shield_v13_small.gif" height="180x"></p>



## Getting Started
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MagneticSensorSPI sensor = MagneticSensorSPI(PA4, 14, 0x3FFF);
// make sure to use the pull-ups!!
// SDA PB7
// SCL PB6
//MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0x0E, 4);
//MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0X0C, 4);

// Motor instance
BLDCMotor motor = BLDCMotor(11);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ void doB2(){encoder2.handleB();}


// inline current sensor instance
// check if your board has R010 (0.01 ohm resistor) or R006 (0.006 mOhm resistor)
InlineCurrentSense current_sense1 = InlineCurrentSense(0.01, 50.0, A0, A2);

// inline current sensor instance
// check if your board has R010 (0.01 ohm resistor) or R006 (0.006 mOhm resistor)
InlineCurrentSense current_sense2 = InlineCurrentSense(0.01, 50.0, A1, A3);

// commander communication instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ void doA(){encoder.handleA();}
void doB(){encoder.handleB();}

// inline current sensor instance
// check if your board has R010 (0.01 ohm resistor) or R006 (0.006 mOhm resistor)
InlineCurrentSense current_sense = InlineCurrentSense(0.01, 50.0, A0, A2);

// commander communication instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BLDCMotor motor = BLDCMotor(11);
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 10, 11, 8);
//StepperMotor motor = StepperMotor(50);
//StepperDriver4PWM driver = StepperDriver4PWM(9, 5, 10, 6, 8);
MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0x0E, 4);
MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0X0C, 4);


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ BLDCDriver3PWM driver = BLDCDriver3PWM(9, 5, 6, 8);
// magnetic sensor instance - SPI
MagneticSensorSPI sensor = MagneticSensorSPI(10, 14, 0x3FFF);
// magnetic sensor instance - I2C
//MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0x0E, 4);
//MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0X0C, 4);
// magnetic sensor instance - analog output
// MagneticSensorAnalog sensor = MagneticSensorAnalog(A1, 14, 1020);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// magnetic sensor instance - SPI
//MagneticSensorSPI sensor = MagneticSensorSPI(10, 14, 0x3FFF);
// magnetic sensor instance - I2C
//MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0x0E, 4);
//MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0X0C, 4);
// magnetic sensor instance - analog output
MagneticSensorAnalog sensor = MagneticSensorAnalog(A1, 14, 1020);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void setup() {
encoder.quadrature = Quadrature::ON;

// check if you need internal pullups
encoder.pullup = Pullup::EXTERN;
encoder.pullup = Pullup::USE_EXTERN;

// initialise encoder hardware
encoder.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void setup() {
encoder.quadrature = Quadrature::ON;

// check if you need internal pullups
encoder.pullup = Pullup::EXTERN;
encoder.pullup = Pullup::USE_EXTERN;

// initialise encoder hardware
encoder.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void setup() {
Serial.begin(115200);

// check if you need internal pullups
sensor.pullup = Pullup::EXTERN;
sensor.pullup = Pullup::USE_EXTERN;

// initialise encoder hardware
sensor.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void setup() {
Serial.begin(115200);

// check if you need internal pullups
sensor.pullup = Pullup::EXTERN;
sensor.pullup = Pullup::USE_EXTERN;

// initialise encoder hardware
sensor.init();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#include <SimpleFOC.h>

/**
* An example to find out the raw max and min count to be provided to the constructor
* Spin your motor/sensor/magnet to see what is the maximum output of the sensor and what is the minimum value
* And replace values 14 and 1020 with new values. Once when you replace them make sure there is no jump in the angle reading sensor.getAngle().
* If there is a jump that means you can still find better values.
*/

/**
* Magnetic sensor reading analog voltage on pin A1. This voltage is proportional to rotation position.
* Tested on AS5600 magnetic sensor running in 'analog mode'. Note AS5600 works better in 'i2C mode' (less noise) but only supports one sensor per i2c bus.
*
* MagneticSensorAnalog(uint8_t _pinAnalog, int _min, int _max)
* - pinAnalog - the pin that is reading the pwm from magnetic sensor
* - min_raw_count - the smallest expected reading. Whilst you might expect it to be 0 it is often ~15. Getting this wrong results in a small click once per revolution
* - max_raw_count - the largest value read. whilst you might expect it to be 2^10 = 1023 it is often ~ 1020. Note ESP32 will be closer to 4096 with its 12bit ADC
*/
MagneticSensorAnalog sensor = MagneticSensorAnalog(A1, 14, 1020);

void setup() {
// monitoring port
Serial.begin(115200);

// initialise magnetic sensor hardware
sensor.init();

Serial.println("Sensor ready");
_delay(1000);
}

int max_count = 0;
int min_count = 100000;

void loop() {

// keep track of min and max
if(sensor.raw_count > max_count) max_count = sensor.raw_count;
else if(sensor.raw_count < min_count) min_count = sensor.raw_count;

// display the raw count, and max and min raw count
Serial.print("angle:");
Serial.print(sensor.getAngle());
Serial.print("\t, raw:");
Serial.print(sensor.raw_count);
Serial.print("\t, min:");
Serial.print(min_count);
Serial.print("\t, max:");
Serial.println(max_count);
delay(100);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <SimpleFOC.h>



/**
* Magnetic sensor reading analog voltage on pin A1. This voltage is proportional to rotation position.
* Tested on AS5600 magnetic sensor running in 'analog mode'. Note AS5600 works better in 'i2C mode' (less noise) but only supports one sensor per i2c bus.
Expand Down Expand Up @@ -28,4 +29,4 @@ void loop() {
Serial.print(sensor.getAngle());
Serial.print("\t");
Serial.println(sensor.getVelocity());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#include <SimpleFOC.h>


/**
* An example to find out the raw max and min count to be provided to the constructor
* SPin your motor/sensor/magnet to see what is the maximum output of the sensor and what is the minimum value
* And replace values 4 and 904 with new values. Once when you replace them make sure there is no jump in the angle reading sensor.getAngle().
* If there is a jump that means you can still find better values.
*/
MagneticSensorPWM sensor = MagneticSensorPWM(2, 4, 904);
void doPWM(){sensor.handlePWM();}

void setup() {
// monitoring port
Serial.begin(115200);

// initialise magnetic sensor hardware
sensor.init();
// comment out to use sensor in blocking (non-interrupt) way
sensor.enableInterrupt(doPWM);

Serial.println("Sensor ready");
_delay(1000);
}

int max_pulse= 0;
int min_pulse = 10000;

void loop() {

// keep track of min and max
if(sensor.pulse_length_us > max_pulse) max_pulse = sensor.pulse_length_us;
else if(sensor.pulse_length_us < min_pulse) min_pulse = sensor.pulse_length_us;

// display the raw count, and max and min raw count
Serial.print("angle:");
Serial.print(sensor.getAngle());
Serial.print("\t, raw:");
Serial.print(sensor.pulse_length_us);
Serial.print("\t, min:");
Serial.print(min_pulse);
Serial.print("\t, max:");
Serial.println(max_pulse);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <SimpleFOC.h>


/**
* Magnetic sensor reading pwm signal on pin 2. The pwm duty cycle is proportional to the sensor angle.
*
* MagneticSensorPWM(uint8_t MagneticSensorPWM, int _min, int _max)
* - pinPWM - the pin that is reading the pwm from magnetic sensor
* - min_raw_count - the smallest expected reading. Whilst you might expect it to be 0 it is often ~5. Getting this wrong results in a small click once per revolution
* - max_raw_count - the largest value read. whilst you might expect it to be 1kHz = 1000 it is often ~910. depending on the exact frequency and saturation
*/
MagneticSensorPWM sensor = MagneticSensorPWM(2, 4, 904);
void doPWM(){sensor.handlePWM();}

void setup() {
// monitoring port
Serial.begin(115200);

// initialise magnetic sensor hardware
sensor.init();
// comment out to use sensor in blocking (non-interrupt) way
sensor.enableInterrupt(doPWM);

Serial.println("Sensor ready");
_delay(1000);
}

void loop() {
// display the angle and the angular velocity to the terminal
Serial.print(sensor.getAngle());
Serial.print("\t");
Serial.println(sensor.getVelocity());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include <SimpleFOC.h>

// software interrupt library
#include <PciManager.h>
#include <PciListenerImp.h>

/**
* Magnetic sensor reading analog voltage on pin which does not have hardware interrupt support. Such as A0.
*
* MagneticSensorPWM(uint8_t MagneticSensorPWM, int _min, int _max)
* - pinPWM - the pin that is reading the pwm from magnetic sensor
* - min_raw_count - the smallest expected reading. Whilst you might expect it to be 0 it is often ~5. Getting this wrong results in a small click once per revolution
* - max_raw_count - the largest value read. whilst you might expect it to be 1kHz = 1000 it is often ~910. depending on the exact frequency and saturation
*/
MagneticSensorPWM sensor = MagneticSensorPWM(A0, 4, 904);
void doPWM(){sensor.handlePWM();}

// encoder interrupt init
PciListenerImp listenerPWM(sensor.pinPWM, doPWM);

void setup() {
// monitoring port
Serial.begin(115200);

// initialise magnetic sensor hardware
sensor.init();
// comment out to use sensor in blocking (non-interrupt) way
PciManager.registerListener(&listenerPWM);

Serial.println("Sensor ready");
_delay(1000);
}

void loop() {
// display the angle and the angular velocity to the terminal
Serial.print(sensor.getAngle());
Serial.print("\t");
Serial.println(sensor.getVelocity());
}
Loading