Browse Source

example configurations, etc.

Brian 8 years ago
parent
commit
40bb0cbf7a
24 changed files with 1911 additions and 2 deletions
  1. 2
    2
      Marlin/Configuration_adv.h
  2. 83
    0
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  3. 83
    0
      Marlin/example_configurations/Felix/Configuration_adv.h
  4. 83
    0
      Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h
  5. 83
    0
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  6. 83
    0
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  7. 83
    0
      Marlin/example_configurations/K8200/Configuration_adv.h
  8. 83
    0
      Marlin/example_configurations/K8400/Configuration_adv.h
  9. 83
    0
      Marlin/example_configurations/M150/Configuration_adv.h
  10. 83
    0
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  11. 83
    0
      Marlin/example_configurations/SCARA/Configuration_adv.h
  12. 83
    0
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  13. 83
    0
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  14. 83
    0
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  15. 83
    0
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  16. 83
    0
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  17. 83
    0
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  18. 83
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  19. 83
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  20. 83
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  21. 83
    0
      Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h
  22. 83
    0
      Marlin/example_configurations/makibox/Configuration_adv.h
  23. 83
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  24. 83
    0
      Marlin/example_configurations/wt150/Configuration_adv.h

+ 2
- 2
Marlin/Configuration_adv.h View File

@@ -1262,7 +1262,7 @@
1262 1262
 #endif
1263 1263
 
1264 1264
 //===========================================================================
1265
-//============================ I2C Encoder Settings =========================
1265
+//====================== I2C Position Encoder Settings ======================
1266 1266
 //===========================================================================
1267 1267
 /**
1268 1268
  *  I2C position encoders for closed loop control.
@@ -1342,6 +1342,6 @@
1342 1342
   // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1343 1343
   #define I2CPE_ERR_ROLLING_AVERAGE
1344 1344
 
1345
-#endif
1345
+#endif // I2C_POSITION_ENCODERS
1346 1346
 
1347 1347
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   #define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h View File

@@ -1267,4 +1267,87 @@
1267 1267
   //#define USER_GCODE_5 "G28\nM503"
1268 1268
 #endif
1269 1269
 
1270
+//===========================================================================
1271
+//====================== I2C Position Encoder Settings ======================
1272
+//===========================================================================
1273
+/**
1274
+ *  I2C position encoders for closed loop control.
1275
+ *  Developed by Chris Barr at Aus3D.
1276
+ *
1277
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1278
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1279
+ *
1280
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1281
+ *  Alternative Supplier: http://reliabuild3d.com/
1282
+ *
1283
+ *  Reilabuild encoders have been modified to improve reliability.
1284
+ */
1285
+
1286
+//#define I2C_POSITION_ENCODERS
1287
+#if ENABLED(I2C_POSITION_ENCODERS)
1288
+
1289
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1290
+                                                            // encoders supported currently.
1291
+
1292
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1293
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1294
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1295
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1296
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1297
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1298
+                                                            // for rotary encoders this is ticks / revolution.
1299
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1300
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1301
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1302
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1303
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1304
+                                                            // printer will attempt to correct the error; errors
1305
+                                                            // smaller than this are ignored to minimize effects of
1306
+                                                            // measurement noise / latency (filter).
1307
+
1308
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1309
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1310
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1311
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1312
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1313
+  //#define I2CPE_ENC_2_INVERT
1314
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1315
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1316
+
1317
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1318
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1319
+
1320
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1321
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1322
+
1323
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1324
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1325
+
1326
+  // Default settings for encoders which are enabled, but without settings configured above.
1327
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1328
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1329
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1330
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1331
+  #define I2CPE_DEF_EC_THRESH       0.1
1332
+
1333
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1334
+                                                            // axis after which the printer will abort. Comment out to
1335
+                                                            // disable abort behaviour.
1336
+
1337
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1338
+                                                            // for this amount of time (in ms) before the encoder
1339
+                                                            // is trusted again.
1340
+
1341
+  /**
1342
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1343
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1344
+   * error rolling average when attempting to correct only for skips and not for vibration.
1345
+   */
1346
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1347
+
1348
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1349
+  #define I2CPE_ERR_ROLLING_AVERAGE
1350
+
1351
+#endif // I2C_POSITION_ENCODERS
1352
+
1270 1353
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -1237,4 +1237,87 @@
1237 1237
   //#define USER_GCODE_5 "G28\nM503"
1238 1238
 #endif
1239 1239
 
