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

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

thingiverse

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 (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 3B+ it turns the Pi completely off! On Pi 4B it has not been tested yet) 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 Pin is only available on 3B+; the GLOBAL_EN pin on the 4B may have a similar function, but has not been tested yet) Material needed: ============= - 2x M2.5 screws (flat head) - 2x M2 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: ================ 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 After that you can copy the attached file disp.py to your Raspberry Pi and make it executable: 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!**

Download Model from thingiverse

With this file you will be able to print RackPi Raspberry Pi (2B / 3B / 3B+ / 4B) Rack Shield 19" 2U with OLED & Power Switch 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 RackPi Raspberry Pi (2B / 3B / 3B+ / 4B) Rack Shield 19" 2U with OLED & Power Switch.