You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/simplefoc_library/code/motors/bldc_motors.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -258,22 +258,20 @@ The alignment procedure will have to move your motor several times and might not
258
258
259
259
### Step 6.1 Skip alignment - position sensor
260
260
261
-
If you are using absolute sensors such as magnetic sensors or hall sensors, once you have done the alignment procedure and once you have the motor's zero electrical offset sensor direction you no longer need the full calibration sequence. Therefore, to the `motor.initFOC()` you can provide the sensor offset `zero_electric_offset` and sensor direction `sensor_direction` to avoid alignment procedure:
The same can be done by using the motor parameters:
261
+
If you are using absolute sensors such as magnetic sensors or hall sensors, once you have done the alignment procedure and once you have the motor's zero electrical offset sensor direction you no longer need the full calibration sequence.
262
+
263
+
In this case you can set the sensor offset `zero_electric_offset` and sensor direction `sensor_direction` in the motor parameters to avoid the alignment procedure:
268
264
```cpp
269
-
//align sensor and start FOC
265
+
//set calibration values
270
266
motor.zero_electric_offset = 2.15; // rad
271
267
motor.sensor_direction = Direction::CW; // CW or CCW
268
+
// then call initFOC()
272
269
motor.initFOC();
273
270
```
274
271
You can find these values by running the `find_sensor_offset_and_direction.ino` example.
275
272
276
-
More generally, if you know any of these two values make sure to provide and the `iniFOC` will skip that part of the calibration. For example, for encoder sensors the zero electrical offset changes all the time but the sensor direction will stay the same so you can provide it and skip a large part of the calibration sequence.
273
+
If you set either of these two values the `initFOC` will skip that part of the calibration. For example, for encoder sensors the zero electrical offset changes all the time but the sensor direction will stay the same so you can provide it and skip a large part of the calibration sequence.
274
+
277
275
### Step 6.2 Skip alignment - current sense
278
276
279
277
For the current sensors it is as well possible to avoid the calibration procedure an that is done by specifying the curren sense flag called `skip_align`:
0 commit comments