3D Printed RPI Rack

PI Rack Mounted in the Rack

I printed out the Raspberry Pi Blade Center found on thingiverse on my Ultimaker 2. This was a relatively easy set of units to print, with a majority of the time needed on it to be spent cleaning up the large number of pi holders. I assembled these with threaded rods and lock nuts. The threaded rods had to be cut to size but in the end, everything was assembled in about a weekend after printing was done. In order to fit RPI 3B+ with the POE hat, I did end up hand modifying some trays, which I don’t have a model for the changes so they can be printed in that form.

Before trimming the threaded rods

In the end, I didn’t use the wiring clips that are modeled into the blade center since all I am running in it right now are POE powered PIs, the rest of my lab PIs being elsewhere. In the end I printed the primary components out of PLA while some of the trays are ABS since I wanted a few different colors for those as a way to determine which Pis are for what services. Currently the Pis are running a IPv6 tunnel and some docker service experiments.

Installing OctoPi on an RPi

3D printers have come a long ways in the past few years. The prices have plummeted for basic units, allowing anyone to buy them. The raspberry pi can be setup alongside a basic 3D printer to enable some amazing functionality. They can allow remote control, management, and monitoring of the printers. When combined with a pi cam, you can even create time lapses of the prints.  To do this, we will be running OctoPi on the raspberry pi.

OctoPi is a Raspberry Pi distribution for 3d printers. Out of the box it includes:

  • theOctoPrint host software including all its dependencies and preconfigured with webcam and slicing support,
  • mjpg-streamer for live viewing of prints and timelapse video creation with support for USB webcams and the Raspberry Pi camera,
  • CuraEngine 15.04 for direct slicing on your Raspberry Pi and
  • the LCD app OctoPiPanel plus various scripts to configure supported displays

Getting Started

  1. You will need a Raspberry Pi
  2. Compatible Webcam or Pi Cam
  3. SD or Micro SD card for the Pi (larger is better if you plan on storing the images/videos on it)
  4. OctoPi Image for the Pi (https://octopi.octoprint.org/latest)
    1. Make sure to download the correct version for your Pi
  5. Installation of OctoPi can be done in the same way as for MotionEyeOS shown here

Configuration

  1. Hook the Pi up to a monitor and a network connection and power it up.
  2. Once the Pi is done booting, it will show a login prompt, above this prompt is network information about the pi, including the IP address, in this case it is 192.168.1.26. This will be needed to access the WebUI of OctoPrint.
  3. Navigate your web browser to the IP address shown.
  4. Access control will be the first thing to setup in OctoPrint. This can be done by filling out your username and password in the dialog that shows up. If access control is not desired, then hit “Disable Access Control”, otherwise click on “Keep Access Control Enabled”. For this example, access control will remain enabled, in order to prevent unauthorized users from running the 3d printer.
  5. After that dialog, the primary control for OctoPrint will display. This will not be logged in however.
  6. Clicking login and typing in your username and password previously setup will get you the full range of configuration settings for OctoPrint.
  7. After logging in, you will see the successful message, and if updates are available, a message will display stating that as well. We will install updates before continuing in order to have the most up to date software available.
  8. Click through the update dialogs.
  9. After proceeding, there will be a flag in the corner stating that it is updating, and the update will be run by the Pi.
  10. The web browser will attempt to reconnect periodically as the server reboots. Once it has completed rebooting, you will get a prompt to reload the page.
  11. Clicking reload now will bring up any changes that should be addressed. For this version of OctoPrint, there are new settings for cura. These aren’t going to be covered in this tutorial, clicking “Finish” will close the dialog.
  12. We are now at the point to start working with the printer and its connection to OctoPrint.
  13. The first step is to determine the connection properties needed for your printer. For this example, we will use an Ultimaker 2. There should only be one serial port available. The baudrate should be supplied by the manufacturer, if not, it can either be looked up online, or simply by guessing. The printer profile will be the default profile. If the connection is successful, the settings can be saved and set to auto connect on OctoPi’s startup.
  14. Once successfully connected, you should start getting data back from the printer. The temperature graph will update with hot end temperature, and bed temperature (if available).
  15. The control tab will allow you to manually control the printer, moving the head in all directions, along with extruding the filament.
  16. Further settings can be found in the settings menu in OctoPrint, which has the wrench icon in the top bar of the GUI.
  17. GCode files for printing can be uploaded to the files menu in Octoprint

Resources

Installing MotionEyeOS on an RPi

Raspberry Pis are neat little computers that can be placed just about anywhere assuming there is power and network connectivity nearby. These were made even more convenient with the addition of built in Wi-Fi on the Raspberry Pi 3. One application of these small devices is for home security, as a small motion sensing webcam that can record 24/7, or only when there is motion detected.

There are ways to build up your own system using the basic raspbian distribution and various software packages, or you can use a custom built operating system for this purpose, MotionEyeOS.

MotionEyeOS has everything needed to run a security camera system, or simply a remote webcam monitoring system. This will cover setting up a camera in this tutorial for basic recording and monitoring. This will let us spy on our dog while away at work.

Getting Started

  1. You will need a Raspberry Pi
  2. Compatible Webcam or Pi Cam
  3. SD or Micro SD card for the Pi (larger is better if you plan on storing the images/videos on it)
  4. MotionEyeOS Image for the Pi (https://github.com/ccrisan/motioneyeos/releases)
    1. Make sure to download the correct version for your Pi

Installation

This will cover the process for installing the image to the SD card for windows. There are also guides for Mac and Linux available from the Raspberry Pi foundation here. https://www.raspberrypi.org/documentation/installation/installing-images/README.md

  1. Install Win32 Disk Imager
  2. Start the application
  3. Click the folder icon and navigate to your disk MotionEyeOS disk image
  4. Ensure the Device listed is the SD card you want to format with the image, in this case, it is the G:\ Drive
  5. Finally, hit the write button, and the image will be written to the SD card, which is all that’s needed to install MotionEyeOS.

Configuration

  1. Hook the Pi up to a monitor and a network connection and power it up.
  2. Once the Pi is done booting, it will show a login prompt, above this prompt is network information about the pi, including the IP address, in this case it is 192.168.1.26. This will be needed to access the WebUI of MotionEyeOS.
  3. After finding the IP address, navigate to it in your web browser of choice.
  4. To login, enter the username, “admin” and hit Login. There is no password by default.
  5. Click on the menu button in the top left corner to pull up the options
  6. Here you will be able to change the admin username and password, as well as the surveillance username and password. The surveillance user is a basic user who can view the webcams but not change settings.
  7. To add a camera, plug in a USB webcam or pi cam and hit the dropdown next to the menu button. From here you can select cameras that have been already setup, or you can add a camera.
  8. The webcam should show up as a camera, if it does not, you may need to install drivers for it.
  9. After adding the webcam, you can navigate to it and its settings by going through the same dropdown
  10. Once on the camera page, you can access a vast amount of settings. These let you configure working hours, motion sensing, save data locations for any videos or images, and more. If more advanced settings are needed, there is an option under General Settings to enable the advanced settings. Once settings have been modified, click the apply button in the top right corner of the settings pane to enable them.
  11. Below are screenshots of the system in action

By default, SSH and FTP are enabled on MotionEyeOS, so if you want to add services or install drivers to it, you can do so remotely. This also allows you to move any security footage off the pi if it is being used to store the footage.

Resources