1240
+//===========================================================================
1241
+//====================== I2C Position Encoder Settings ======================
1242
+//===========================================================================
1243
+/**
1244
+ *  I2C position encoders for closed loop control.
1245
+ *  Developed by Chris Barr at Aus3D.
1246
+ *
1247
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1248
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1249
+ *
1250
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1251
+ *  Alternative Supplier: http://reliabuild3d.com/
1252
+ *
1253
+ *  Reilabuild encoders have been modified to improve reliability.
1254
+ */
1255
+
1256
+//#define I2C_POSITION_ENCODERS
1257
+#if ENABLED(I2C_POSITION_ENCODERS)
1258
+
1259
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1260
+                                                            // encoders supported currently.
1261
+
1262
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1263
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1264
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1265
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1266
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1267
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1268
+                                                            // for rotary encoders this is ticks / revolution.
1269
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1270
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1271
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1272
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1273
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1274
+                                                            // printer will attempt to correct the error; errors
1275
+                                                            // smaller than this are ignored to minimize effects of
1276
+                                                            // measurement noise / latency (filter).
1277
+
1278
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1279
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1280
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1281
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1282
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1283
+  //#define I2CPE_ENC_2_INVERT
1284
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1285
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1286
+
1287
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1288
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1289
+
1290
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1291
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1292
+
1293
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1294
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1295
+
1296
+  // Default settings for encoders which are enabled, but without settings configured above.
1297
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1299
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1300
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1301
+  #define I2CPE_DEF_EC_THRESH       0.1
1302
+
1303
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1304
+                                                            // axis after which the printer will abort. Comment out to
1305
+                                                            // disable abort behaviour.
1306
+
1307
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1308
+                                                            // for this amount of time (in ms) before the encoder
1309
+                                                            // is trusted again.
1310
+
1311
+  /**
1312
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1313
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1314
+   * error rolling average when attempting to correct only for skips and not for vibration.
1315
+   */
1316
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1317
+
1318
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1319
+  #define I2CPE_ERR_ROLLING_AVERAGE
1320
+
1321
+#endif // I2C_POSITION_ENCODERS
1322
+
1240 1323
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -1267,4 +1267,87 @@
1267 1267
   //#define USER_GCODE_5 "G28\nM503"
1268 1268
 #endif
1269 1269
 
1270
+//===========================================================================
1271
+//====================== I2C Position Encoder Settings ======================
1272
+//===========================================================================
1273
+/**
1274
+ *  I2C position encoders for closed loop control.
1275
+ *  Developed by Chris Barr at Aus3D.
1276
+ *
1277
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1278
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1279
+ *
1280
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1281
+ *  Alternative Supplier: http://reliabuild3d.com/
1282
+ *
1283
+ *  Reilabuild encoders have been modified to improve reliability.
1284
+ */
1285
+
1286
+//#define I2C_POSITION_ENCODERS
1287
+#if ENABLED(I2C_POSITION_ENCODERS)
1288
+
1289
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1290
+                                                            // encoders supported currently.
1291
+
1292
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1293
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1294
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1295
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1296
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1297
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1298
+                                                            // for rotary encoders this is ticks / revolution.
1299
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1300
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1301
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1302
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1303
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1304
+                                                            // printer will attempt to correct the error; errors
1305
+                                                            // smaller than this are ignored to minimize effects of
1306
+                                                            // measurement noise / latency (filter).
1307
+
1308
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1309
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1310
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1311
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1312
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1313
+  //#define I2CPE_ENC_2_INVERT
1314
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1315
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1316
+
1317
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1318
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1319
+
1320
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1321
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1322
+
1323
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1324
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1325
+
1326
+  // Default settings for encoders which are enabled, but without settings configured above.
1327
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1328
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1329
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1330
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1331
+  #define I2CPE_DEF_EC_THRESH       0.1
1332
+
1333
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1334
+                                                            // axis after which the printer will abort. Comment out to
1335
+                                                            // disable abort behaviour.
1336
+
1337
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1338
+                                                            // for this amount of time (in ms) before the encoder
1339
+                                                            // is trusted again.
1340
+
1341
+  /**
1342
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1343
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1344
+   * error rolling average when attempting to correct only for skips and not for vibration.
1345
+   */
1346
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1347
+
1348
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1349
+  #define I2CPE_ERR_ROLLING_AVERAGE
1350
+
1351
+#endif // I2C_POSITION_ENCODERS
1352
+
1270 1353
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/M150/Configuration_adv.h View File

@@ -1261,4 +1261,87 @@
1261 1261
   #define USER_GCODE_5 "G28\nM503"
1262 1262
 #endif
1263 1263
 
