Enhancing a 3D Printer with Online Access

—This paper looks at different ways of providing a RepRap 3D printer with online access and remote control to be operated from multiple devices including mobile devices. Different technological solutions that can be used with distinct printers are identified and tested. The selected and implemented remote access solution is described and examples of printed parts are presented. Reference is made to MSc theses that have been supported by this lab facility.


Introduction
According to Kolb's theory [1], that combines experience, perception, cognition, and behaviour, the experimental learning helps students to gain a deeper understanding of scientific concepts. This perspective, in line with the concept of project based learning [2][3][4], has been followed on our laboratory where extra-curricular activities, student theses and projects development are carried out.
Many of these projects are developed at an exploratory phase by master degree students of the automation area in Mechanical Engineering at the Faculty of Engineering of University of Porto (FEUP). They focus on the design, fabrication and assembly of instrumented devices.
Students doing theses in the automation field usually regard hands-on projects with great enthusiasm. Furthermore, the laboratory environment tries to promote peer interaction, collaborative learning and the possibility to incubate new ideas that are later explored in new projects. When it is necessary to build a prototype in a thesis project, which is to be completed in approximately six months with a reduced budget, the time and cost involved in traditional manufacturing processes are critical.
Cohen et al. [5] conclude that the adoption of 3D printing technologies will have a high impact on accelerating the product development cycle, implementing new manufacturing strategies and shifting sources of profit areas. The authors are also in line with this perspective and have had that evidence from last years' practice. 3D printing has been considered as a disruptive technology since it fulfils the disruption pattern identified by Christensen [6]. As referred by Rayna et al. [7], the use of 3D printers available on online platforms enables co-creation activities between customers and firms with a positive impact on user innovation.
A study on the use of 3D printers in classrooms based on four workshops conducted for high school science and technology teachers is reported in [8]. In that study some relevant conclusions were taken: the 3D printer can contribute to the student´s understanding of the problem-solving process; the workshop empowered many of the teachers to tackle projects previously perceived as beyond their skill level; the experience, rich in engineering practice, can be imparted to students. In line with these findings the authors decided to get hold of a 3D printer to be made available in the laboratory.
After a market search, a 3D printer was chosen that uses fused filament fabrication (FFF), within the RepRap (replicating rapid prototyper) concept. The reason was its low price and the support both in terms of hardware and software. Considering that it would be used in an educational institution, a printer was selected with an open structure, easy to replicate and with open source software. This open concept allows users to better understand the 3D printer working principle and improve the printer design [9]. The RepRap community and the associated open concept were identified as a suitable option. The software and firmware associated with this type of 3D printer are open source and a permanent effort is being made to improve it. The electronics are mainly based on Arduino hardware and can be adapted to different printers. The idea of learning by making and sharing things is associated to the RepRap concept [10].
With the 3D printer it was possible to speed up the projects and produce parts with complex geometries. The students were fully involved in the process of design and fabrication, having access to the production facilities without incurring in significant risks both in terms of injury and equipment operation [11].
Due to the success of the results obtained with the 3D printer, an increase of printing requests was noticed. Professors and students from other laboratories began to request printouts, as well as non-faculty members. Hence, it became difficult to print all the required parts within the work schedule (8-10 hours). Therefore, due to the unexpected workload, it was identified the need to empower the 3D printer with remote control and monitoring capabilities with the particular requirement of remote access through mobile devices. The search performed for a solution led to multiple options, the most relevant being: OctoPrint [12], Printtopeer [13], 3D Printer OS [14], Vision Authentise [15] and 3D Print Box [16]. The listed items require a Raspberry Pi for providing internet access to the 3D printer, except for the last one.
This work presents and justifies the solution adopted to make the RepRap 3D printer remotely accessible. Some examples of 3D printed parts that were made taking advantage of remote access are depicted.

