This Raspberry pi hat can be used with OctoPrint-Enclosure plugin.
This hat is compatible with Raspberry Pi 2, 3 or 4.
With this hat, you will be able to:
- manage a 30x30 5V fan to regulate the Raspberry Pi temperature
- manage a dual relay module for printer power and a LED strip
- read the temperature of your enclosure with a DS18B20 sensor
- cut the power of your printer when some smoke is detected by an external smoke detector or when you press an emergency button
All connectors are JST XH to be easier to use.
GPIO.5
(Output): The fanGPIO.7
(Input): The DS18B20 sensorGPIO.27
(Input): The power button to toggle printer powerGPIO.17
(Output): The signal to the relay which manages the printer powerGPIO.4
(Input): The LED button to toggle LED strip powerGPIO.3
(Output): The signal to the relay which manages the LED strip powerGPIO. 6
(Input): The emergency signal to turn off the printer power
The board works with a 5V DC power. The power supply must be connected to J1
connector:
The fan must be connected to J3
connector:
The fan can be controlled with the GPIO.5
. A HIGH level turn on the fan.
You can use the provided script and SystemD service to manage the regulate the temperature.
You must use the SSH access to enable the service by executing following commands with the pi
user:
git clone https://github.com/rclsilver/octoshield.git
sudo cp octoshield/fan-control/fan-control.py /usr/local/bin
sudo cp octoshield/fan-control/fan-control.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable fan-control.service
sudo systemctl start fan-control.service
The sensor must be connected to J4
connector:
Temperature sensor DS18B20 can be used with the 1-Wire protocol on a Raspberry Pi.
You must enable this interface to be used with the SSH access by executing following commands with the pi
user:
sudo raspi-config
Note: Use the direction arrows to navigate in the menu and the Enter key to validate.
You will need to obtain your temperature device id by executing the following command:
cat /sys/devices/w1_bus_master1/*/name
This will print the ID if all is working fine. If nothing is printed, please check your installation.
Now, in the OctoPrint-Enclosure plugin settings, you can add your sensor by adding a new Input and following this screenshot:
The power switch must be connected to J5
connector:
When +5V
and IN
pins are connected, a LOW level is transmitted to the PWR
pin of J9
and power of printer is turned on. In this case, OUT
pin is powered by a 5V DC power to turn on a light signal.
Now, in the OctoPrint-Enclosure plugin settings, you can manage the printer power relay following those screenshots.
The LED strip switch must be connected to J8
connector:
When +5V
and IN
pins are connected, a LOW level is transmitted to the LED
pin of J9
and power of LED strip is turned on. In this case, OUT
pin is powered by a 5V DC power to turn on a light signal.
Now, in the OctoPrint-Enclosure plugin settings, you can manage the LED strip power relay following those screenshots.
You can use both a smoke detector or an emergency button to power down the printer.
Most of detectors send 9V DC power when it detects some smoke. You must find points on your and connect them on J8
connector:
When the detector is detecting smoke, a HIGH level is transmitted to the GPIO.6
. You have to tell OctoPrint to turn off the printer.
The emergency button must be connected to J7
connector:
When +5V
and IN
pins are connected, a HIGH level is transmitted to the GPIO.6
. You have to tell OctoPrint to turn off the printer.
Now, in the OctoPrint-Enclosure plugin settings, you can add your emergency input following this screenshot.