1264
+//===========================================================================
1265
+//====================== I2C Position Encoder Settings ======================
1266
+//===========================================================================
1267
+/**
1268
+ *  I2C position encoders for closed loop control.
1269
+ *  Developed by Chris Barr at Aus3D.
1270
+ *
1271
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1272
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1273
+ *
1274
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1275
+ *  Alternative Supplier: http://reliabuild3d.com/
1276
+ *
1277
+ *  Reilabuild encoders have been modified to improve reliability.
1278
+ */
1279
+
1280
+//#define I2C_POSITION_ENCODERS
1281
+#if ENABLED(I2C_POSITION_ENCODERS)
1282
+
1283
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1284
+                                                            // encoders supported currently.
1285
+
1286
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1287
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1288
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1289
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1290
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1291
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1292
+                                                            // for rotary encoders this is ticks / revolution.
1293
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1294
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1295
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1296
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1297
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1298
+                                                            // printer will attempt to correct the error; errors
1299
+                                                            // smaller than this are ignored to minimize effects of
1300
+                                                            // measurement noise / latency (filter).
1301
+
1302
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1303
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1304
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1305
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1306
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1307
+  //#define I2CPE_ENC_2_INVERT
1308
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1309
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1310
+
1311
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1312
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1313
+
1314
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1315
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1316
+
1317
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1318
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1319
+
1320
+  // Default settings for encoders which are enabled, but without settings configured above.
1321
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1322
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1323
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1324
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1325
+  #define I2CPE_DEF_EC_THRESH       0.1
1326
+
1327
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1328
+                                                            // axis after which the printer will abort. Comment out to
1329
+                                                            // disable abort behaviour.
1330
+
1331
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1332
+                                                            // for this amount of time (in ms) before the encoder
1333
+                                                            // is trusted again.
1334
+
1335
+  /**
1336
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1337
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1338
+   * error rolling average when attempting to correct only for skips and not for vibration.
1339
+   */
1340
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1341
+
1342
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1343
+  #define I2CPE_ERR_ROLLING_AVERAGE
1344
+
1345
+#endif // I2C_POSITION_ENCODERS
1346
+
1264 1347
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

@@ -1257,4 +1257,87 @@
1257 1257
   //#define USER_GCODE_5 "G28\nM503"
1258 1258
 #endif
1259 1259
 
1260
+//===========================================================================
1261
+//====================== I2C Position Encoder Settings ======================
1262
+//===========================================================================
1263
+/**
1264
+ *  I2C position encoders for closed loop control.
1265
+ *  Developed by Chris Barr at Aus3D.
1266
+ *
1267
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1268
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1269
+ *
1270
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1271
+ *  Alternative Supplier: http://reliabuild3d.com/
1272
+ *
1273
+ *  Reilabuild encoders have been modified to improve reliability.
1274
+ */
1275
+
1276
+//#define I2C_POSITION_ENCODERS
1277
+#if ENABLED(I2C_POSITION_ENCODERS)
1278
+
1279
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1280
+                                                            // encoders supported currently.
1281
+
1282
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1283
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1284
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1285
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1286
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1287
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1288
+                                                            // for rotary encoders this is ticks / revolution.
1289
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1290
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1291
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1292
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1293
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1294
+                                                            // printer will attempt to correct the error; errors
1295
+                                                            // smaller than this are ignored to minimize effects of
1296
+                                                            // measurement noise / latency (filter).
1297
+
1298
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1299
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1300
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1301
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1302
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1303
+  //#define I2CPE_ENC_2_INVERT
1304
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1305
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1306
+
1307
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1308
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1309
+
1310
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1311
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1312
+
1313
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1314
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1315
+
1316
+  // Default settings for encoders which are enabled, but without settings configured above.
1317
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1318
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1319
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1320
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1321
+  #define I2CPE_DEF_EC_THRESH       0.1
1322
+
1323
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1324
+                                                            // axis after which the printer will abort. Comment out to
1325
+                                                            // disable abort behaviour.
1326
+
1327
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1328
+                                                            // for this amount of time (in ms) before the encoder
1329
+                                                            // is trusted again.
1330
+
1331
+  /**
1332
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1333
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1334
+   * error rolling average when attempting to correct only for skips and not for vibration.
1335
+   */
1336
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1337
+
1338
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1339
+  #define I2CPE_ERR_ROLLING_AVERAGE
1340
+
1341
+#endif // I2C_POSITION_ENCODERS
1342
+
1260 1343
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

@@ -1259,4 +1259,87 @@
1259 1259
   #define USER_GCODE_5 "G28\nM503"
1260 1260
 #endif
1261 1261
 