The 3D Printer
The 3D printer is based on an additive manufacturing process that involves the deposition of material in layers. There are different methods to create the layers, such as stereolitography (SLA), selective laser sintering (SLS) and fused filament fabrica-tion (FFF). It is possible to find different materials that satisfy the design requirements. Examples of additive materials are plastic, metal, rubber, ceramic, and glass. Some of them are compatible with food [17] and human tissues [18]. It is possible to find on the market a wide range of 3D printers, from the hobby market up to the professional types, with prices ranging from around 200 ! up to 300 k!. The chosen printer is within the RepRap community. These printers use an additive manufacturing technology known as fused filament fabrication (FFF) or fused deposition modelling (FDM), a trademark of Stratasys Inc. In terms of printing materials, thermoplastics such as Polylactide (PLA) or Acrylonitrile Butadiene Styrene (ABS), composite materials with the combination of thermoplastic with fibres such as carbon fibre or Kevlar and Thermoplastic Elastomer (TPE) with a polyurethane base are used. However, the type of material used by 3D printers is not the most determinant factor in selecting a printer.
To perform a detailed search, a careful understanding of the main 3D printer models, maintenance and subsystems is needed. 3D printers in general comprise the following four subsystems: structure configuration, extruder, print bed and electronics.
3D printer models can be divided into four categories [10]: RepRaps, Box Bots, RepStraps and Upstarts. Within these, there is a full range of different models such as Mendel, Huxley, Makerbot, MendelMax, Ultimaker, Prusa, etc. Thanks to the RepRap community more than 100 different models of 3D printers can be found in Europe.
When choosing a 3D printer, the structure configuration is one of the most important subsystems, since it holds all the others together. The chosen configuration has influence on the structural stiffness, the work volume, the motion type of each axis and the printer precision. Typically, they have a cartesian configuration, where the printer head moves along two axes on a plane and the print bed moves along the third axis. The delta and the polar configurations are also used. On the delta configuration, the printer head is suspended by 3 arms in a triangular layout and the print bed does not move. The polar configuration uses polar coordinates to define the movement of the printer head. The cartesian configuration is the most used due to its robustness, stiffness and precision when compared to the other two.
The extruder is in a continuous and intense development due to its complexity. It has two parts: the filament drive and the hot end. Almost every filament drive uses a stepper motor with internal or external gears to pull the filament out of the spool and push it into the hot end. The motor is used to provide extrusion control and to drive a filament with a typical diameter of 1.75 mm or 3 mm. The hot end is where the filament is heated, melted and extruded through the print nozzle. It is usually an aluminium block where a resistance heater and a temperature sensor are embedded. This end is isolated from the rest of the printer by a heat sink or an insulated ceramic cartridge. In this way the heat transfer is minimized, preventing damage to the other printer components.
The surface where the part is printed is called the print bed. This part is usually made of glass or aluminium and the size depends on each model, due to the 3D printer subsystem constraints. In some models the print bed is heated. This solution allows better adhesion of the first printed layer preventing wrapping and/or cracking effects.
When the model does not have a heated bed, a polyamide tape (kapton), stick glue or painter's blue tape are used. The choice of one of these solutions depends on the type of filament used.
Looking at the electronics subsystem diagram displayed in Figure  One add-on that can make a difference is the LCD display with an embedded SD card reader. With this feature, it is possible to have a standalone printer.
Each axis is normally driven by a stepper motor and there are a lot of different models and sizes that can be used. NEMA 17 stepper motors with 1.8º of resolution without gearbox are usually used. Each motor is controlled by a stepper driver usually assembled in the electronic board.
The position control of each axis is implemented with an open loop configuration, with the position measured through the number of driven steps. The zero position is not saved in non-volatile memory, so it is necessary to move to the zero position every time the printer is switched on. For this effect an end stop switch is used, which can be magnetic, mechanical or optical.
A RepRap 3D printer needs frequent maintenance since it is built with printed parts, some of them being used to support the moving axes. However, the time and cost spent in maintenance is considerably reduced when selecting RepRap 3D printers with higher quality and better mechanical components. In any kind of 3D printer, a regular check-up and calibration is always needed to achieve better quality prints.
Another important item of 3D printers is the software. As shown in Figure 2 the printing process requires three steps: design the part in Computer-Aided Design (CAD) software; generate the program (g-code) to control the printer using Computer-Aided Manufacturing (CAM) software; execute the program with the printer controller, using a host software. In the RepRap community, there is a lot of free software to be used with the 3D printers which is in constant development for addition of new features. On the other hand, there are some companies that sell their 3D printers with specific and closed source software, optimized for a specific printer.  All the considerations mentioned in the previous paragraphs allowed the authors to have a better understanding of the main aspects in choosing a 3D printer that would fit the needs. Thus, all models with prices below 600 ! were excluded, since the overall quality was found inadequate to the required needs.
The 3D Printer chosen was the RepRap BCN3D+, developed by Fundació CIM, an entity connected to the Universitat Politècnica de Catalunya -BarcelonaTech (UPC), with a retail price around 1200 !. It is based on the Mendel model, presenting a high structural rigidity. It uses a Cartesian axes configuration. The printing bed moves along the Y axis while the extruder operates in the X and Z axes. The Y axis is decoupled from the X and Z axes.
An important aspect in selecting this printer was related to the continuous effort from Fundació CIM to improve the product. This has been verified by the numerous free updates received for software and firmware since the printer was bought three years ago. They also introduced the dual extrusion head, easily adaptable to the printer. With this new feature, it is possible to print parts in two colours of the same or different materials. In the latter case, one of them can be a support material to build parts with large overhangs that require a support structure.

