Controlling a chamber heater

Basic Information:

Printer Model: any
MCU / Printerboard: Manta M5P
Host / SBC
no klippy.log because it’s a project idea, not done yet

Hello guys. I have a (maybe) crazy idea, and as I’m not an engineer, I need some guidance/advice please.

Do you think I could control a PTC heater for an enclosure using the spare “HE1” pin on a Manta M5p board, coupled with a thermistor?

I was thinking about adding a 30A 24v hotbed Mosfet to add the PTC’s PSU.

in theory, the “HE” pin would send the signal for the PTC to heat and the Mosfet control the power right?

Can I use the "heater_generic " configuration section with a “heater E” port?

let me know your thoughts/expertise about that. thank you!

1 Like

Disclaimer: I’m not an electrical safety expert and don’t have experience with active chamber heating. Anything you try is at your own risk.

According to the BTT Wiki, the M5P can only handle 5.5A on the E ports and 10A on the heat bed.

For 30A, you’ll need a different way to control it. You may be able to use relays (see Controlling a chamber heater through a relay connected to RPI4 via GPIO and monitored with a DS18B20), but you’ll have to make sure your relay model can handle 30A. Try at your own risk. 30A is a lot of current.

Also, just to be safe, you can add a temperature sensor to the heater itself, in addition to the ambient sensor, with a max_temp to reduce the risk of fires.

An N-Channel MOSFET is NOT a replacement for a Solid State Relay

Please be careful when working with high currents/AC voltages and make sure you know what you’re doing!

2 Likes

Thank you for pointing that out. I’ve updated my reply.

So using a relay is better than a mosfet. Do you know how how I can add a relay in Klipper, Sir?

A Solid State Relay is used when you are providing AC to your heated bed.

An N-Channel MOSFET (I highly recommend that you use the full name when referring to it so there won’t be any confusion) is used when you are providing DC to your heated bed.

First off, in your original post, you are proposing adding a heated enclosure using a “PTC Heater”. I don’t know of anybody who is doing that - normally heated chambers have a traditional resistive heater along with a fan that blows heated air into the enclosure. A Thermistor is used to monitor the chamber temperature and the value returned from the thermistor is used to control the resistive heater output. From what I’ve seen, the fan is running constantly.

The temperature can be controlled by heater_generic can be used to take the Thermistor output and control the heating element. The question comes in does it make more sense to use a DC heater (which works exactly like a typical heated bed or extruder heater and uses the same N-Channel MOSFET for control) or an AC heater (which you can see the wiring in a Voron printer).

Along with that, you’re going to have to look at your enclosure, decided on how (and if) you are going to insulate it, it’s volume and how it will be sealed (ideally with a single air inlet and air outlet - you might want to put a filter on the outlet for microplastics and vapous).

With an understanding of the enclosure, you will know the volume of air you will have to heat and how much energy that will take (the thermodynamic equations for this are pretty simple and will get you into the ball park). You’ll need a reasonably powerful fan to make sure that the chamber will heat evenly.

Adding a relay or N-Channel MOSFET is fairly easy to do and there are lots of resources to show you how to do it, before you can do that, you really need to understand the heater (and fan) requirements and then look at devices which will meet your needs.

Thank you for detailed answer. I will document myself about what you just explained.

So after some research I found something:

Using a DC heater with a fan, and assuming it is powered by a 24v PSU, I could use a DC-DC solid state relay?

Thank you.

Unless the DC heater takes in excess of 10A of current at 24V you can just use a typical N-Channel MOSFET driver like:

https://www.aliexpress.com/item/1005006457613501.html

They’re simple, cheap and reliable.

A DC-DC solid state relay is a lot more expensive and difficult to source the correct part - care must be taken to ensure that it is a DC-DC solid state relay and not the more common AC solid state relay.

I don’t know understand how to wire the part you share.

What about something like this:
https://a.aliexpress.com/_ExPwhXS

They have 25A with DC-DC.

Thanks again for trying to help me.

This is a counterfeit product of a renowned manufacturer. Go figure why they are so cheap.

EDIT:
Rough Mouser selection to give you an indication of a “regular” price range: Solid State Relays - Industrial Mount – Mouser Europe

1 Like

Than you Sineos. So I’d rather do something else, I’m not tech savvy enough and I don’t want to take the risk of burning everything down…

Thank you people for helping and explaining.