1262
+//===========================================================================
1263
+//====================== I2C Position Encoder Settings ======================
1264
+//===========================================================================
1265
+/**
1266
+ *  I2C position encoders for closed loop control.
1267
+ *  Developed by Chris Barr at Aus3D.
1268
+ *
1269
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1270
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1271
+ *
1272
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1273
+ *  Alternative Supplier: http://reliabuild3d.com/
1274
+ *
1275
+ *  Reilabuild encoders have been modified to improve reliability.
1276
+ */
1277
+
1278
+//#define I2C_POSITION_ENCODERS
1279
+#if ENABLED(I2C_POSITION_ENCODERS)
1280
+
1281
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1282
+                                                            // encoders supported currently.
1283
+
1284
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1285
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1286
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1287
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1288
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1289
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1290
+                                                            // for rotary encoders this is ticks / revolution.
1291
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1292
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1293
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1294
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1295
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1296
+                                                            // printer will attempt to correct the error; errors
1297
+                                                            // smaller than this are ignored to minimize effects of
1298
+                                                            // measurement noise / latency (filter).
1299
+
1300
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1301
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1302
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1303
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1304
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1305
+  //#define I2CPE_ENC_2_INVERT
1306
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1307
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1308
+
1309
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1310
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1311
+
1312
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1313
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1314
+
1315
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1316
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1317
+
1318
+  // Default settings for encoders which are enabled, but without settings configured above.
1319
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1320
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1321
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1322
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1323
+  #define I2CPE_DEF_EC_THRESH       0.1
1324
+
1325
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1326
+                                                            // axis after which the printer will abort. Comment out to
1327
+                                                            // disable abort behaviour.
1328
+
1329
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1330
+                                                            // for this amount of time (in ms) before the encoder
1331
+                                                            // is trusted again.
1332
+
1333
+  /**
1334
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1335
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1336
+   * error rolling average when attempting to correct only for skips and not for vibration.
1337
+   */
1338
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1339
+
1340
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1341
+  #define I2CPE_ERR_ROLLING_AVERAGE
1342
+
1343
+#endif // I2C_POSITION_ENCODERS
1344
+
1262 1345
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h View File

@@ -1258,4 +1258,87 @@
1258 1258
   #define USER_GCODE_5 "G28\nM503"
1259 1259
 #endif
1260 1260
 
1261
+//===========================================================================
1262
+//====================== I2C Position Encoder Settings ======================
1263
+//===========================================================================
1264
+/**
1265
+ *  I2C position encoders for closed loop control.
1266
+ *  Developed by Chris Barr at Aus3D.
1267
+ *
1268
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1269
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1270
+ *
1271
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1272
+ *  Alternative Supplier: http://reliabuild3d.com/
1273
+ *
1274
+ *  Reilabuild encoders have been modified to improve reliability.
1275
+ */
1276
+
1277
+//#define I2C_POSITION_ENCODERS
1278
+#if ENABLED(I2C_POSITION_ENCODERS)
1279
+
1280
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1281
+                                                            // encoders supported currently.
1282
+
1283
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1284
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1285
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1286
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1287
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1288
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1289
+                                                            // for rotary encoders this is ticks / revolution.
1290
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1291
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1292
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1293
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1294
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1295
+                                                            // printer will attempt to correct the error; errors
1296
+                                                            // smaller than this are ignored to minimize effects of
1297
+                                                            // measurement noise / latency (filter).
1298
+
1299
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1300
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1301
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1302
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1303
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1304
+  //#define I2CPE_ENC_2_INVERT
1305
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1306
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1307
+
1308
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1309
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1310
+
1311
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1312
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1313
+
1314
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1315
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1316
+
1317
+  // Default settings for encoders which are enabled, but without settings configured above.
1318
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1319
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1320
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1321
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1322
+  #define I2CPE_DEF_EC_THRESH       0.1
1323
+
1324
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1325
+                                                            // axis after which the printer will abort. Comment out to
1326
+                                                            // disable abort behaviour.
1327
+
1328
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1329
+                                                            // for this amount of time (in ms) before the encoder
1330
+                                                            // is trusted again.
1331
+
1332
+  /**
1333
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1334
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1335
+   * error rolling average when attempting to correct only for skips and not for vibration.
1336
+   */
1337
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1338
+
1339
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1340
+  #define I2CPE_ERR_ROLLING_AVERAGE
1341
+
1342
+#endif // I2C_POSITION_ENCODERS
1343
+
1261 1344
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -1256,4 +1256,87 @@
1256 1256
   #define USER_GCODE_5 "G28\nM503"
1257 1257
 #endif
1258 1258
 