Remote Access to the 3D Printer
The 3D printer existing in the lab, intensively used by the resident students and researchers with recognized success, raised the interest of other users, including nonfaculty members. This led to providing the printer with online access to allow different users to start a print job and monitor its progress. This facility differs from online 3D printer platforms such as Shapeways since it allows direct access to the 3D printer, letting the user have total control of the printing process.
The identified functionalities for such remotely operated/monitoring process include the possibility to turn the printer on/off, to upload a print job, to access the printer memory and to stream a real-time video of the process.
Traditionally, the high tech/high cost 3D printers already provide such functionalities. Some of them include Wi-Fi connectivity to be used for remote operation, such as Replicator from Makerbot, Cube PRO from 3D Systems, etc. This is not the case of the available printer. Some solutions to overcome this lack of connectivity were identified. In the authors' opinion, the more relevant solutions are the OctoPrint, Printtopeer, 3D Printer OS, Vision Authentise and 3DPrintBox [12][13][14][15][16].
The 3DPrintBox provides a turnkey solution for every RepRap 3D Printer with a USB port. This integrated solution provides Ethernet/wireless network capabilities. It is a proprietary webserver where the 3D printer and a webcam are connected by USB. Accessing the webserver by a web browser enables to control the printer and watch the printing process.
The other listed solutions require a Raspberry Pi to provide internet access to the 3D printer. Such solutions are more suitable than the 3DPrinterBox because they are based on open hardware. Both Printtopeer and 3D Printer OS require a sign up on their websites to have access to several online services. To start a print job it is necessary to download a dedicated operating system for the Raspberry Pi so that the printer can be detected through the website. Secondly the STL file format of the part to be printed must be uploaded. STL (STereoLithography) is a triangulated representation of a 3D model surface. After the upload, tools are available to configure the model and the print parameters. The identified limitations of these two solutions are related to the reduced number of 3D printer parameters/settings available.
The Vision Authentise is a solution focused on monitoring the print progress. With a webcam, it is possible to detect any deviation from the planned print progress and automatically stop the print job or notify the problem by email or text message. For its use, it is required to sign up on the website, to install a server on a PC or Raspberry Pi and to run a calibration setup. This solution accepts the upload of STL files to start the print job.
The OctoPrint is the chosen solution. It is based on a webserver provided with the appropriate interfaces for the 3D printer, video camera and relays module. The connection diagram of the implemented solution can be seen in Figure 3.
The chosen solution uses commercial available hardware and open source software. The webserver is based on a Raspberry Pi running an open source application, the Octoprint.
This application (OctoPrint) is a host software that can be used with multiple 3D printers providing a web interface to remotely manage and control the printer. This open source software tool fulfils the identified needs to remotely operate the 3D printer. Among the provided functionalities, the main ones are: start, pause and stop print jobs, jog the printer axes, monitor temperature of the printer bed and extruder, watch the printing progress and create a time-lapse video. Being an open source software, there is a large community behind, developing upgrades and plugins. Some of them are used, like a history list, a STL viewer, a status line and a custom command editor, which gives the ability to add custom controls like turn on or off the printer power supply. The implemented solution uses a Raspberry Pi B+ module as a webserver running the OctoPrint under the OctoPi operating system. The OctoPi operating system is based on the Raspbian. The 3D printer and a standard webcam are connected to the webserver through USB ports. A standard module, with two relays, is connected to general purpose digital input/output (GPIO) ports and is used to turn on/off the printer and the external light. The solution is inexpensive, easy to implement and does not require deep knowledge of informatics and electronics. Figure 4 presents an image of the web interface used to remotely operate our 3D printer.
Another interesting feature of this software is the configuration of three different access levels for the users. Anonymous users can only have access to the read-only data from the web interface. Logged users can start a print job having access to all data, except the settings and the system commands that are the privilege of the administrators.   (Figure 5d), which are free, and Printoid from Anthony St. (Figure 5e). All applications have main features such as axes and temperature control, webcam view, list of files to be printed, and some print job commands (start, pause, stop).
The main drawbacks of the OctoPrint solution are the lack of a booking system and the need to manually remove the printed part. This proved to be a limitation when using the printer in a multi-user environment.

