Contrôle À Distance D’Imprimantes 3D Via OctoPrint
by Orange Digital Center in Circuits > Raspberry Pi
23 Views, 0 Favorites, 0 Comments
Contrôle À Distance D’Imprimantes 3D Via OctoPrint

This project was developed within the Orange Digital Center Morocco , a space dedicated to fostering innovation, creativity, and rapid prototyping. At the FabLab, individuals and teams have access to state-of-the-art tools, including 3D printers, laser cutters, and a variety of electronic and mechanical resources. The center provides a collaborative environment where innovators, entrepreneurs, and students can transform their ideas into tangible products. By focusing on sustainable and impactful solutions .
The purpose of this project is to automate the communication process with the machine while ensuring remote access.
Octoprint
OctoPrint is an open-source software designed to remotely control and monitor 3D printers. Through its web platform, OctoPrint allows centralized management of various aspects of 3D printers while offering an intuitive user interface accessible via a web browser. It is commonly used in environments where managing one or multiple 3D printers is necessary, whether for professional projects or research purposes
Main Features:
- Remote Control: OctoPrint enables users to start, stop, and monitor 3D prints from any internet-connected device. Users can upload G-code files via the web interface.
- Real-Time Monitoring: The software provides a real-time overview of the printer’s status, including the nozzle and bed temperatures, as well as print progress.
- Print File Management: OctoPrint allows storage, organization, and selection of G-code files for easy printing. The interface also supports layer preview before printing.
- Plugins and Extensions: OctoPrint supports a wide range of plugins that can extend its functionality, including user management tools, firmware updates, and even adding cameras to monitor prints in real time.
Installing OctoPrint on Raspberry Pi



OctoPrint requires a dedicated operating system called OctoPi, which is specially designed for use with 3D printers. However, adding other software or modifying the system may cause compatibility issues that affect system stability. To avoid these problems, I chose to create a virtual environment (venv) to isolate OctoPrint from other installed software. This solution keeps a clean and stable environment for OctoPrint, while facilitating the installation and management of other applications without interfering with its proper operation.
Installation Steps:
- Install required dependencies:
sudo apt update && sudo apt install python3 python3-pip python3-dev python3-setuptools python3-venv git libyaml-dev build-essential libffi-dev libssl-dev
- Create a virtual environment:
mkdir OctoPrint && cd OctoPrint && python3 -m venv venv && source venv/bin/activate
- Install OctoPrint:
pip install --upgrade pip wheel && pip install octoprint
- Add user to necessary groups:
sudo usermod -a -G tty,dialout pi
- Launch OctoPrint:
~/OctoPrint/venv/bin/octoprint serve
Access OctoPrint via browser at:
http://192.168.11.52:5000
To start OctoPrint automatically without manually executing commands, a systemd service was created.
Then, to make this service available, it needs to be enabled so that it launches automatically at every system startup.
Control by Sending Command Files via Platform
Both 3D printers are connected to the Raspberry Pi via USB cables. The file transfer is done through the platform. The communication was successfully tested, notably by moving the axes, confirming the proper functioning of the connection.