1259
+//===========================================================================
1260
+//====================== I2C Position Encoder Settings ======================
1261
+//===========================================================================
1262
+/**
1263
+ *  I2C position encoders for closed loop control.
1264
+ *  Developed by Chris Barr at Aus3D.
1265
+ *
1266
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1267
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1268
+ *
1269
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1270
+ *  Alternative Supplier: http://reliabuild3d.com/
1271
+ *
1272
+ *  Reilabuild encoders have been modified to improve reliability.
1273
+ */
1274
+
1275
+//#define I2C_POSITION_ENCODERS
1276
+#if ENABLED(I2C_POSITION_ENCODERS)
1277
+
1278
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1279
+                                                            // encoders supported currently.
1280
+
1281
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1282
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1283
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1284
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1285
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1286
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1287
+                                                            // for rotary encoders this is ticks / revolution.
1288
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1289
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1290
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1291
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1292
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1293
+                                                            // printer will attempt to correct the error; errors
1294
+                                                            // smaller than this are ignored to minimize effects of
1295
+                                                            // measurement noise / latency (filter).
1296
+
1297
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1298
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1299
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1300
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1301
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1302
+  //#define I2CPE_ENC_2_INVERT
1303
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1304
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1305
+
1306
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1307
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1308
+
1309
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1310
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1311
+
1312
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1313
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1314
+
1315
+  // Default settings for encoders which are enabled, but without settings configured above.
1316
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1317
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1318
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1319
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1320
+  #define I2CPE_DEF_EC_THRESH       0.1
1321
+
1322
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1323
+                                                            // axis after which the printer will abort. Comment out to
1324
+                                                            // disable abort behaviour.
1325
+
1326
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1327
+                                                            // for this amount of time (in ms) before the encoder
1328
+                                                            // is trusted again.
1329
+
1330
+  /**
1331
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1332
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1333
+   * error rolling average when attempting to correct only for skips and not for vibration.
1334
+   */
1335
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1336
+
1337
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1338
+  #define I2CPE_ERR_ROLLING_AVERAGE
1339
+
1340
+#endif // I2C_POSITION_ENCODERS
1341
+
1259 1342
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -1256,4 +1256,87 @@
1256 1256
   #define USER_GCODE_5 "G28\nM503"
1257 1257
 #endif
1258 1258
 
1259
+//===========================================================================
1260
+//====================== I2C Position Encoder Settings ======================
1261
+//===========================================================================
1262
+/**
1263
+ *  I2C position encoders for closed loop control.
1264
+ *  Developed by Chris Barr at Aus3D.
1265
+ *
1266
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1267
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1268
+ *
1269
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1270
+ *  Alternative Supplier: http://reliabuild3d.com/
1271
+ *
1272
+ *  Reilabuild encoders have been modified to improve reliability.
1273
+ */
1274
+
1275
+//#define I2C_POSITION_ENCODERS
1276
+#if ENABLED(I2C_POSITION_ENCODERS)
1277
+
1278
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1279
+                                                            // encoders supported currently.
1280
+
1281
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1282
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1283
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1284
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1285
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1286
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1287
+                                                            // for rotary encoders this is ticks / revolution.
1288
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1289
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1290
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1291
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1292
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1293
+                                                            // printer will attempt to correct the error; errors
1294
+                                                            // smaller than this are ignored to minimize effects of
1295
+                                                            // measurement noise / latency (filter).
1296
+
1297
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1298
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1299
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1300
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1301
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1302
+  //#define I2CPE_ENC_2_INVERT
1303
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1304
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1305
+
1306
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1307
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1308
+
1309
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1310
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1311
+
1312
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1313
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1314
+
1315
+  // Default settings for encoders which are enabled, but without settings configured above.
1316
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1317
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1318
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1319
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1320
+  #define I2CPE_DEF_EC_THRESH       0.1
1321
+
1322
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1323
+                                                            // axis after which the printer will abort. Comment out to
1324
+                                                            // disable abort behaviour.
1325
+
1326
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1327
+                                                            // for this amount of time (in ms) before the encoder
1328
+                                                            // is trusted again.
1329
+
1330
+  /**
1331
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1332
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1333
+   * error rolling average when attempting to correct only for skips and not for vibration.
1334
+   */
1335
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1336
+
1337
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1338
+  #define I2CPE_ERR_ROLLING_AVERAGE
1339
+
1340
+#endif // I2C_POSITION_ENCODERS
1341
+
1259 1342
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -1261,4 +1261,87 @@
1261 1261
   #define USER_GCODE_5 "G28\nM503"
1262 1262
 #endif
1263 1263
 
