Prevent AC bed from tripping breaker?

Basic Information:

Printer Model: Custom built ~700x650x450

MCU / Printerboard: BTT octopus pro + EXP MOT module

Host / SBC: raspberry pi 4

klippy.log:

klippy070425.log.txt (41.3 KB)

It has been a while, hi, I hope I’m posting this in the right place :slight_smile:

My question: for my printer, I want to add a heater to the bed. Because of the size of the bed(it is 800x800, though not fully usable), I currently intend to combine four heater pads, by connecting them in parallel and using an SSR.

The heaters I want to buy, however, are 1000watts. My wiring to the power socket is 3600 watts (16A) rated.

Can I use the max_power parameter to stay below this value? Preferrably I’d turn it down to 2500, but atleast 3000 watts. And even if that does work for the wiring, does it also work for my breaker?

From what I gather, the max_power changes the average power by doing PWM or PWM-ish things that I dont fully understand. But I believe it basically just means that at half power it just is at full power, but only half the time, divided in very short blips? This to me sounds like it would probably still make my breaker unhappy, but I would think that the wiring may very well be fine?

The heaters I have currently picked are easy to come by here in the Netherlands, with fast shipping and no additional customs fees and the like. They are also considerably cheaper at 55 euros vs 100ish at for example keenovo.

Your advice please, it is much appreciated!

Edit: changed series to parallel, did always mean parallel, but words are hard​:sweat_smile:

As far as I understand.
Breakers have a “time/current curve”, which means that basically, it is a “heater (resistor)” inside the breaker.
Which got “heated” from the current, and will trip on “overheat”.
It has an inertial, and it will pop after some time if there are 16A, and may not pop if there are 32A briefly.

Example 16A C breaker: https://www.proshop.nl/Componenten-voor-schakelkasten-en-kasten/Schneider-Electric-Acti9-ic60n-miniature-circuit-breaker-2p-16a-c-curve/2762802
Example spec for B: Tripping characteristics in miniature circuit breakers explained - Etigroup

So, I would expect that if C withstands more than B, and B should be popped at x2 current only after 32s.
I would expect that a 16A C curve breaker should pop with 32A, after at least 32s, or later.

You need to check the datasheet for your breaker to know that for sure.

Otherwise, yes, basically, PWM enables and disables the heater for some fraction of a second.

So, you normally should interpret that as 50% PWM, heater enabled 50% of the time.
But because of how heater control is implemented, basically, as long as heaters are enabled for more than 10ms in a row, they can all be enabled at the same time.
So, for the default 0.1s cycle time (100ms), if you control 4 heaters with different GPIO/Thermistors, from the same MCU:
At 40% (40ms/100ms) all 4 heaters will be enabled, at some point in time.
At 30% - 3 heaters and so on.

And there is also a limitation of SSR zero crossing, so they may not be enabled for a fraction of the time, or enabled for an additional fraction, as shown in the post above.
That means that actual/real power will vary, even if they are all fixed at 10%, for example.

So, you can limit the PWM with max_power.
As a last resort, you can look here: https://github.com/Klipper3d/klipper/pull/6837
It should allow for arbitrary power limits, over (for example) the sum power of all heaters.

Hope that explains something,
-Timofey

1 Like

How are the pads rated (V and A)?

1 Like

4 heaters in series means your input voltage needs to be 4 x the heaters “nominal” voltage or you are not going to get much heat output.

Remember Power = I^2*R

For a given voltage, double the resistance results in half the current and half the power for the 2 resistors to share. 4x the resistance results in 1/4 the current and 1/4 the total power.

3 Likes

Apologies, I meant in parallel​:sweat_smile: I did have it right in my head, I just put the wrong word down.. Thanks for taking the time te reply!

Thanks for typing such an extensive reply!

I did come across your post that you linked, but I had difficulty following it, as I am not that well versed in the workings of these things (hence my questions, I suppose​:sweat_smile:). I’ll have to read through it a couple more times to make it make sense in my brain, I think.

I had intended to combine the four heaters (in parallel, not series, I’ll edit my post after this reply), and use one thermistor, so treat the whole thing as one big heater. It sounds to me that if I limit the max_power parameter to say 0.5, that will in fact work and be safe, correct? Or am I misunderstanding?

I will later this weekend take a deeper look into it regardless, and hopefully talk with some of my colleagues that are electric engineers, to try and have a better feeling and understanding for it.

Again thanks for your reply!

