Browse Source

Expose motor current in more configs, disable by default

Scott Lahteine 9 years ago
parent
commit
0c48eaf3de

+ 2
- 2
Marlin/Configuration_adv.h View File

274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
281
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C

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

274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
279
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
280
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
285
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
283
 //#define DIGIPOT_I2C
286
 //#define DIGIPOT_I2C
284
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
282
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
283
 #define DIGIPOT_MOTOR_CURRENT {175,175,240,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
288
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
286
 //#define DIGIPOT_I2C
289
 //#define DIGIPOT_I2C
287
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
276
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
282
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 //#define DIGIPOT_I2C
283
 //#define DIGIPOT_I2C
281
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
276
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
277
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
282
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 //#define DIGIPOT_I2C
283
 //#define DIGIPOT_I2C
281
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
276
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
281
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
279
 //#define DIGIPOT_I2C
282
 //#define DIGIPOT_I2C
280
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
279
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
280
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
285
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
283
 //#define DIGIPOT_I2C
286
 //#define DIGIPOT_I2C
284
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
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
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
274
 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
 #define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
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
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
280
 // uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
 //#define DIGIPOT_I2C
281
 //#define DIGIPOT_I2C
279
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
282
 // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8

+ 1
- 1
Marlin/stepper.cpp View File

91
   #ifndef PWM_MOTOR_CURRENT
91
   #ifndef PWM_MOTOR_CURRENT
92
     #define PWM_MOTOR_CURRENT DEFAULT_PWM_MOTOR_CURRENT
92
     #define PWM_MOTOR_CURRENT DEFAULT_PWM_MOTOR_CURRENT
93
   #endif
93
   #endif
94
-  int motor_current_setting[3] = PWM_MOTOR_CURRENT;
94
+  const int motor_current_setting[3] = PWM_MOTOR_CURRENT;
95
 #endif
95
 #endif
96
 
96
 
97
 static bool check_endstops = true;
97
 static bool check_endstops = true;

Loading…
Cancel
Save