1264
+//===========================================================================
1265
+//====================== I2C Position Encoder Settings ======================
1266
+//===========================================================================
1267
+/**
1268
+ *  I2C position encoders for closed loop control.
1269
+ *  Developed by Chris Barr at Aus3D.
1270
+ *
1271
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1272
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1273
+ *
1274
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1275
+ *  Alternative Supplier: http://reliabuild3d.com/
1276
+ *
1277
+ *  Reilabuild encoders have been modified to improve reliability.
1278
+ */
1279
+
1280
+//#define I2C_POSITION_ENCODERS
1281
+#if ENABLED(I2C_POSITION_ENCODERS)
1282
+
1283
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1284
+                                                            // encoders supported currently.
1285
+
1286
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1287
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1288
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1289
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1290
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1291
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1292
+                                                            // for rotary encoders this is ticks / revolution.
1293
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1294
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1295
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1296
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1297
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1298
+                                                            // printer will attempt to correct the error; errors
1299
+                                                            // smaller than this are ignored to minimize effects of
1300
+                                                            // measurement noise / latency (filter).
1301
+
1302
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1303
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1304
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1305
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1306
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1307
+  //#define I2CPE_ENC_2_INVERT
1308
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1309
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1310
+
1311
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1312
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1313
+
1314
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1315
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1316
+
1317
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1318
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1319
+
1320
+  // Default settings for encoders which are enabled, but without settings configured above.
1321
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1322
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1323
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1324
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1325
+  #define I2CPE_DEF_EC_THRESH       0.1
1326
+
1327
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1328
+                                                            // axis after which the printer will abort. Comment out to
1329
+                                                            // disable abort behaviour.
1330
+
1331
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1332
+                                                            // for this amount of time (in ms) before the encoder
1333
+                                                            // is trusted again.
1334
+
1335
+  /**
1336
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1337
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1338
+   * error rolling average when attempting to correct only for skips and not for vibration.
1339
+   */
1340
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1341
+
1342
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1343
+  #define I2CPE_ERR_ROLLING_AVERAGE
1344
+
1345
+#endif // I2C_POSITION_ENCODERS
1346
+
1264 1347
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -1256,4 +1256,87 @@
1256 1256
   //#define USER_GCODE_5 "G28\nM503"
1257 1257
 #endif
1258 1258
 
1259
+//===========================================================================
1260
+//====================== I2C Position Encoder Settings ======================
1261
+//===========================================================================
1262
+/**
1263
+ *  I2C position encoders for closed loop control.
1264
+ *  Developed by Chris Barr at Aus3D.
1265
+ *
1266
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1267
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1268
+ *
1269
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1270
+ *  Alternative Supplier: http://reliabuild3d.com/
1271
+ *
1272
+ *  Reilabuild encoders have been modified to improve reliability.
1273
+ */
1274
+
1275
+//#define I2C_POSITION_ENCODERS
1276
+#if ENABLED(I2C_POSITION_ENCODERS)
1277
+
1278
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1279
+                                                            // encoders supported currently.
1280
+
1281
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1282
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1283
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1284
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1285
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1286
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1287
+                                                            // for rotary encoders this is ticks / revolution.
1288
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1289
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1290
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1291
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1292
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1293
+                                                            // printer will attempt to correct the error; errors
1294
+                                                            // smaller than this are ignored to minimize effects of
1295
+                                                            // measurement noise / latency (filter).
1296
+
1297
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1298
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1299
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1300
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1301
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1302
+  //#define I2CPE_ENC_2_INVERT
1303
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1304
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1305
+
1306
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1307
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1308
+
1309
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1310
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1311
+
1312
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1313
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1314
+
1315
+  // Default settings for encoders which are enabled, but without settings configured above.
1316
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1317
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1318
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1319
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1320
+  #define I2CPE_DEF_EC_THRESH       0.1
1321
+
1322
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1323
+                                                            // axis after which the printer will abort. Comment out to
1324
+                                                            // disable abort behaviour.
1325
+
1326
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1327
+                                                            // for this amount of time (in ms) before the encoder
1328
+                                                            // is trusted again.
1329
+
1330
+  /**
1331
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1332
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1333
+   * error rolling average when attempting to correct only for skips and not for vibration.
1334
+   */
1335
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1336
+
1337
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1338
+  #define I2CPE_ERR_ROLLING_AVERAGE
1339
+
1340
+#endif // I2C_POSITION_ENCODERS
1341
+
1259 1342
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h View File

@@ -1263,4 +1263,87 @@
1263 1263
   //#define USER_GCODE_5 "G28\nM503"
1264 1264
 #endif
1265 1265
 
