Bed pwm banging hard



  • Hi,

    I usually print without heated bed but I just noticed that what I thought to be PWM looked really like bang bang.

    I tuned the heater with PID and config override seems to register PWM correctly: "M307 H0 A334.5 C256.4 D7.4 S1.00 B0"
    Also the bed heater pulses for 10 secs on/off which results in ca 4C up and down on the temp curve.

    Is the M307 the correct gcode or is there another configuration feature?

    Cheers


  • administrators

    It should be operating in PID mode because of the B0 parameter.

    Which firmware version are you running? Do you have a M501 command in config.g near the end, to load the parameters from config-override.g? Try running M307 H0 with no other parameters, to check what parameters are being used. If that reports the correct parameters, then it could be that tuning hasn't identified the parameters correctly, making the PID unstable. Try increasing the D parameter. The C parameter looks suspiciously low.



  • Ah I didnt have the M501. Now the temp curve is smooth. Thanks



  • On this topic, my bed (450w AC heater via ssr) auto tuned to these parameters

    M307 H0 A311.7 C649.8 D3.1 S1 B0

    And whilst it performs fine it never seems to reach a steady state of PWM, I have an energy meter on the printer and it shows around 500w total during heating, then back to 80w or so once heated and oscillates between the two. I'd expect it to stabilise around 150w-200w to maintain abs temps. Instead it almost behaves as if it is in bang bang mode. Not a big problem just curious, as it doesn't behave the way other bed heaters I've used with pwm on other firmwares (these have all been DC).



  • @DjDemonD:

    On this topic, my bed (450w AC heater via ssr) auto tuned to these parameters

    M307 H0 A311.7 C649.8 D3.1 S1 B0

    And whilst it performs fine it never seems to reach a steady state of PWM, I have an energy meter on the printer and it shows around 500w total during heating, then back to 80w or so once heated and oscillates between the two. I'd expect it to stabilise around 150w-200w to maintain abs temps. Instead it almost behaves as if it is in bang bang mode. Not a big problem just curious, as it doesn't behave the way other bed heaters I've used with pwm on other firmwares (these have all been DC).

    I think it is a matter of an interference between PWM frequency and and sampling and averaging period of your energy meter. And if you could average the power on a long enough interval you would get an expected 150-200W. For DC heater PSU make averaging by itself.


  • administrators

    The PID frequency for the bed is low (10Hz) so as to be compatible with all types of SSR. If you look at the bed heater LED on the Duet, it should show a steady flicker when the bed temperature is stable.



  • David, an interesting point IMO. According to SSR's datasheet it turn on/off only on half period boundaries. 10Hz=100ms is only 10 zero-crossing for 50Hz mains power here in Europe (16+ oversea), so only 11 possible duty factor for PWM: 0, 0.1, …, 0.9, 1. It seems to be very coarse control equivalent to about 3 1/2 bits resolution. Wouldn't it be better to use lower PWM frequency, something like 1..2Hz, or make sigma-delta regualtion on base of half-period on/off control?


  • administrators

    Yes it's course resolution, but still 10x better than using bang-bang. Sigma-delta may be worth considering as an alternative.



  • And what about low PWM frequency? Not enough thermal inertia of the bed heater or somthing else?


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.