RackPi Raspberry Pi (2B / 3B / 3B+ / 4B) Rack Shield 19" 2U with OLED & Power Switch by SliderBOR 3d model
Warning. This content is not moderated and could be offensive.
smoke
3dmdb logo
Thingiverse
RackPi Raspberry Pi (2B / 3B / 3B+ / 4B) Rack Shield 19" 2U with OLED & Power Switch by SliderBOR

RackPi Raspberry Pi (2B / 3B / 3B+ / 4B) Rack Shield 19" 2U with OLED & Power Switch by SliderBOR

by Thingiverse
Last crawled date: 3 years ago
EDIT8:
Completely reworked the OLED software part to make it work with the newest Raspberry Pi OS (Buster) and Python3 (thank you Dragor for the hints). Now it gets CPU and memory information from psutil (it seems to give more accurate information)
EDIT7:
Added a version with OLED only
EDIT6:
Added a blank shield
EDIT5:
Added STL files for Raspberry Pi 4B. The positions of the power switch, the LED and the push button are switched, so keep that in mind when you want to use them.
Power switch functionality on the 4B has not been tested yet.
The GLOBAL_EN pin on the 4B may have a similar function as the PEN on the 3B+, but I didn't have the time to verify this.
EDIT4:
Added the schematics and wiring diagram
EDIT3:
Added a lot of pictures from the last made. Hope it's self explaining how it's done. :)
EDIT2:
Had some incorrect instructions and an error in the file disp.py, should work now
EDIT:
Added some versions without switch, OLED and/or LED.
So you can can use the version which suits the best for your case, if you don't need all features.
/EDIT
This is an advanced 19" Rack Shield for the Raspberry Pi 2B / 3B / 3B+ / 4B (4B or 3B+ needed for power switch feature) with an OLED, power switch and status LED.
It was inspired by the great design from Kapozok (https://www.thingiverse.com/thing:1793758)
FEATURES:
OLED info screen (customizable Python script, i.e. IP adress, CPU & MEM utilization)
Button for OLED, reboot and shutdown
LED via GPIO
Power switch (on 4B and 3B+ it turns the Pi completely off!)
It fits the 19" DAP 2U rack frame available here:
https://www.musicstore.de/de_DE/EUR/DAP-Audio-2-HE-Rackblende-f-Modulsystem-10-Segmente/art-PAH0017160-000;pgid=SFDgeVCa1RlSRpaDRXt2K1900000oFRYW4Oi
The OLED shows information about current utilization, IP adress and hostname when you push the button (customizable Python script).
When you hold the button for longer than ~8 sec. and release it, the Raspberry Pi will perform a reboot.
When you hold the longer than ~12 sec. and release it, the Raspberry Pi will shutdown.
The OLED shows information about the current action (see video).
After the Raspberry Pi is shut down, you can switch it off (only the power indicator LED on the board will remain turned on by hardware design). All other electrical components on the board are turned off (SoC, RAM etc.)
Other Raspberry Pi versions may work too, but without power switch feature (since the PEN/GLOBAL_EN Pin is only available on 3B+ and 4B)
Material needed:
2x M2.5 screws (flat head)
2x M2.5 nuts
128x32 OLED 0,91" SSD1306 blue or white (link below)
1x Push button 6mm x 6mm x 7mm with cap (links below)
1x 3 mm LED
1x 10K resistor
1x 1K resistor
1x small piece of PCB 2,54mm hole pitch (link below)
11x jumper wires (link below)
1x Miniature slide switch (link below)
1x Pin header male (2 pins) (link below)
Some hot glue
Links (these are only examples):
OLED:https://www.aliexpress.com/item/1pcs-0-91-inch-OLED-module-0-91-white-OLED-128X32-OLED-LCD-LED-Display-Module/32672229793.html
Push button:https://www.aliexpress.com/item/100PCS-6X6x7mm-4PIN-dip-TACT-push-button-switch-Micro-key-power-tactile-switches-6x6x7-6-6/32854062885.html
Push button cap:https://www.aliexpress.com/item/20pcs-lot-Tactile-Button-Caps-Plastic-Cap-Hat-for-6-6mm-Tactile-Push-Button-Switch-Lid/32865759745.html
3 mm low current LED:https://m.reichelt.de/led-3-mm-bedrahtet-gruen-3-2-mcd-60-led-3mm-2ma-gn-p21624.html
PCB:https://www.aliexpress.com/item/Free-shipping-10Pcs-new-Prototype-Paper-Copper-PCB-Universal-Experiment-Matrix-Circuit-Board-5x7cm-Brand/32351499755.html
Jumper wire:https://www.aliexpress.com/item/40pcs-lot-10cm-40P-2-54mm-dupont-cable-jumper-wire-dupont-line-male-to-female-dupont/32674901253.html
Miniature slide switch:https://www.aliexpress.com/item/10pcs-Mayitr-Black-SPDT-Switch-Micro-Toggle-Switch-ON-Off-Miniature-Slide-Switches-For-DIY-Small/32848360942.html
Pin header:https://www.aliexpress.com/item/10PCS-40Pin-1x40P-Male-Breakable-Pin-Header-Strip-2-54mm-Long-Blue-Red-White-Green-Yellow/32863408765.html
You may use any other 3 mm LED, but maybe you have to use another resistor instead of the 1K resistor.
Schematics and more pictures of the buidling process will come soon...
EDIT:
OLED software part:
NEW VERSION WITH SUPPORT FOR RASPBERRY PI OS (BUSTER) AND PYTHON3:
First enable i2c and spi using raspi-config:
sudo raspi-config
-> Interfacing Options
-> SPI
-> I2C
After that you have to install the adafruit libraries and other software requirements for the OLED script to work (maybe some of them are already installed)
sudo apt-get install python3-pip
sudo pip3 install adafruit-circuitpython-ssd1306
sudo apt-get install python3-pil
sudo apt-get install -y python-smbus
sudo apt-get install -y i2c-tools
sudo pip3 install psutil
You can now check if the OLED is properly connected to I2C bus
sudo i2cdetect -y 1
You should see a device at address 3c
Now you can copy the infoscreen.py script to your Pi using Filezilla or something else and make it executable:
sudo chmod 755 infoscreen.py
You can now run the script and see if it works:
python3 infoscreen.py
To make it run automatically after reboot you can edit rc.local
sudo nano /etc/rc.local
Add the following line above 'exit 0' (change the path to the correct location):
sudo python3 /home/pi/infoscreen.py &
That's it! :)
Old version for python2, Raspbian Jessie and old version of Adafruit library:
For using the OLED you can follow this guide first:
https://learn.adafruit.com/adafruit-pioled-128x32-mini-oled-for-raspberry-pi/usage
Since the OLED is rotated by 180° in this project, you have to make some changes to the library files.
Edit the following file:
sudo nano /home/pi/Adafruit_Python_SSD1306/Adafruit_SSD1306/SSD1306.py
The following changes are made in the section class SSD1306_128_32(SSD1306Base)
Line 307 change
self.command(SSD1306_SEGREMAP | 0x1)
to
self.command(SSD1306_SEGREMAP)
Line 308 change
self.command(SSD1306_COMSCANDEC)
to
self.command(SSD1306_COMSCANINC)
After you have changed this you have to run the setup again:
cd /home/pi/Adafruit_Python_SSD1306
sudo python setup.py install
sudo raspi-config
chmod 755 disp.py
You can now start the attached disp.py by the following command:
python disp.py
or to run the script in the background:
nohup python disp.py &
Of course you can make your Raspberry Pi to start it automatically at bootup:
sudo nano /etc/rc.local
Add the following line above 'exit 0' (change the path to the correct location):
python /home/pi/disp.py &
Have fun!

Tags