3d Printer Cluster
A 3d Printer Cluster is a piece of Software for managing multiple 3d printers. It can be used for everything from personal use to a Hacklab to a company.
The OSE printer cluster
For more Information on the goals of a 3d printer cluster, see Print_Cluster_Specification
We created a printer cluster software for our own D3D 3d printers, however, they can be used for every printer that has Marlin as a Firmware and has roughly the same specs (they can be adjusted). Our goal was to get the printers away from the computer constantly plugged in and managing the now numerous printers in a clear fashion. For that reason, we wrote the software for a Raspberry PI and created an Image to simply load onto a SD Card. The Raspberry PI 3 is a simple and low cost solution for this scenario (in regards to power consumtption and acquisition cost) that gets the job done well, however with simple modification it should also be possible to install the software onto any (linux) machine. It has an inbuilt slicing software adjusted to the D3D printer and it can convert fcstd files (from this wiki for instance) into the basic stl files for printing.
If you are interested how the Software was created, what parts are used or you want to make a modified version of it, you should checkout this page: How_to:_Create_Printer_Cluster_Image
How to install
Easy! Just download the image from here and follow the instructions provided here How_to:Write_Image_to_SD_Card. When thats done, all thats left to do is to plug in all printers that shall be part of the cluster and boot up the device (in that order). On the first boot, the PI will scan for any printers plugged in. Every printer identified that way can now be accessed within the webinterface, which can be accessed by any browser within the same network, by just putting in the IP of the PI or simply by putting http://replab into the adress bar.
Possible setup on hardware
The printer cluster is pretty scalable, provided you have the hardware for it. The PI itself will be capable of managing probably 50 and more printers (no testing done there yet, but processing power and RAM seem to suggest it). However, the PI has only 4 USB ports to plug the printers in. You could also use the Pins, but the software is written for the USB protocol so to be more scalable. For upscaling you will need POWERED USB Hubs, meaning they have an extra power source each, because otherwise the PI will not have enough power for it's own processors. You can simply connect the printers via USB like you would do on your normal computer, to reach further you can also use these to connect many printers over a wireless connection (via large distances for instance). There are also other modules out there, we didnt test them by now (will be done in august 2017), however the most important attribute those transceivers must have is that they have several channels to choose from, as you'll need 1 channel for each printer attached this way.
Our setup is demonstrated on this presentation pretty accurate.
This Software gives you unrestricted access to your printer, keep that in mind, set it up in a network of trusted members (this means protecting your network from the outside with a good wifi password for instance)!!! This also means that under no circumstances this should be forwarded to the internet!!!
For the correct setup of multiple printers, they should also be named in a unique way to distinct them in the further use. The software recognizes the name of the printer, however this means that upon the setup you should give him one. This can be done with the simple line
#define CUSTOM_MACHINE_NAME "Unique Printer Name"
in Configuration.h of the Marlin firmware. However, you should avoid special characters, they break the website access.
The SD Card for the setup has to have at least 4 GB in size, 8 GB should however be considered when there are many printers involved, so the swap doesn't take up the last Bytes and the .stl and .gcode files can be stored without the fear of running out of memory.
The Scan for the printers can be repeated at any time from the webinterface, under the settings tab in the top right corner is an option for that. After a reboot, the new printers should be recognized and ready.
Every printer has in its management interface an upload area. You can upload files there, slice them and start printing. You can even send them to a SD card attached to the printer (the Ardurino). This upload area is shared with every other instance. A file uploaded to one printer management interface is also accessible by every other printer. This is useful for printing parts several times on several printers.
The home section gives you the possibility to upload files, just drag and drop or click to choose a file you want to upload, if it is a fcstd file, it will be converted into the stl format, which can then be sliced and printed. It's possible to upload multiple files at once that way, just click upload when your done.
For SSH or similar administrative purpose: The standard user is pi, the password raspberry
The actual printer controls are done with the octoprint, on how to use that, please go to Octoprint.org
For the purpose of providing this software with a minimum of errors, the developer tested this software with 2 Ardurinos running Marlin plugged into the Raspberry PI. They were simply connected via the USB port and that way also drawing power from the PI. They could be accessed in the /dev folder in the same fashion as described by other Users of 'real' 3d Printers (the naming resembles ttyACM + a number).
In that setup, the software was able to get the data from the Marlin firmware, setup the webinterface and also modify the settings to autoconnect them to the according printer. The Ardurino even sent (false) data about the temperature of the heat bed.
The Slicing was also tested succesfully, everything can be run from the start with no further configuration required.
This software has yet to be tested on a real printer, however, as the actual management is taken by Octoprint, and as octoprint has been out there for a while with good resonance, there should be no issues.
The file upload section is able to handle one or multiple files and takes about a second per 10 kB of fcstd file conversion. This number may vary upon the amount of printers attached, however not very much, as this is only stressing out one of the 4 processing cores the PI has. Slicing is a different story and takes not only longer, but also varies upon different factors beside the file size.
Beside the further testing of the software, there are also other plans for developing the software further. They can be roughly sorted into three categories:
- Slicer and Printer adaptation
- At the moment the slicing and the printer profile are pinned down and always the same. However, the code has been structured in a way that the Scanner may also modify those files depending on the info extracted from the printer. So a printer with a name ending with the keyword "large" may have other length diameters, and therefore the software will adapt the settings accordingly. This means also that the slicing software will be specifically rewritten for this printer.
- This will be the goal after the developement of a dynamically scaled D3D Printer.
- As we are open source, we'd be happy to share this software in a larger range. This means however that the Scanner has to be rewritten to recognized also other firmware. The basics for that kind of setup have already been provided, it is however not in our current agenda to add this functionality right now.
- Lastly, the software is now restricted to a local network. This may be problematic especially when you want to start an enterprise for 3d printing parts. Therefore, this software needs another interface for communication with other software (a website for buying 'printer time' for instance). Luckily, octoprint already provides this functionality, however a unifying interface will be necessary as we don't want to choose between a dozen or more APIs. This API could then regulate the workflow by itself, finding which printer is available right now and is capable of running the requested job.
- Although this may be the most interesting of those three, we will probably first develop a concept for such an enterprise. This is part of the OSE agenda and when we are getting to this the API will be inevitable.
The octoprint instances are loaded only when chosen, this optimizes performance, this method is called lazyload and this specific variant was inspired by this snippet: Lazy Load
For the creation of an image that has the size of it's contained files and not the size of the sd card the instructions from this page were used: Instrucables
This software is in it's basics a ripoff of the Octopi, however multiplied in a sence to use multiple printers at once with minimal configuration for the enduser.
The Software further used is python flask and apache for the webserver, as well as FreeCAD for the conversion from fcstd to stl files.