Yep. You want the software PWM for fans. Following are my personal mods to Configuration.h and Configuration_Adv.h (my personal mods to cmenard's Marlin branch dated 24 Mar 2014). These were for my V3B hot end, before I got on the beta for the dual extruder. That's why the branch it's derived from is almost a year old -- when I did the upgrade from 12/19 volt to 24 volt operation.
Configuration.h:
DEFAULT values of PID constants. I did a quick autotune, rounded the gains down to keep them conservative, and put them in the firmware, so even if I do a revert to factory settings, they'll still be reasonably close. These are overridden by doing an autotune, then a write of parameters, then a save to EEPROM with M500:
Code: Select all
// MakerGear
// #define DEFAULT_Kp 7.0
// #define DEFAULT_Ki 0.1
// #define DEFAULT_Kd 12
// DALE'S AUTOTUNE VALUES FOR 24 VOLT MAKERGEAR M2
#define DEFAULT_Kp 26.00
#define DEFAULT_Ki 2.00
#define DEFAULT_Kd 86.00s
Code: Select all
// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
// shouldn't use bed PID until someone else verifies your hardware works.
// If this is enabled, find your own PID constants below.
// DALE ENABLED BED TEMPERATURE PID!
#define PIDTEMPBED
Code: Select all
// #define DEFAULT_bedKp 10.00
// #define DEFAULT_bedKi .023
// #define DEFAULT_bedKd 305.4
// DALE'S AUTOTUNE VALUES FOR 24 VOLT MAKERGEAR M2
#define DEFAULT_bedKp 210.0
#define DEFAULT_bedKi 8.0
#define DEFAULT_bedKd 1360.0
Code: Select all
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
// DALE'S MAKERGEAR M2 DOESN'T HAVE A VIKI LCD!
//#define LCD_I2C_VIKI
Code: Select all
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE.
// DALE'S M2 USES 24 VOLT FANS WITH SLOW (123 Hz) PWM!!!
#define FAN_SOFT_PWM
// Incrementing this by 1 will double the software PWM frequency,
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
// However, control resolution will be halved for each increment;
// at zero value, there are 128 effective control positions.
#define SOFT_PWM_SCALE 4
I changed my idle time (before the stepper motors drop power, dropping the bed) to 5 minutes. (Changing this to zero disables the timeout, I believe...)
Code: Select all
//default stepper release if idle
// DALE SET THIS TO 5 MINUTES FOR HIS MAKERGEAR M2!!!
#define DEFAULT_STEPPER_DEACTIVE_TIME 600
Hope this helps!
YMMV, of course...
Dale