OctoPrint power button and fan control

OctoPrint power button and fan control

prusaprinters

I personally did not want to leave on my Raspberry Pi 4, running an instance of OctoPrint, all the time. Therefore, I decided to create a power button to attach to my i3 frame. While designing and testing I also realised that I did not want the fan to be turned on all the time either, so I included a NPN transistor as well! Required itemsM3 threaded inserts, from 3DJakeM3 screws, 16mm long, I had laying around5-pin JST connector, male and female1x3 and 1x4 female Dupont connectors680 ohm resistorPN2222A NPN transistorMomentary push-buttonThe resistor and transistor can of course be switched out for something similar, depending on what you have laying around. I have also added a wiring schematic. As you can seem only 4 out of 5 pins are connected. "Coding"To get everything to work, you have to add the following lines of code to /boot/config.txt:dtoverlay=gpio-shutdown,gpio_pin=3,active_low=1,gpio_pull=up dtoverlay=gpio-fan,gpiopin=4,temp=55000The first line configures the power button. The second line turns the CPU-fan on when the CPU reaches a temperature of 55°C. The temperature and GPIO-pins can be adapted, depending on your configuration. Print instructionsAll models were printed in PETG at 0.2 mm layer height and 15% infill, oriented according to the 3mf-file. Other printsFor my Raspberry Pi 4 case, I have used a model from Thingiverse by brawfx. I have removed some of the honeycomb pattern to fit the larger Dupont-connector.The camera mount I used was modelled by TinkrMakr. Final remarksI hope this print can be useful for others the way it has been for me. Any remarks or ideas for improvement are always welcome!

Download Model from prusaprinters

With this file you will be able to print OctoPrint power button and fan control with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on OctoPrint power button and fan control.