OctoPrint power button and fan control

I made a power button with integrated fan control for a Raspberry Pi running OctoPrint, that attaches to my i3MK3s+.
4h 31m
2× print file
0.20 mm
0.40 mm
32.00 g
2
13
0
662
updated October 25, 2021

Description

PDF

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 items

  • M3 threaded inserts, from 3DJake
  • M3 screws, 16mm long, I had laying around
  • 5-pin JST connector, male and female
  • 1x3 and 1x4 female Dupont connectors
  • 680 ohm resistor
  • PN2222A NPN transistor
  • Momentary push-button

The 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=55000

The 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 instructions

All models were printed in PETG at 0.2 mm layer height and 15% infill, oriented according to the 3mf-file.

 

Other prints

For 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 remarks

I hope this print can be useful for others the way it has been for me. Any remarks or ideas for improvement are always welcome!

Tags



Model origin

The author remixed this model.

License