The file 'Octoprint Ultimate Lights / Fan / Temperature Control 3D Printer Model' is (stl) file type, size is 354.0B.
Control pretty much everything that you might want to do on your raspberry pi / octoprint / enclosure
Here is a list of possibilities:
Check pictures on thingiverse: http://www.thingiverse.com/thing:2245493
Software
Install the plugin using the Plugin Manager bundled with OctoPrint, you can search for the Enclosure plugin or just use the url: https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip.
To control the encosure temperature or get temperature trigged events, you need to install and configure a temperature sensor. This plugin can support DHT11, DHT22, AM2302, DS18B20, SI7021, BME280 and TMP102 temperature sensors.
Wire the sensor following the wiring diagram on the pictures on thingiverse, you can use any GPIO pin.
For DHT11 and DHT22 sensors, don't forget to connect a 4.7K - 10K resistor from the data pin to VCC. Also, be aware that DHT sensors some times can not work reliably on linux, this is a limitation of reading DHT sensors from Linux--there's no guarantee the program will be given enough priority and time by the Linux kernel to reliably read the sensor. Another common issue is the power supply. you need a constant and good 3.3V, sometimes a underpowered raspberry pi will not have a solid 3.3V power supply, so you could try powering the sensor with 5V and using a level shifter on the read pin.
You need to install Adafruit library to use the temperature sensor on raspberry pi.
Open raspberry pi terminal and type:
cd ~git clone https://github.com/adafruit/Adafruit_Python_DHT.gitcd Adafruit_Python_DHTsudo apt-get updatesudo apt-get install build-essential python-dev python-opensslsudo python setup.py install
You can test the library by using:
cd examplessudo ./AdafruitDHT.py 2302 4
Note that the first argument is the temperature sensor (11, 22, or 2302), and the second argument is the GPIO that the sensor was connected.
Follow the wiring diagram on the pictures on thingiverse. The DS18B20 uses "1-wire" communication protocol, you need to use 4.7K to 10K resistor from the data pin to VCC, DS18B20 only works on GPIO pin number 4 by default. You also need to add OneWire support for your raspberry pi.
Start by adding the following line to /boot/config.txt
dtoverlay=w1-gpio
After rebooting, you can check if the OneWire device was found properly with
dmesg | grep w1-gpip
You should see something like
[ 3.030368] w1-gpio onewire@0: gpio pin 4, external pullup pin -1, parasitic power 0
You should be able to test your sensor by rebooting your system with sudo reboot. When the Pi is back up and you're logged in again, type the commands you see below into a terminal window. When you are in the 'devices' directory, the directory starting '28-' may have a different name, so cd to the name of whatever directory is there.
sudo modprobe w1-gpiosudo modprobe w1-thermcd /sys/bus/w1/deviceslscd 28-xxxx (change this to match what serial number pops up)cat w1_slave
The response will either have YES or NO at the end of the first line. If it is yes, then the temperature will be at the end of the second line, in 1/000 degrees C.
Copy the serial number, you will need to configure the plugin. Note that for the serial number includes the 28-, for example 28-0000069834ff.
Enable I2C on your raspberry pi, depending on raspi-config version, step by step can be different:
Run sudo raspi-configUse the down arrow to select 9 Advanced OptionsArrow down to A7 I2CSelect yes when it asks you to enable I2CAlso select yes when it asks about automatically loading the kernel moduleUse the right arrow to select the buttonSelect yes when it asks to reboot
Install some packages:
sudo apt-get install i2c-tools python-pip
Find the address of the sensor:
i2cdetect -y 1
This release uses RPi.GPIO to control IO of raspberry pi, it should install and work automatically. If it doesn't please update your octoprint with the latest release of octopi.
Hardware
You can use relays / mosfets to control you lights, heater, lockers etc... If you want to control mains voltage I recommend using PowerSwitch Tail II.
The relays module that I used couple SainSmart 2-Channel Relay Module. Those relays are active low, that means that they will turn on when you put LOW on the output of your pin. In order to not fry your Raspberry Pi pay attention on your wiring connection: remove the jumper link and connect 3.3v to VCC, 5V to JD-VCC and Ground to GND.
For heating my enclosure I got a $15 lasko inside my enclosure. I opened it and added a relay to the mains wire. If you’re uncomfortable soldering or dealing with high voltage, please check out the PowerSwitch Tail II . The PowerSwitch Tail II is fully enclosed, making it a lot safer.
CAUTION: VOLTAGE ON MAINS WIRE CAN KILL YOU, ONLY ATTEMPT TO DO THIS IF YOU KNOW WHAT YOU ARE DOING, AND DO AT YOUR OWN RISK
CAUTION 2: THIS HEATER IS NOT INTENDED TO FUNCTION THIS WAY AND IT MIGHT BE A FIRE HAZARD. DO IT AT YOUR OWN RISK
You can get a USB Mini Desktop Fan and control it over a relay.
You have the ability to add a filament sensor to the enclosure, it will automatically pause the print and run a gcode command to change the filament if you run out of filament, I can be any type of filament sensor, the sensor should connect to ground if is set as an "active low" when the filament run out or 3.3v if the sensor is set as "active high" when detected the end of filament, it does not matter if it is normally open or closed, that will only interfere on your wiring. I'm using the following sensor:
http://www.thingiverse.com/thing:1698397
Configuration
You need to enable what do you want the plugin to control. Settings from plugin version < 3.6 are not compatible anymore, you will loose all settings after upgrading the plugin.
There are mainly two types of configuration on the plugin, Inputs and Outputs.
Outputs are meant to control THINGS (temperature, lights, locker, extra enclosure fans etc...) You can even use a PowerSwitch Tail II and completely shut down your printer after the print job is done.
Outputs can be set to the following types:
Most outputs create UI elements on enclosure plugin tab that let you set values / turn on or off gpios etc. You have the ability to automatically turn on or off outputs when the printer starts or finishes. You can even specify a hour on HH:MM 24 hour format, events will only be schedule when the print starts, and will only be triggered for the very next time that hour occur.
Temperature Alarm will control another GPIO output after a certain temperature is met. This is useful if you want to add some sort of alarm near your printer, or even build some fire extinguisher on your enclosure. Note that I'm not responsible for any damage caused by fires, you should have proper smoke detectors on your house installed by professionals.
Inputs are methods that trigger actions or input values to the plugin (temperature sensor, GPIO trigger)
Inputs can be of two different types:
Temperature Sensors will be used to input temperature and humidity data, they can be linked to a especial output like temperature control and temperature alarm.
GPIO inputs will trigger events for the plugin, this feature can be used to add buttons to the enclosure and cause pressing those buttons to act on the printer or other pre-configured outputs.
After selecting GPIO for the input type, and selecting output control on the action type, the button will be able to turn on / off or toggle linked regular outputs, basically being able to control your lights / fan using mechanical buttons instead of the octoprint interface. You can also use buttons to send g-code commands.
Selecting print control on the action type will trigger printer actions when the configured GPIO receives a signal. The actions can be Resume and Pause a print job or Change Filament. You can use the "change filament" action and set up the input GPIO according to your filament sensor, for example, if your filament sensor connects to ground when detects the end of the filament, you should choose PULL UP resistors and detect the event on the falling edge.
You can also add mechanical buttons to pause, resume and change filaments near your printer for convenience.
Advanced Area
If you want to enable notifications check the following issue
You can control outputs using a simple API
Or use g-code commands
Tab Order
I often use more this plugin than the time-lapse tab, so having the plugin appear before the timelapse is better for me.
You can do this by changing the config.yaml file as instructed on octoprint documentation . Unless defined differently via the command line config.yaml is located at ~/.octoprint.
You just need to add the following section:
appearance: components: order: tab: - temperature - control - gcodeviewer - terminal - plugin_enclosure
1x1x1.stl | 2.4KB |