# Controlling a chamber heater

**URL:** <https://klipper.discourse.group/t/controlling-a-chamber-heater/21087>\
**Category:** General Discussion\
**Created:** [January 2, 2025, 8:54pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087 "2025-01-02T20:54:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 2, 2025, 8:54pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/1 "2025-01-02T20:54:43Z")

</div>

### 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!

---

<div class="post-metadata">

**Author:** ![3dcoded](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/3dcoded/32/20297_2.png) [@3dcoded](https://klipper.discourse.group/u/3dcoded)\
**Post date:** [January 2, 2025, 9:03pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/2 "2025-01-02T21:03:56Z")

</div>

**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.

 ![Screenshot 2025-01-02 at 3.58.37 PM](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/6/c/6c2ab2eccbe54d3a945de5bd6aac2d2e06338d27.png)

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](https://klipper.discourse.group/t/controlling-a-chamber-heater-through-a-relay-connected-to-rpi4-via-gpio-and-monitored-with-a-ds18b20/11131)), 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.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [January 2, 2025, 9:43pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/3 "2025-01-02T21:43:08Z")

</div>

# 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!

---

<div class="post-metadata">

**Author:** ![3dcoded](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/3dcoded/32/20297_2.png) [@3dcoded](https://klipper.discourse.group/u/3dcoded)\
**Post date:** [January 2, 2025, 9:49pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/4 "2025-01-02T21:49:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 2, 2025, 10:27pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/5 "2025-01-02T22:27:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [January 3, 2025, 3:34am UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/6 "2025-01-03T03:34:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 3, 2025, 10:27am UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/7 "2025-01-03T10:27:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 3, 2025, 11:25am UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/8 "2025-01-03T11:25:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [January 3, 2025, 3:55pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/9 "2025-01-03T15:55:08Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 3, 2025, 6:47pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/10 "2025-01-03T18:47:17Z")

</div>

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

What about something like this:  
[https://a.aliexpress.com/\_ExPwhXS](https://a.aliexpress.com/_ExPwhXS)

They have 25A with DC-DC.

Thanks again for trying to help me.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [January 3, 2025, 7:12pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/11 "2025-01-03T19:12:14Z")

</div>

> [@hitman47](#):
>
> What about something like this:  
> [https://a.aliexpress.com/\_ExPwhXS](https://a.aliexpress.com/_ExPwhXS)

 ![Fotek_Logo](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/7/b/7b351835d4b5bae3c7b914743c3aefcf092b97c3.png)

> **[陽明電機股份有限公司](https://www.fotek.com.tw/en-gb/)**
>
> 陽明電機

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: [Access to this page has been denied.](https://eu.mouser.com/c/optoelectronics/optocouplers-photocouplers/solid-state-relays-ssr/solid-state-relays-industrial-mount/?load%20voltage%20rating=0%20VDC%20to%2060%20VDC%7C~1%20VDC%20to%20100%20VDC ~~1%20VDC%20to%20300%20VDC%7C~1%20VDC%20to%2048%20VDC~~ 1%20VDC%20to%2050%20VDC%7C~1%20VDC%20to%2060%20VDC ~~1%20VDC%20to%2072%20VDC%7C~3%20VDC%20to%20100%20VDC~~ 3%20VDC%20to%2075%20VDC&rp=optoelectronics%2Foptocouplers-photocouplers%2Fsolid-state-relays-ssr%2Fsolid-state-relays-industrial-mount%7C~Load%20Voltage%20Rating)

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 3, 2025, 7:52pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/12 "2025-01-03T19:52:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nefelim4ag](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/nefelim4ag/32/2387_2.png) [@nefelim4ag](https://klipper.discourse.group/u/nefelim4ag)\
**Post date:** [January 3, 2025, 8:09pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/13 "2025-01-03T20:09:28Z")

</div>

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

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/9/9/996192efc9d98ebb260a28ad73763afb197df137.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [January 3, 2025, 8:30pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/14 "2025-01-03T20:30:52Z")

</div>

> [@hitman47](#):
>
> What about something like this:  
> [https://a.aliexpress.com/\_ExPwhXS](https://a.aliexpress.com/_ExPwhXS)

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](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.

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 4, 2025, 9:44am UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/15 "2025-01-04T09:44:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 4, 2025, 9:55am UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/16 "2025-01-04T09:55:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ray\_boy](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@ray\_boy](https://klipper.discourse.group/u/ray_boy)\
**Post date:** [January 4, 2025, 12:03pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/17 "2025-01-04T12:03:22Z")

</div>

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.

> **[GitHub - GiulianoM/PTC\_Heater\_Mount: Mounting plate for a 110V 500W PTC Heater module....](https://github.com/GiulianoM/PTC_Heater_Mount)**
>
> Mounting plate for a 110V 500W PTC Heater module. Fits on Voron 2.4 bed rails.

A config would look something like this:

```auto
[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.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [January 4, 2025, 12:05pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/18 "2025-01-04T12:05:27Z")

</div>

@ray_boy :

Please always format code as `Preformatted Text`  
 ![Format](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/d/2/d2f569306c1aacc25f5c36d74a848c8f9093989f.png)

> [@ray\_boy](#):
>
> ```auto
> [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
> 
> ```

---

<div class="post-metadata">

**Author:** ![hitman47](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/hitman47/32/21865_2.png) [@hitman47](https://klipper.discourse.group/u/hitman47)\
**Post date:** [January 4, 2025, 12:27pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/19 "2025-01-04T12:27:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ray\_boy](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@ray\_boy](https://klipper.discourse.group/u/ray_boy)\
**Post date:** [January 4, 2025, 12:31pm UTC](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087/20 "2025-01-04T12:31:45Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/f/f/ff11040e58e3fceb47a458b02af795af95acd444.png)

[Next page](https://klipper.discourse.group/t/controlling-a-chamber-heater/21087.md?page=2)