Examples of Printed Prototypes
The 3D printer is hosted in the Instrumentation and Measurement Lab at FEUP. Several works are taking advantage in using the 3D printer. The examples presented in this section were printed using the implemented remote control solution. The printed examples are presented in increasing order of both complexity and size.
The first example ( Figure 6) comprises three modules with external dimensions that fit inside a cube with 100 mm edge. The idea was to progressively test the remote 3D printer robustness with small pieces. The second example (Figure 7) presents a mechanical characterization system that required printing multiple parts of different sizes. An external request from a customer was received to print a tray for transporting components, Figure 8. This tray occupies approximately twice the available printable area. It was necessary to print it in two parts and assemble them. The customer was invited to use the online platform. The 3D model was reworked to fit on the print bed (divided in two parts) and converted into two STL files. After the conversion of the STL file to g-code, it was the client who carried out the printing process using the 3D printer webpage. Each half part of the tray had a printing time of approximately 12h, which was a great opportunity to test a long print job that was monitored by both the costumer and our team.
Another example is related to the replication of the 3D printer. In this case, the print bed was almost totally filled with the maximum number of 3D printer parts. Figure 9 depicts a set of nine independent parts of the structure with complex geometries, occupying almost the total print bed that were printed simultaneously, taking approximately 20h to print.

Examples of Students Works
Many student works and theses have been supported by the use of this 3D printer. Some examples of MSc thesis topics that have been supported by this lab facility, are listed below: • Force sensor development and characterization for a rehabilitation glove; • Serious games to a device for hand rehabilitation; • Device for manipulation of daily objects; • Tactile device to simulate arterial pulse; • Development of a passive device for hand rehabilitation; • Low cost system for monitoring a refrigerator; • Study and development of a 2 DOF haptic device based in DC actuators; • Development of a system for actuating and controlling a glove for rehabilitation; Some of these works led to other developments presented and described in the web address https://remotelab.fe.up.pt/#instrumented_devices.

Conclusions
The availability of the 3D printer on the Internet is found to be of great value for monitoring and controlling the printer. It gains greater emphasis when printing parts that take several hours. Students using the 3D printer for their master thesis projects were able to take advantage of remote access and control of the printer, using both mobile and computer devices.
The students enthusiasm, fostered by getting an effective proof of concept for their works, enabled them to reach higher goals in their theses and so the standard increased in results, in general, and in the experimental results, too.
The selected and implemented OctoPi open source solution does not require any kind of website registry, is free and has several important features. The main remote features are the possibility: to upload desired part files to the printer server; to start, pause and stop the print job; to monitor the g-code, temperature, axes position; to stream a real-time video; to switch on/off the printer and external illumination.
It is possible to use a browser on a computer or mobile device connected to the internet to control and monitor the printing process. When using an Android mobile device, there are different applications available that can replace the use of the browser but with reduced functionalities.
A limitation related to the non-existence of a booking system was identified. Other constraints are inherent to the printer: the lack of an automatic system for filament material exchange and for removal of printed parts.