How to Build a Touchscreen Control Panel for a 3D Printer
If you have a 3D printer with a small display and physical buttons, it can be a pain to navigate its settings. A much better option is to switch to a DIY touchscreen controller. Running on the Raspberry Pi, OctoDash works with most 3D printers and offers a clean, touch-friendly UI that will help you control your 3D printing and access all its important features.
What is OctoDash?
OctoDash is an open-source dashboard and user interface for the OctoPrint server. You can install OctoDash on top of the OctoPrint server running on a suitable Raspberry Pi model, such as Raspberry Pi 3, 4, or Raspberry Pi Zero 2W. OctoDash features a clean and intuitive user interface to control the 3D printer.
Step 1: Install OctoPrint Server
First, you need to install OctoPrint on a Raspberry Pi. The makers strongly recommend using a Pi 3B, 3B+, 4B, or Zero 2 W model.
You may also install OctoPrint on an old Android smartphone that you are not using anymore. However, for OctoDash, you will need to install the OctoPrint server on a Raspberry Pi.
Step 2: Connect Touchscreen to Raspberry Pi
Naturally, you will need to connect your Raspberry Pi to the touchscreen display. If you are using the DFRobot display, as we are in this example, it is supplied with a U-shaped HDMI to HDMI cable and a full HDMI to micro-HDMI connector that you can use to make an HDMI connection to the touchscreen for video input.
Then use a micro USB cable to connect the touchscreen to one of the Raspberry Pi’s USB ports. This will power the display and allow you to use the touchscreen functionality.
Step 3: Update the OctoPrint Server
If you are already using the OctoPrint server installed on a Raspberry Pi, you will need to update OctoPrint to the latest stable version. This is important as it contains a newer version of Python which is required. Here’s how to update it:
- Log in to your OctoPrint server via the web browser (using the local IP or hostname) and then open the Settings.
- Go to Software Update and check if the latest update is available.
- Click the Update button or Update all available (if multiple updates) and then click the Proceed button to start the update process. This will take a couple of minutes to finish.
Once it has updated, proceed to the next step for the OctoDash installation.
Step 4: Prepare the Raspberry Pi
To prepare for installing OctoDash, use SSH to log in to your OctoPrint server on the Raspberry Pi. For this, you can use PuTTY on Windows or the Terminal on macOS or Linux. Enter the username and password; the default is pi and raspberry respectively.
Run the following command to update and upgrade all repos:
sudo apt update && sudo apt upgrade -yy
This may take a while to finish. Once completed, reboot the OctoPrint Raspberry Pi using the sudo reboot command.
Then open the configuration tool using the following command:
sudo raspi-config
Using the Up/Down arrow keys and the Enter key to select options, go to System Options > Boot / Auto Login > Console Autologin Text Console, automatically logged in as ‘pi’ user. Press Enter to select it. This will enable auto-login and allow the OctoPrint to start the OctoDash UI automatically.
Next, go to Interface Options > VNC and press Enter. Press Y key and then Enter if required or asked during VNC installation to continue.
Then choose Yes and press Enter to install and enable VNC. You will then be prompted to reboot; select Yes. Once the Raspberry Pi reboots, it will be automatically logged in.
If you are also going to use the DFRobot 7″ touchscreen display, perform these additional steps (via SSH or VNC). Type:
sudo nano /boot/config.txt
And paste the following lines at the end of the file:
#### remove black borders
disable_overscan=1
#### set specific CVT mode
hdmi_cvt 1024 600 60 6 0 0 0
#### set CVT as the default
hdmi_group=2
hdmi_mode=87
Press Ctrl + X, then Y and Enter to save the changes. Then reboot the OctoPrint server.
sudo reboot
After the reboot, you can use the touchscreen and be ready for the OctoDash installation.
Step 5: Install OctoDash
To install OctoDash, run the following command in the Terminal (or via SSH):
bash <(wget -qO- https://github.com/UnchartedBull/OctoDash/raw/main/scripts/install.sh)
This script will download and install all the required files and ask you a few questions.
Q 1. You can answer the first question if you have installed the plugins, otherwise simply hit the Enter key to continue to the next question.
Q 2. Select Yes and press Enter.
Q3. Select Yes and press Enter.
Q4. Select Yes and press Enter.
Q5. Select Yes and press Enter to reboot the Raspberry Pi.
Once the Raspberry Pi/OctoPrint server reboots, it will directly launch the OctoDash UI on the touchscreen. Now you can connect the 3D printer to the OctoPrint server using a USB cable and then use the touchscreen interface to control it.
Read More: How to Build a Touchscreen Control Panel for a 3D Printer – MakeUseOf