Anyone tried enabling PWM for the bed heater?

Discussions about firmware/slicing software, tweaks and settings
Post Reply
andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Anyone tried enabling PWM for the bed heater?

Post by andrewsi » Sat Feb 22, 2014 4:37 am

I was curious to try enabling bed PWM in Marlin to see if it is able to hold the bed temp to a tighter tolerance and potentially decrease cyclic expansion/contraction across a few degrees C. It may not help with some Z artifacts I was trying to cure, but I wanted to give it a shot, anyway.

So I recompiled Marlin with the bed heater PWM enabled and then used the M303 command to try autotuning the PID for the bed. It got going and heated up to the setpoint and then ran about one cycle, reporting a rough set of PID tuning values back to the console, but then the whole thing shut itself down! (The LCD was still on, but the heater shut off and even the main extruder fan shut off completely, which is never a good sign.) Luckily after power cycling the board and reuploading the firmware with PWM turned back off for the bed everything was normal again.

Has anyone else tried to enable this feature? The electronics output for the extruder and the bed appear to be essentially identical so I'd think it should work, but maybe not.
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Post by andrewsi » Sun Mar 02, 2014 3:59 am

Follow-up: Not sure why it didn't work right the first time, but I now have bed PID working fine with the following constants in Marlin's configuration.h:
(Uncomment the line that says "#define PIDTEMPBED" so that it will be active.)
#define DEFAULT_bedKp 97.1
#define DEFAULT_bedKi 1.41
#define DEFAULT_bedKd 1675.16

This was tuned for a setpoint of 55C (printing PLA.)

This is _important_ because I was having some very annoying z-ribbing issues in almost all of my prints. When I tried printing unheated on blue tape instead, the ribbing problems immediately went away: The 3.0 bed is expanding and contracting just enough to cause inconsistent layer height when the heater is in bang-bang mode (as it is when downloading the firmware from the Felix site.)

By running the bed in PID mode the fluctuations on either side of the set point are significantly reduced, so you can have the best of both worlds: heated bed prints, and also smooth walls without ribbing artifacts. I'm much happier now.
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

satoer
Posts: 436
Joined: Mon Oct 01, 2012 8:00 pm
Location: Netherlands

Post by satoer » Sun Mar 02, 2014 7:42 pm

Is it also posible to use PWM on the hot-end heater?
My Felix 1.5 printed designs on Thingiverse
E3D V6 Hot end upgrade for your Felix
Tweezer bracket for your Felix
Led bar upgrade for your Felix

andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Post by andrewsi » Sun Mar 02, 2014 7:48 pm

It already does by default, no changes are required. There are some designs where PID control and PWM(partial power) can't be used on the bed safely due to use of mechanical relays or other electronics that don't like rapid switching, which seems to be why the Marlin firmware doesn't enable it by default as is the case for the hot end.
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

Post Reply