@ -25,17 +25,17 @@ The main firmware architecture includes:
- **FOC Algorithm** : implements the FOC strategy
- **FOC Algorithm** : implements the FOC strategy
- **Control Type Manager** : Manages the transition between Commutation, Sinusoidal, and FOC control type
- **Control Type Manager** : Manages the transition between Commutation, Sinusoidal, and FOC control type


The FOC algorithm architecture is illustrated in the figure below:
The FOC algorithm architecture is illustrated in the figure below:


In this firmware 3 control types are available:
In this firmware 3 control types are available:
- Commutation
- Commutation
- SIN (Sinusoidal)
- SIN (Sinusoidal)
- FOC (Field Oriented Control)
- FOC (Field Oriented Control)


Demo videos:
Demo videos:
@ -46,7 +46,7 @@ Demo videos:
[►Video: Reliable Serial Communication demo ](https://drive.google.com/open?id=1mUM-p7SE6gmyTH7zhDHy5DUyczXvmy5d )
[►Video: Reliable Serial Communication demo ](https://drive.google.com/open?id=1mUM-p7SE6gmyTH7zhDHy5DUyczXvmy5d )


---
---
@ -60,7 +60,7 @@ Demo videos:
- The Field Weakening is a linear interpolation from 0 to FIELD_WEAK_MAX or PHASE_ADV_MAX (depeding if FOC or SIN is selected, respectively)
- The Field Weakening is a linear interpolation from 0 to FIELD_WEAK_MAX or PHASE_ADV_MAX (depeding if FOC or SIN is selected, respectively)
- The Field Weakening starts engaging at FIELD_WEAK_LO and reaches the maximum value at FIELD_WEAK_HI
- The Field Weakening starts engaging at FIELD_WEAK_LO and reaches the maximum value at FIELD_WEAK_HI
- The figure below shows different possible calibrations for Field Weakening / Phase Advance
- The figure below shows different possible calibrations for Field Weakening / Phase Advance


- If you re-calibrate the Field Weakening please take all the safety measures! The motors can spin very fast!
- If you re-calibrate the Field Weakening please take all the safety measures! The motors can spin very fast!
@ -70,11 +70,11 @@ Demo videos:
- For calibrating the fixed-point parameters use the [Fixed-Point Viewer ](https://github.com/EmanuelFeru/FixedPointViewer ) tool
- For calibrating the fixed-point parameters use the [Fixed-Point Viewer ](https://github.com/EmanuelFeru/FixedPointViewer ) tool
- The parameters data Fixed-point types are given in the following table:
- The parameters data Fixed-point types are given in the following table:


### Diagnostics
### Diagnostics
Each motor is constantly monitored for errors. These errors are:
Each motor is constantly monitored for errors. Thhoverboard ese errors are:
- **Error 001** : Hall sensor not connected
- **Error 001** : Hall sensor not connected
- **Error 002** : Hall sensor short circuit
- **Error 002** : Hall sensor short circuit
- **Error 004** : Motor NOT able to spin (Possible causes: motor phase disconnected, MOSFET defective, operational Amplifier defective, motor blocked)
- **Error 004** : Motor NOT able to spin (Possible causes: motor phase disconnected, MOSFET defective, operational Amplifier defective, motor blocked)