1266
+//===========================================================================
1267
+//====================== I2C Position Encoder Settings ======================
1268
+//===========================================================================
1269
+/**
1270
+ *  I2C position encoders for closed loop control.
1271
+ *  Developed by Chris Barr at Aus3D.
1272
+ *
1273
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1274
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1275
+ *
1276
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1277
+ *  Alternative Supplier: http://reliabuild3d.com/
1278
+ *
1279
+ *  Reilabuild encoders have been modified to improve reliability.
1280
+ */
1281
+
1282
+//#define I2C_POSITION_ENCODERS
1283
+#if ENABLED(I2C_POSITION_ENCODERS)
1284
+
1285
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1286
+                                                            // encoders supported currently.
1287
+
1288
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1289
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1290
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1291
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1292
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1293
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1294
+                                                            // for rotary encoders this is ticks / revolution.
1295
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1296
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1297
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1298
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1299
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1300
+                                                            // printer will attempt to correct the error; errors
1301
+                                                            // smaller than this are ignored to minimize effects of
1302
+                                                            // measurement noise / latency (filter).
1303
+
1304
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1305
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1306
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1307
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1308
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1309
+  //#define I2CPE_ENC_2_INVERT
1310
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1311
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1312
+
1313
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1314
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1315
+
1316
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1317
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1318
+
1319
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1320
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1321
+
1322
+  // Default settings for encoders which are enabled, but without settings configured above.
1323
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1324
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1325
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1326
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1327
+  #define I2CPE_DEF_EC_THRESH       0.1
1328
+
1329
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1330
+                                                            // axis after which the printer will abort. Comment out to
1331
+                                                            // disable abort behaviour.
1332
+
1333
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1334
+                                                            // for this amount of time (in ms) before the encoder
1335
+                                                            // is trusted again.
1336
+
1337
+  /**
1338
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1339
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1340
+   * error rolling average when attempting to correct only for skips and not for vibration.
1341
+   */
1342
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1343
+
1344
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1345
+  #define I2CPE_ERR_ROLLING_AVERAGE
1346
+
1347
+#endif // I2C_POSITION_ENCODERS
1348
+
1266 1349
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -1254,4 +1254,87 @@
1254 1254
   //#define USER_GCODE_5 "G28\nM503"
1255 1255
 #endif
1256 1256
 
1257
+//===========================================================================
1258
+//====================== I2C Position Encoder Settings ======================
1259
+//===========================================================================
1260
+/**
1261
+ *  I2C position encoders for closed loop control.
1262
+ *  Developed by Chris Barr at Aus3D.
1263
+ *
1264
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1265
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1266
+ *
1267
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1268
+ *  Alternative Supplier: http://reliabuild3d.com/
1269
+ *
1270
+ *  Reilabuild encoders have been modified to improve reliability.
1271
+ */
1272
+
1273
+//#define I2C_POSITION_ENCODERS
1274
+#if ENABLED(I2C_POSITION_ENCODERS)
1275
+
1276
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1277
+                                                            // encoders supported currently.
1278
+
1279
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1280
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1281
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1282
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1283
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1284
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1285
+                                                            // for rotary encoders this is ticks / revolution.
1286
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1287
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1288
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1289
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1290
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1291
+                                                            // printer will attempt to correct the error; errors
1292
+                                                            // smaller than this are ignored to minimize effects of
1293
+                                                            // measurement noise / latency (filter).
1294
+
1295
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1296
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1297
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1298
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1299
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1300
+  //#define I2CPE_ENC_2_INVERT
1301
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1302
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1303
+
1304
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1305
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1306
+
1307
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1308
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1309
+
1310
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1311
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1312
+
1313
+  // Default settings for encoders which are enabled, but without settings configured above.
1314
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1315
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1316
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1317
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1318
+  #define I2CPE_DEF_EC_THRESH       0.1
1319
+
1320
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1321
+                                                            // axis after which the printer will abort. Comment out to
1322
+                                                            // disable abort behaviour.
1323
+
1324
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1325
+                                                            // for this amount of time (in ms) before the encoder
1326
+                                                            // is trusted again.
1327
+
1328
+  /**
1329
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1330
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1331
+   * error rolling average when attempting to correct only for skips and not for vibration.
1332
+   */
1333
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1334
+
1335
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1336
+  #define I2CPE_ERR_ROLLING_AVERAGE
1337
+
1338
+#endif // I2C_POSITION_ENCODERS
1339
+
1257 1340
 #endif // CONFIGURATION_ADV_H

+ 83
- 0
Marlin/example_configurations/wt150/Configuration_adv.h View File

@@ -1257,4 +1257,87 @@
1257 1257
   //#define USER_GCODE_5 "G28\nM503"
1258 1258
 #endif
1259 1259
 