As I incorporated a chamber heater, I can share “wisdom”.
It is mostly simple, you need a heater, fan, and control for both of them.
There are existing PTC modules, as you mentioned

For simplicity, I think a 24v FAN + 200W heater is fine for an average user, for smaller printers - smaller heaters and vice versa.

A fan can be controlled and connected as you like, a simple solution is controller_fan and can be connected to free fan pins.

To control the heater, it is mostly simple:

  • AC Heater - AC Relay
  • DC Heater - DC Relay

Current can be calculated from power by voltage.
When you know the required Current you can choose relay.

The relay is connected to any pin, that can control it, in broad sense any fan/heater pin should work (AFAIK most relay with DC control expects 3 - 30v).

From a safety perspective it depends on your knowledge, thermal fuse + DC is pretty safe IMHO.
If you know how to work with AC, there should be no problem connecting it, it is basically the same with any AC bed heater.

I used 350w 220v heater, so there are only ~2A of current, so I got the first good-looking cheap 10A SSR and it just works.
(But I made an aluminum mount and FAN is controlled by ADC thermistor, so they are independent of PTC heater control).

BTW cause it is PTC, it has a nonlinear power/current curve, so there should be some headroom by current and PWM can not work as expected, like 30% is not 30% of power, cause when it is cold it drives more peak current.

The heater at the bottom and chamber is controlled from BME680 at a toolhead level.

Thats it.

I can’t tell you if it can be used because, as, I put at the end of my last post:

you really need to understand the heater (and fan) requirements and then look at devices [ie N-Channel MOSFETs or SSRs] which will meet your needs.

Before you decide on the heater and control wiring, you should be:

  1. Determining how you are going to make the enclosure.
  2. Figure out the heating/airflow requirements.
  3. Looking for fan/heating units and finding one that does the job and meets your budget.
    There are lots to chose from with different heating elements and fans, like:
    https://www.aliexpress.com/item/1005005087378727.html
  4. Once you have found right the fan/heating unit we can help you with the control electronics and wiring.

You’re asking for what needs to be done for step 4. and I haven’t seen the work done for the previous steps.

Thank you man for sharing your experience. I’ll check how to work with an AC SSR.

I would use a 200w 24V heater with a fan. I have an ender 3 so a small enclosure is enough and many people seem to use this kind of heater.a spare Ender MeanWell PSU 360watts should be enough to power it.

I checked the N channel mosfet you shared. This looks awesome and cheap.

What about the wiring please?

Obviously Vin is for the PSU inlet.
OUT is for the heater.

What about Trig/pwm and ground? There’s no + and - on a hotend port right?

Here is the project you are looking for. I, and many others, are using this basic design to great effect. I run two thermistors on my gantry (front right, and rear left) as a combined temp sensor controlling the chamber heater. As others have said, it’s mains power and heaters so be careful.

A config would look something like this:

[heater_generic ch]
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: PF5
gcode_id: C
heater_pin: PD14
min_temp: 0
max_temp: 130
control: pid
pid_Kp: 70.184
pid_Ki: 0.376
pid_Kd: 3274.071


[controller_fan ch_fan]
pin: PD15
heater: ch
idle_timeout: 60
stepper:

[verify_heater ch]
hysteresis = 3
check_gain_time = 240
heating_gain: .1
check_gain_time:600
max_error: 500

Additional Edit: No one is doing the DC heaters as the currents required to get effective output from the PTC are too high and the power supplies expensive. While you are at it, get a blanket (or PIR if you want to go fancy) covering your chamber. You’ll get higher temps and faster heats.

1 Like

@ray_boy :

Please always format code as Preformatted Text
Format

Thank you man! But my main concern is about the electronics side. There’s no information about the controller or relay whatever. Sorry I’m still learning about electronics. How do you control the heater?

The heater is controlled via PID through heater_generic in the klipper config provided. You specify the (heater_pin) for your board and klipper controls the heater against the temperature sensor specified (sensor_pin / sensor_type). The controller_fan is there to blow anytime that the heater is ON.

Note that the heater pin is signal only and doesn’t deliver any power.

The relay is specified in the github page as a Omron G3NA or if you want the cheaper and more dangerous FOTEK AliExpress version. The risk with FOTEK is that they have been known to fail closed (always ON). So in this schematic there is no protection for that failure mode unless you have a thermal switch/fuse on your PTC. Some models of PTC have this thermal switch attached.

Very basic diagram: