The sensor error protecion is a feature available in fw verison 2.1 + that checks for malfunctions in the commutation sensor. It is applicable for Hall, Sin/Cos, resolver and Hall+Encoder implementations.


1. How the detection works


When the motor rotates, the Hall sensor signals are changing as shown on the image below:



In total, we can distinguish 6 different Hall transition during the motor's rotation:


 

Hall AHall BHall C
100
110
010
011
001
101



By knowing the current Hall sensor's state and the motor direction, we can predict what will be the next state. Also by looking at the table, we can see that there are two states that will not occur, which are the [0,0,0] and [1,1,1]. By taking these considerations, the algorith can determine if there is a Hall sensor fault.


The Hall sensor fault will be triggered if the hall transition is not the expected or if the sensor is completely disconnected. The Sensor Fault indication will be visible in the fault flags.



2. Detection levels


The detection can be configured as follows: 


Strict: The error will be triggered with the first wrong state

Tolerant: The error will be triggered if 5 wrong states occur over 128 ms. After 128 ms the error counter will reset



Note that the sensor error detection on the unused channels should be disabled!



3. False alarms


3.1 Alarms triggered from sensor noise


Sisnce the detection is checking for wrong Hall sensor patterns, it can be triggered in case of noise in the Hall sensors. If the electrical noise existing in the Hall signal makes the voltage reading drop lower than 2.5 V, then it can be considerd as a logical High instead of low.


At the same way, if the electrical noise exceeds 2.5 V it can make the Hall signal be detected as high instead of low and the error can be triggered.



3.2 Alarms triggered from motor vibrations


Although the sensor detection algorith will try to avoid false alarms produced by motor vibrations, there is the possibility if the vibrations are intense to trigger the error. This is something desired, because this high vibration situation can be harmful for the motor or the controller. 


4. Hall+Encoder implementation


When the encoder sensor is used in combination with Hall for the commutation of the motor, there is an additional check that monitors the sensor angle calculated by using the two sensors. If the angle differense is bigger than 45 electrical degrees, the sensor error will be triggered.