in parallel, not series, I’ll edit my post after this reply), and use one thermistor

Normally, you can’t because of the current hogging.
Resistors are not equal, so one will produce more heat, and another will produce too low amount of the heat.

So, it is risky, because one can (and will “Murphy law”) overheat, unless there is good enough thermal transfer between them all and the thermistor, which I doubt unless you have a massive, thick plate.

Normally, parallel heaters are only “safe” if they are all PTC, so they increase the resistance and lose power with the rise of the temperature, so they will be auto-balanced.

max_power parameter to say 0.5

Yes, it should limit the total average power to half of the nominal power and should normally avoid the trip of the breaker for your example.

-Timofey

1 Like

The plate is 20mm thick 800x800, so in my eyes quite massive xd. But it is clear that from a safety perspective this isnt adviseable regardless.

I have a bit of difficulty figuring out how I could seperate them well enough in other ways, though I guess thats the sort of set ups you were describing in your previous response.

I suppose I would have to have four SSRs, connect them each to different sets of output pins, and then controll them in such a way that the SSRs arent open at the same time as each other? As I imagine if they are all open simultaneously we end up at the exact same issue, just with extra steps..

Man, always when you think something might actually be simple…:sweat_smile:

You may find benefit revieing this:

You can add a Raspberry Pi Pico to run several SSRs and read multiple thermistors. Use care when selecting pull up resistors.

Depending on heater availability I’d be tempted to put a 300 x 300, 2500-3000w pad in the middle and long narrow ones along the edges. That allows you to run small prints with 1 heater and no “tricks”. Only big prints would need to modulate the 5 heaters. AND you might find over hot edges with no mid heater works better with some filaments.

I ended up trying the easy way first, connecting them all up in parallel through one SSR, and with a seperate thermistor in a hole I drilled in the center of the bed.

This seems to work very well actually, looking through a thermal cam I cannot tell where one heater pad ends and the other begins.

As I said I do have a chonky bed so that will probably be the reason. For reference, to PID tune it I let it calibrate for 50 degrees, and it takes about 12 minutes for it to lower from 50 back to 45 before it starts the next cycle, so that took a while… My k_d value ended up being 5026, which I had never seen before on a printer, I suppose because of the inertia of this system.

I want to add the four temperature sensors of the heaters in, too, so I can let it shutdown if there is too much deviation. I will have to figure out how to add all of those though, as I am not proficient in doing stuff with a Pi, and my board can only take one or two more sensors I believe. I’ll find some guides though, I am sure :slight_smile:

The current setup does make lights flicker, even at 0.5 power and with the “magic numbers” to best compliment the net frequency.

two more sensors I believe.

There are I2C multi-channel ADC modules: Configuration reference - Klipper documentation

Which can help, and IIRC, they can support 4 thermistors.

You say the bed is 20mm thick. If it’s taking that long to heat up/cool down and has that much thermal mass then you’re going to rethink a few things.

The first one is the need for more than one temperature sensor. If it takes 12 minutes to change five degrees, you’re going to have a very even temperature throughout the aluminum bed. I don’t think you need more than one - the bed is going to be a very even temperature.

Second, I’m not sure that PID control is the best method for maintaining temperature. Personally, I would recommend trying waterfall and seeing how that works for you.

Third, what is the SSR rated for? I’m seeing currents discussed in this thread of 32A, which is a lot and unless it can handle a goodly amount of current (personally, I would want one that handles 50A for safety) then you should be checking to see if it’s getting warm.

Fourth, how are you powering the bed from your breaker panel and what kind of wiring are you using? Seeing the statement above gets me nervous.

Having lights flicker when your printer heating doesn’t make it “awesome”.

I hope you understand that the SSR is a binary device, it’s either on or off. “0.5 power” does not mean it draws half the rated current, every time it’s on it draws the full current, just half the time.

If you’re lights are flickering, then you’re overloading the circuit. At a minimum, your heated bed should be wired through a separate breaker on your panel (60A) and I would recommend that you have it wired like an electric clothes dryer or stove with the appropriate plug.

I don’t know where you live, but this should be a question for a certified electrician. It may also change the parts you use/require. if you are in North America where regular house voltage is 120V but dryer voltage is 240V.

In any case, consult an electrician about what you are doing. Don’t listen to a bunch of yahoos on the interwebs.

3 Likes

One solution that comes to mind based on your self imposed 50% duty cycle.

Put a pair of high current diodes behind the SSR and power 2 heaters off each branch.