1260
+//===========================================================================
1261
+//====================== I2C Position Encoder Settings ======================
1262
+//===========================================================================
1263
+/**
1264
+ *  I2C position encoders for closed loop control.
1265
+ *  Developed by Chris Barr at Aus3D.
1266
+ *
1267
+ *  Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
1268
+ *  Github: https://github.com/Aus3D/MagneticEncoder
1269
+ *
1270
+ *  Supplier: http://aus3d.com.au/magnetic-encoder-module
1271
+ *  Alternative Supplier: http://reliabuild3d.com/
1272
+ *
1273
+ *  Reilabuild encoders have been modified to improve reliability.
1274
+ */
1275
+
1276
+//#define I2C_POSITION_ENCODERS
1277
+#if ENABLED(I2C_POSITION_ENCODERS)
1278
+
1279
+  #define I2CPE_ENCODER_CNT         1                       // The number of encoders installed; max of 5
1280
+                                                            // encoders supported currently.
1281
+
1282
+  #define I2CPE_ENC_1_ADDR          I2CPE_PRESET_ADDR_X     // I2C address of the encoder. 30-200.
1283
+  #define I2CPE_ENC_1_AXIS          X_AXIS                  // Axis the encoder module is installed on.  <X|Y|Z|E>_AXIS.
1284
+  #define I2CPE_ENC_1_TYPE          I2CPE_ENC_TYPE_LINEAR   // Type of encoder:  I2CPE_ENC_TYPE_LINEAR -or-
1285
+                                                            // I2CPE_ENC_TYPE_ROTARY.
1286
+  #define I2CPE_ENC_1_TICKS_UNIT    2048                    // 1024 for magnetic strips with 2mm poles; 2048 for
1287
+                                                            // 1mm poles. For linear encoders this is ticks / mm,
1288
+                                                            // for rotary encoders this is ticks / revolution.
1289
+  //#define I2CPE_ENC_1_TICKS_REV     (16 * 200)            // Only needed for rotary encoders; number of stepper
1290
+                                                            // steps per full revolution (motor steps/rev * microstepping)
1291
+  //#define I2CPE_ENC_1_INVERT                              // Invert the direction of axis travel.
1292
+  #define I2CPE_ENC_1_EC_METHOD     I2CPE_ECM_NONE          // Type of error error correction.
1293
+  #define I2CPE_ENC_1_EC_THRESH     0.10                    // Threshold size for error (in mm) above which the
1294
+                                                            // printer will attempt to correct the error; errors
1295
+                                                            // smaller than this are ignored to minimize effects of
1296
+                                                            // measurement noise / latency (filter).
1297
+
1298
+  #define I2CPE_ENC_2_ADDR          I2CPE_PRESET_ADDR_Y     // Same as above, but for encoder 2.
1299
+  #define I2CPE_ENC_2_AXIS          Y_AXIS
1300
+  #define I2CPE_ENC_2_TYPE          I2CPE_ENC_TYPE_LINEAR
1301
+  #define I2CPE_ENC_2_TICKS_UNIT    2048
1302
+  //#define I2CPE_ENC_2_TICKS_REV   (16 * 200)
1303
+  //#define I2CPE_ENC_2_INVERT
1304
+  #define I2CPE_ENC_2_EC_METHOD     I2CPE_ECM_NONE
1305
+  #define I2CPE_ENC_2_EC_THRESH     0.10
1306
+
1307
+  #define I2CPE_ENC_3_ADDR          I2CPE_PRESET_ADDR_Z     // Encoder 3.  Add additional configuration options
1308
+  #define I2CPE_ENC_3_AXIS          Z_AXIS                  // as above, or use defaults below.
1309
+
1310
+  #define I2CPE_ENC_4_ADDR          I2CPE_PRESET_ADDR_E     // Encoder 4.
1311
+  #define I2CPE_ENC_4_AXIS          E_AXIS
1312
+
1313
+  #define I2CPE_ENC_5_ADDR          34                      // Encoder 5.
1314
+  #define I2CPE_ENC_5_AXIS          E_AXIS
1315
+
1316
+  // Default settings for encoders which are enabled, but without settings configured above.
1317
+  #define I2CPE_DEF_TYPE            I2CPE_ENC_TYPE_LINEAR
1318
+  #define I2CPE_DEF_ENC_TICKS_UNIT  2048
1319
+  #define I2CPE_DEF_TICKS_REV       (16 * 200)
1320
+  #define I2CPE_DEF_EC_METHOD       I2CPE_ECM_NONE
1321
+  #define I2CPE_DEF_EC_THRESH       0.1
1322
+
1323
+  //#define I2CPE_ERR_THRESH_ABORT  100.0                   // Threshold size for error (in mm) error on any given
1324
+                                                            // axis after which the printer will abort. Comment out to
1325
+                                                            // disable abort behaviour.
1326
+
1327
+  #define I2CPE_TIME_TRUSTED        10000                   // After an encoder fault, there must be no further fault
1328
+                                                            // for this amount of time (in ms) before the encoder
1329
+                                                            // is trusted again.
1330
+
1331
+  /**
1332
+   * Position is checked every time a new command is executed from the buffer but during long moves,
1333
+   * this setting determines the minimum update time between checks. A value of 100 works well with
1334
+   * error rolling average when attempting to correct only for skips and not for vibration.
1335
+   */
1336
+  #define I2CPE_MIN_UPD_TIME_MS     100                     // Minimum time in miliseconds between encoder checks.
1337
+
1338
+  // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
1339
+  #define I2CPE_ERR_ROLLING_AVERAGE
1340
+
1341
+#endif // I2C_POSITION_ENCODERS
1342
+
1260 1343
 #endif // CONFIGURATION_ADV_H

Loading…
Cancel
Save