Browse Source

Expose motor current in more configs, disable by default

Scott Lahteine 8 years ago
parent
commit
0c48eaf3de

+ 2
- 2
Marlin/Configuration_adv.h View File

@@ -274,8 +274,8 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
-// Motor Current controlled via PWM (Only functional when motor driver current is driven by PWM on supported boards)
278
-#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279 279
    
280 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
281 281
 //#define DIGIPOT_I2C

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -279,6 +279,9 @@
279 279
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
280 280
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
281 281
 
282
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
283
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
284
+   
282 285
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
283 286
 //#define DIGIPOT_I2C
284 287
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -282,6 +282,9 @@
282 282
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
283 283
 #define DIGIPOT_MOTOR_CURRENT {175,175,240,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
284 284
 
285
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
286
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
287
+   
285 288
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
286 289
 //#define DIGIPOT_I2C
287 290
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

+ 3
- 0
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

@@ -276,6 +276,9 @@
276 276
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 277
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 278
 
279
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
280
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
281
+   
279 282
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 283
 //#define DIGIPOT_I2C
281 284
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -276,6 +276,9 @@
276 276
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277 277
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
278 278
 
279
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
280
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
281
+   
279 282
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280 283
 //#define DIGIPOT_I2C
281 284
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -275,6 +275,9 @@
275 275
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
276 276
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
277 277
 
278
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
279
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
280
+   
278 281
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
279 282
 //#define DIGIPOT_I2C
280 283
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -279,6 +279,9 @@
279 279
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
280 280
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
281 281
 
282
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
283
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
284
+   
282 285
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
283 286
 //#define DIGIPOT_I2C
284 287
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

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

@@ -274,6 +274,9 @@
274 274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275 275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276 276
 
277
+// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
278
+//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
279
+   
277 280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278 281
 //#define DIGIPOT_I2C
279 282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

+ 1
- 1
Marlin/stepper.cpp View File

@@ -91,7 +91,7 @@ static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_
91 91
   #ifndef PWM_MOTOR_CURRENT
92 92
     #define PWM_MOTOR_CURRENT DEFAULT_PWM_MOTOR_CURRENT
93 93
   #endif
94
-  int motor_current_setting[3] = PWM_MOTOR_CURRENT;
94
+  const int motor_current_setting[3] = PWM_MOTOR_CURRENT;
95 95
 #endif
96 96
 
97 97
 static bool check_endstops = true;

Loading…
Cancel
Save