Set your PWM frequency to 0.05 HZ (20 seconds) with 100% PWM. That cuts your peek current in half but still heats all 4 pads simultaneously.

For industrial process control of heat elements with large thermal inertia a PD control is often a used. Unless the I term is calculated over an extremally long time base it works against stability.

Be safe and realize “flickering lights” are a source of host computer and MCU board resets. Your machine SHOULD NOT be plugged into a typical wall plug.

For your existing setup what is your PWM reading after the temperature stabilizes?

1 Like

What’s this supposed to do?

Is PD available in Klipper? This is why I suggested waterfall.

Thanks for the reply, i appreciate it greatly that you and the others that have replied so far are prepared to take so much time to help me along.

Regardless of anything, I will definitely let an electrician check what I’ve done before actually running it without being in the room with it.

Fair enough, I got a bit cautious because an earlier reply mentioned that the heaters might get out of balance, but the mass of the bed most likely counteracts that.

Do you mean watermark? That’s a “bang bang” type of control, right? I cannot find something called waterfall. I did want to see what watermark does to it all, also regarding the flickering. More on the flickering in a bit.

It is rated for 40A. At the full 4000 watts for 230 volts it should still only be running about 17.4 Amps if I math’d correctly. When heating initially it gets a little warm (still comfortable to touch, luke warm), and when the bed is only keeping temperature it gets pretty much completely cold. Seems to me like that should be fine.

I am not sure I fully understand the question, but the wiring is rated for 16A at 220-240 volts. It is simply plugged into a socket, I have not laid dedicated wiring for it or anything like that.

As for the flickering: I think it’s partly related to the type of lights aswell, as not all of them do it. My bambulab x1c causes the same with it’s heated bed, because it was so annoying I moved it to a different room/building so that it was no longer on the same group. Things like the microwave and electric heaters have similar effects.

I find the whole thing about PWM still a bit difficult. I did already understand what you said about the relay letting through either nothing or 100%. And that with pwm it basically changes the amount of time it is on vs off.

The question to me then is: does that actually matter, or is it functionally the same as constant use of say, 70% power?

To me it seems that the limitations of the cable are heat. If I set max_power to 0.7, resulting in an average power of 70% then the cables also experience that average power, dont they? In my mind they work the same as the heater, so if I can limit the amount of heating power per time that the heater produces by this setting, surely that’s also what happens for the cables?

Again, and by now that should be clear I think, I don’t know a lot about this stuff, and I will let someone proffesional look at what I have done so far. These are just my ramblings.

Yes, sorry, I meant “watermark”. It’s how a home thermostat works - Mentally, that’s how I label it, not was “watermark”.

You’re overloading the circuit and, as @cardoc noted, this can cause damage to other devices on the circuit (ie Microwaves, TVs, phones, chargers, basically everything).

Please show your calculations, I think you’re at 75% of what you should be at.

In any case, you MUST be considering the worst possible case and that would be the SSR stuck on or the controller failing and keeping the SSR on constantly.

Again, wire for the worst case. Also, you don’t have to just worry about the cable from the socket to the SSR, you also have to consider the wiring in the walls. Here in North America, 15A service allows 14 AWG solid core wiring in the walls which is rated for 16A.

From what you’ve written, it sounds like you’re in Europe and you will have to research for your country what is the basic current rating of the wiring built into walls for 15A/30A service.

Yes it matters; the SSR is acting like a switch turning on and off.

I suggest you do some research into the topic:

Again, I highly recommend that you consult with a certified electrician and make sure you are using wiring that is safe for where you live and for this application.

Sorry, I didn’t think it through. 2 half bridge rectifiers (4 diodes) to give each heater bank pulsed dc (essentially 50% PWM). Only 1 bank is on at any particular instant. The power grid “sees” 1 2000 W resistive load and the rectifiers split that sending half to each heater bank.

Watermark (not waterfall) is useable but I’d PID tune at 60 °C (will take a bloody long time) then hand edit the I term to 0.

It’s not 50% PWM, it’s 50% power. 50% PWM is 25% power (P = V^2 / R, so 0.5 Voltage squared is 0.25).

In any case, I wouldn’t recommend it because it’s 50% power and will take forever to heat up.

Good to know. Thanx.

JFYI, because of how PID is implemented (and it is correct).
If you get rid of I, it may never reach the target temperature.
Because I is intended for that job - search for a steady power level, where D is only to dump the oscillations.