Skip to content

Octoprint plugin that allows a i2c temp sensor to turn on/off an enclosure fan/heater to maintain a chamber temperature.

Notifications You must be signed in to change notification settings

niget2002/Octoprint-I2cTempControl

Repository files navigation

OctoPrint-I2ctempcontrol

I2ctempcontrol attempts at helping to maintain a stable chamber temperature. It uses a LM75 i2c thermometer to measure the temperature of the chamber. It then uses a simple bang bang control for turning on either an exhaust fan, or a heater to keep the chamber within two values. The LM75 hardware adress, GPIO pins, and min/max temperature are all configurable in settings.

Currently, the controller has to be manually started and stopped on it's own tab. An eventual idea is to have a custom Gcode that can be used to start the process and then have it stop automatically after the print is complete.

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/niget2002/OctoPrint-I2ctempcontrol/archive/master.zip

Configuration

The code is set up to use the BOARD pin number for the GPIOPins. It is also setup to use channel 1 on the SMBUS for the I2C. You'll need to login to the Pi through SSH and use i2cdetect to get the hardware address of your LM75.

Chamber Config

Usage

Once configured, you can go to the I2C Temperature Controller tab in octoprint. You will see 2 buttons. One will start the chamber controller, the other will stop it. The display will show which outputs are currently On and Off.

Chamber Controller

How it works

The logic is silly simple. If the temperature is below the Min value, it turns the heater pin on. If it goes above the Max value, it turns the exhaust fan on. Any temperature in betwen Min and Max, it does nothing.

The plugin does add the chamber temperature and current target value to the temperature graph. The target value will change from either showing Min or Max depending on if the controller is trying to heat or cool the chamber.

There is some logic for the end of a print to turn the exhaust fan on. This is to help cool the chamber back down after a print. I don't have a way of disabling this feature. I should probably add that.

Hardware Used

I used the following hardware in my build:

The GPIO pins from the Raspberry Pi go to the Irf520 board. The Exhaust fan is driven directly off of the Irf520. The heater Irf520 is used to drive both the heater fan, and the relay that is controlling the heater. I used 24v fans because I'm running 24v to my SKR Pro controller.

I mounted my heater so that the fan blows across the heater and pulls air from outside. If the thermal fuse gets too hot on the heater, it will shut the heater off. Having cool air blowing onto the thermal fuse helps keep it from tripping.

I have an 80mm filter on the heater fan to keep dust from being blowin into the chamber.

The heater fan produces enough wind to push air past the heater core, but not so much that it produces any turbulance inside the chamber.

I mounted the heater in the bottom of the chamber and the exhaust fan in the lid pulling air out the top. The temperature sensor is mounted near the middle of the lid of my printer.

Future Plans

  • Have ability to turn the chamber controller on automatically when print starts. Have it pause print while pre-heating chamber
  • Have heater fan controlled separately from heater core. This would allow the fan to be ran a bit longer after the core is turned off. Would also allow the heater fan to be used at end of print to help cool chamber down faster.
  • Ability to disable chamber cooling at end of print.

About

Octoprint plugin that allows a i2c temp sensor to turn on/off an enclosure fan/heater to maintain a chamber temperature.

Resources

Stars

Watchers

Forks

Packages

No packages published