*Article* **Additive Manufacturing as an Essential Element in the Teaching of Robotics**

### **Kevin Castelli 1,† and Hermes Giberti 2,\*,†**


Received: 29 June 2019; Accepted: 16 August 2019; Published: 20 August 2019

**Abstract:** This paper aims to describe how additive manufacturing can be useful in enhancing a robotic course, allowing students to focus on all aspects of the multidisciplinary components of this subject. A three-year experience of the course of "robotic system design" is presented to support the validity of the use of this technology in teaching. This course is specifically aimed at Master of Science (MSc) Mechanical Engineering students and therefore requires one to view the subject in all its aspects including those which are not conventionally taken into consideration such as mechanical design, prototyping and the final realization.

**Keywords:** robotics teaching; 3D-printing; low-cost robots; education; Arduino

### **1. Introduction**

Modern technology requires an ever-increasing awareness and knowledge of multidisciplinary subjects. In order to reach this objective, Universities offer study paths that combine a number of different disciplines. In particular, traditional engineering courses during the last decade have tended to mix topics related to mechanics, information technologies, electronics and the like to give rise to better prepared professional figures [1]. In order to perfect this approach, it is necessary to combine all the above elements in a unique experience capable of letting students understand the interaction between them. A robot is, by definition, the perfect example of a multidisciplinary device [2]. It combines the knowledge and science of mechanical engineering, electronics, computer science and automation. This, however, must of necessity be related to the practical application in order to give the students a complete teaching experience. Whilst the theoretical aspect should never be underplayed, it is equally important that the student does not restrict him/herself to mere workshop experiences but is also encouraged to express their creativity in the solving of practical problems. Therefore, hands-on lessons, lab sessions and flipped classroom philosophies have been preferred. These three teaching techniques can be enhanced and made more effective through the use of suitable technological tools such as additive manufacturing devices. For this reason, there are several examples of courses that use additive manufacturing (AM) solutions as help in teaching. An example of how AM has already been blended into University courses as well as how AM has become a subject in itself is presented in the work of Jamison Go and A. John Hart [3]. An extensive overview of the use of AM in teaching and education is also shown in the paper of Simon Ford and Tim Minshall [4].

The present article focuses on how Additive Manufacturing can be an essential element in the teaching of robotics, comparing the experience available in the scientific literature and presenting the approach used to teach mechanical students at the course of "Robotic System Design" at the Politecnico di Milano (previouly called "Robot Mechanics" [5]). Several examples of robotics lab sessions can be found around the world. For instance: [6] describes three robotic courses held at the United States Naval Academy; Ritsumeikan University of Kyoto has also developed a practical robotics education program [7]; whilst some laboratory exercises are presented in [8] to give students some practical experience; [9] reports some web-based programming tools to generate three dimensional models of robots using Denavit–Hartenberg parameters. Nevertheless, all these courses mainly focus on programming aspects in that they rely on ready-made kits or open-source architectures that can easily be found on the web. Papers [10,11] are examples of how these kits have been developed for a robotic course. Whilst [12,13] indicate how low-cost robots are helpful devices for teaching purposes (robots non only for the sake of robotics but also for the sake of STEM). Kits or pre-built solutions may well be compelling tools to increase the student's passion in the subject, but they lack creativity and aspects related to the solving of problems. Moreover, students tend to assemble mechanical, electronic and IT parts to make the devices present in the kit operative, but do not really grasp how the different technologies and disciplines interact between them to give rise to a robotics system.

In order to overcome these limitations, besides using a mix of innovative teaching techniques such as hands-on lessons, lab sessions, and the flipped classroom, students were requested to project, build and operate a robot starting only from the functional specifications of the machine. In particular, the kinematic chain and the task to be performed were assigned. Thus the students are exposed to an all-encompassing teaching experience, highly multidisciplinary with theoretical aspects supported by practical implementation. Solely due to the diffusion and use of AM techniques which simplify the production of components and giving the creativity of students free rein allowing them to verify, by experiment, the efficacy of their projects. In addition, the 3D printer itself being a robotic system, students come to use, control and master these types of devices so as to build suitable parts in the construction of their robots. This paper not only describes this new teaching experience but also how AM affects the outline of the course itself. Robotics courses, in fact, generally focus on kinematic, trajectory planning and control, without actually forcing the students to concretely experience how design and realization, in fact, affect real systems.

From the 2015/2016 academic year, a project was assigned to the students enrolled at the "Robotic System Design" course proposed in the final year of the MSc in Mechanical Engineering at Politecnico di Milano. Besides programming tasks, also available in the previously mentioned courses, students are required to design the mechanical components of their robotic system, which will be 3D printed entirely from scratch. Fused deposition modeling (FDM) printers have been selected because they are safe, easy to operate and above all affordable. Printers used are "Sharebot 42" and the plastic material employed is polylactic acid (PLA). The final project basically consists of a three-degree of freedom (DOF) robotic configuration that students, dived into groups, have to develop in its mechanical, electrical and control aspects. In order to stimulate the students' creativity, they are required to perform an additional task of their choice. A challenge is scheduled for the end of the course where all the groups are required to give a practical demonstration. As a matter of fact, as highlighted in [14], the competition encourages increased effort on the part of the students. As an added incentive, the winning team gets to keep their creation while the losing teams must return the hardware given to them. This innovative course has two main advantages: firstly the students are faced with actual implementation problems and to make their own practical choices, thus helping them to develop a critical sense; simultaneously they can unleash their imagination. These hands-on classes, where students design the robot, are supported by theoretical lectures aimed at providing them a solid background to deal with problems related to kinematics, dynamics, and motion planning. One of the main objectives of the hands-on classes is to help students acquire practical experience and to put into practice the concepts studied during theoretical classes. As stated in [15], providing just merely theoretical knowledge is not sufficient and in some cases might well be counter-productive since it could confuse the student or make him/her accustomed to approaching actual problems with a limited perspective.

The following are set out as follows: Section 2 reports how AM reshaped the course; Section 3 deals with the hardware and software required to actuate the robots; Section 4 describes the course projects, while Section 5 shows their developments and evaluation; finally Section 6 reports the feedback from students.

### **2. AM Changes a Course Syllabus**

The exploitation of AM as a didactic tool enforces to redefine the course outline and schedule. Students are required to learn in a short time different basics knowledge to start dimensioning their robots to be able to complete their project by the end of the semester.

As concerns theoretical concepts, a selective compliance assembly robot arm (SCARA) robot is used as an example, also throughout the course, to teach the simple models that will be used to start outlining the machine. A brief introduction on mechanical components (for example reducers and transmission units) gives an overview of what can be used for the final realization. The last initial knowledge package deals on AM and rapid electronic prototyping (i.e., Arduino) to start familiarizing with these tools.

With these basic knowledge available students can start and continue developing their machines while the theoretical classes deepen and generalize the topics already discussed for 6 dof system and move on to new topics such as: parallel kinematic machine, trajectory planning, control algorithm and calibration.

Here the topics of the "Robotics System Design" course are discussed.


### **3. Rapid Prototyping in Electronics**

In order to actuate the 3D printed robots, motors are required. Thanks to low-cost easy to assemble hardware, students can animate their creations without any significant prior knowledge on electronics or industrial robot programming. Thus, a box containing some electronic hardware is delivered to each group. A box features an Arduino UNO board (Figure 1a) as controller; a TinkerKit SensorShield (Figure 1b) to facilitate wiring I/O; a joystick (Figure 1c), a potentiometer (Figure 1d) and a button (Figure 1e) as input devices; and four Servo motors (Figure 1f). The additional servo motor can be used to open and close a gripper in correspondence of the end-effector, according to the specific task assigned. The servos have a nominal operating range from 0 to 180 degrees, speed of 10 rad/s, stall torque of 1.8 Kgf · cm at 5 V.

**Figure 1.** Components provided to the students.

The members of the groups can start building some simple circuit and understand how electrical circuit works following the examples present in the Arduino IDE. Low voltage I/O allows them to make mistake without damaging the hardware or harm themselves. In this initial phase, they should also assess the capability of the hardware and material that are available to them, to determine the optimal region where their servos can and should be operated. This is accomplished by starting with labs on programming and control. Figure 2 shows some examples of the final electric circuits built by the students.

### *Programming and Control:*

In order to meet such a requirement, students need to be introduced to programming in the Arduino environment. The first examples deal with how to read analog and digital inputs coming respectively from the joystick or the potentiometer and the pushbutton; on how to use the servo library to control the servomotors. Then, they have to combine these sketches to generate an appropriate command for the servos to move the robot to the desired pose from the read input. Once the three analog signals are acquired (two for the joystick and one for the potentiometer), the information has to be translated into a movement of the end-effector, thus an additional step is required, that is the solution of the inverse kinematic problem. Once the corresponding joint coordinates are found it is possible to send the command signal to the servos. Of course, both the signals read from the joystick and the potentiometer present some offsets so it is necessary to tune the program.

Once the basic knowledge has been assimilated, they are asked to establish a serial communication between Matlab and the Arduino board. This step shows the problematic behind communication among the several units of a control system of an industrial robot [16] (Figure 3).

**Figure 2.** Examples of the physical implementation of the electric system.

**Figure 3.** Example of the serial communication code for both Arduino and Matlab.

### **4. Project Description and Assessment**

During the first class, the students are informed of the robotic configuration and the task that they must realize and solve. With some differences from one year to the other, especially related to the robotic configuration and evaluated task, the main points that students need to carry out are:


These points assure the final requirement that is to design, build and control a three-DOF serial robot for a specific task.

In Figures 4 and 5 show the kinematic scheme of two machines assigned and the built versions by students. Note that with simple kinematic architectures students are able to analyze the design process of the robot in all its aspects without encountered mathematical problems that can divert attention from the goal. Due to the limited time (48 h between labs and hands-on classes) and the number of students (ranging from 50 to 70 people), they are divided into groups of 4–5 each. This allows them to split the required work freely within the group, thus relieving students, also attending other courses, of overburden and assuring the completion of the project by the end of the course.

During the day of the competition, groups present their robots attaching a short report outlining the steps and assessments carried out during the design phase and the performances of every single machine is recorded. The ranking is obtained weighting objective parameters such as time and precision for the assigned task. Let us consider the third year case as a practical example. Students were asked to present a drawing SCARA able to trace a 6 × 6 square on a piece of paper; the drawing was then analyzed by means of image processing to extrapolate precise information on the performance.

Students are then required to take an oral exam to attest both their theoretical knowledge and their involvement in each phase of the design. Groups are free to also develop their own task. The majority opts for vision-based tasks such as object location and placing by means of image processing algorithms developed in Matlab.

(**a**) 3-DoFs robot arm scheme (**b**) Three-DOF selective compliance assembly robot arm (SCARA)

**Figure 4.** Three-degree of freedom (DOF) robotic configurations.

**Figure 5.** Three-DOF robotic configurations: examples.

### **5. Course Development and Outcomes**

In this section the main steps of the project are discussed especially underlining the aspects related to AM. Some robots build in the last three years will also be shown as practical examples.

### *5.1. Mechanical Design*

Students, knowing the characteristics of their hardware and the task that they have to do, can start dimensioning their robots. They are expected to design structural components from scratch; they are left free to choose the dimensions of the links and of all other components. The reason behind this choice is to help them strengthen their design capabilities; they have a to find a good compromise in the total dimensions of the robot. As a matter of fact, very short links will result in a reduced workspace. On the other hand, very long and bulky elements will result in the servo motors reaching their limits in terms of deliverable torque. Servo motors are quite delicate components, so proper solutions have to be found in order to avoid axial and radial overloading of the output shaft. 3D printing offers an interesting tool for students to test and verify their calculation, ingenuity and theoretical knowledge against real system. The mechanical design is done take into consideration:


Students can start dimensioning their machines using a simplified approach to solve the inverse dynamic problem [17]. Once written the kinematic equation (if S are the coordinates in the work space, Q in the joint space and L the kinematic parameters, then *S* = *F*(*Q*, *L*)), it is possible to obtain the Jacobian matrix (defined as *J* = *∂F*/*∂Q*). If the virtual work principle is applied, this can be obtained:

$$F\_q = -J\_d^T (F\_{\text{si}} + F\_{\text{sc}})$$

where,

$$F\_{\sphericalangle} = M \ddot{S}\_d \qquad \ddot{S}\_d = f\_d \ddot{Q} + \ddot{J}\_d \dot{Q}.$$

It has been indicated with *Fsi* the vector containing the inertial forces, *Fse* the applied forces, with *Sd* the position vector in the work space of all the points where forces and torques are applied (augmented case), *Jd* is the Jacobian matrix obtained for the augmented case and M is a diagonal matrix containing the inertia terms. By assigning a simple trajectory (constant acceleration profile) to the end effector, it is possible to obtain an estimation of the torques. Students are then faced with an other designing decision: how to couple the servos to the links. In Figure 6, some coupling cases can be found. Some groups designed their project directly connecting the motor to the joint axis other by means of a transmission: gears are used with a 1:1 ratio just to realize more compact solution and evenly distributing the weight along the link; speed reducers (*τ* < 1) to increase torque at the base joint to actuate the moving part of the robot; belt drives and four-bar mechanism to drive the joints while fixing the motor on the ground, thus reducing the weight on the moving parts of the robot. All of the transmission components are 3D printed. Since the structure will be 3D printed, it is necessary to take into account that the adopted technology prevents to realize some components: even if it is possible to use support material, thin and embossed components are very hard to realize; if the printed components are too long they might bend due to thermal stresses related to different cooling; if support material is employed, in general, the surface finishing of the face in direct contact with the support material is quite poor, leading to an increase of the friction coefficient, thus more power required at the motor axis. Students are therefore encouraged not only to design for assembly but also for 3D printing.

### *5.2. 3D-Printing*

The 3D CAD (Computer-aided design) models for the base, links and end effector (Figure 7) need then to be manufactured. Students are briefly introduced therefore to the world of FDM technology discussing the overall printing cycle from CAD to post-processing. The attention is focused on practical aspects to show how the printing parameters affect the final build: significance of the temperature at the nozzle and at the plate, as well as nozzle to layer height ratio, printing velocity, infill (throughout the build), when to use support material (supports and rafts) and why use skirts and brims. With such knowledge, they are able to understand the philosophy behind a slicing software and why input variables are threated as such (Figure 8a).

In Figure 8b it is possible to see some components imported in Slic3r to generate the Gcode that will be fed to the 3D printer. Students are taught how to operate the assigned printer in order to leave them the freedom to correct and adjust their initial design according to the obtained results or simply to correct some printing defects.

Once the robot has been printed and assembled (usually the 3D-printed components require also post-processing), groups experience the difference from design and real system. Due to building defects, excessive and incorrect material removal (during post-processing), total center point (TCP) positioning precision reduces. Thus groups are spontaneously encouraged to perform a simple calibration to obtain a least-square estimation of the real kinematic parameters in order to increase their winning chances.

**Figure 6.** Servos-links coupling examples.

**Figure 7.** Selective compliance assembly robot arm (SCARA) solution example.


(**a**) Slic3r settings (**b**) Robot components imported in Slic3r

**Figure 8.** Slicing.

### *5.3. Multibody Simulation:*

The multibody simulation is aimed at assessing the goodness of the overall project. Indeed, once the structural components are designed, it is possible to have an estimate of their inertial properties, necessary to build the multibody model. Some students determined approximately the density of their pieces or by weighting them and dividing by the volume or by multiplying the density of the PLA by the infill percentage (*ρ* = *ρPLA* × %*infill*). The software used to perform the multibody simulation is Simulink, in particular a package belonging to the Simscape library called Simmechanics. Given the trajectory planned it is possible to perform a simulation in order to assess that the motor torque required do not exceed the limits. If this is the case, it is necessary to modify the trajectory maybe reducing speeds and accelerations, or, in the worst case, to redesign some of the components to reduce inertial forces.

### *5.4. Trajectory Planning:*

In order to carry out the task assigned, students must develop a feasible trajectory according to the project requirements and hardware capabilities. Usually a basic operation is also required to familiarize groups with industrial jobs such as pick and place with obstacle avoidance. The main task usually requires to combine and adjust different path planning algorithms presented during the course.

During the third academic year, groups were asked to: starting from the home position, reach a point P1 (the center of the square) with an overturned *"U"* shape trajectory and mark the spot on a piece of paper; with the same trajectory, position the drawing tool in a vertex and from there draw a 6 cm square adopting the linear polynomial interpolation with parabolic blends. Upon request, the robot should also be able to repeat the square five times as well as drawing 20 parallel lines spaced 3, 2 or 1 millimeter.

All the algorithms used to define the motion laws are written in Matlab; once established the serial communication, the servos are directly controlled from Matlab passing the joint coordinate to the Arduino board with a fixed interval of time. It has been decided to opt for this solution instead of introducing ROS (Robot Operating System), especially its message-passing framework, in order to comply to the background of the students (it would require knowledge on Linux, Python and C++, topics that are not dealt with in previous courses).

### *5.5. Competition and Project Evaluation:*

The 2017–2018 academic year will be addressed as explanatory example.

To assure an objective analysis of the results, the final list was obtained equally weighting speed and precision. The speed was recorded by means of Matlab functions (tic and toc) between the first and last package send via serial communication and checked, during the competition, with a chronometer.

The precision rank was the result of the combination of 12 different parameter. The values were extrapolated from the drawings by means of a Matlab script developed for the occasion to perform the image processing; the picture saw the square and a reference system to easily infer pixel to centimeter conversion (Figure 9a). The algorithm converts the image into binary image (Figure 9b); once filtered and reconstructed, the square is described in the x-y plane (Figure 9c). At the end, the sides are detected an compared with the ideal ones (Figure 9c) to beget the results.

The top ranking group for speed received one point, the second two points and the last fourteen; the same for the precision. At the end the scores were summed and the group with the least points was declared the winner.

**Figure 9.** The 6 × 6 cm square reading example

### **6. Can AM Enhance Didactics?**

At the end of the course students were asked to fill an anonymous survey in order to understand if this new technology was able to improve the course didactics. It was also conducted to have a feedback of their experience highlighting in which way the course helped them improving their skills and which elements should be improved for future years.

The survey is divided into three sections: the first part is aimed at verifying which percentage of the total work each student spent in each of the sub-areas; the second set of questions is focused on students self-evaluation, in particular on assessing which is their feeling about the impact on their skills after attending the course; the last part wants to identify which aspects of the course could be changed in order to provide a better experience especially on the involvement of AM in the course. The data reported in the next sections refer to the classes starting from the 2016/2017 academic year.

### *6.1. First Section*

Students were asked to indicate which percentage of their work was spent in each area of the hands-on classes. Figure 10a shows the averaged percentage value spent in each area.The mechanical design required more time with respect to other areas, in particular in relation to Multibody Simulation. This result puts in evidence the lack of experience in designing mechanical components before attending the course. Figure 10b shows that the vast majority of the students thinks that the total effort of their group-mates is excellent. This result highlights the enthusiasm of students in attending the course.

**Figure 10.** Survey results: first section.

### *6.2. Second Section*

Students are asked to indicate which benefits they acquired after attending the course. Looking at Figure 11, it is possible to notice that less then half of the students thinks that the course helped improving their capabilities of designing a generic automatic system, while around the 70% thinks that the course contributed to improve their design skills related to a robotic system. Even if the 50% thinks that the course made them passionate about robotic subjects, only the 30% of them is fond of programming. This last result seems to be in line with the motivations that brought the authors to organize the course as described above as it highlights that some of them is more interested in the mechatronics design of robotic systems than programming.

**Figure 11.** Survey results: second section.

### *6.3. Third Section*

The last section of the survey wants to investigate how the experience provided during the course could be improved, but primarily how AM was perceived. The idea of realizing the robot components using a 3D-printer was welcomed with a great enthusiasm since, as can be noticed from Figure 12a, the 80% asserts that the 3D-printing technology is stimulating and funny. As could be expected not everyone was pleased with this activity, but only few students thought that was a boring activities.

**Figure 12.** Survey results: third section.

In the last questions students are asked to provide their opinion on the overall time spent for the project, on the possibility of using a ready-made kit to assemble and on the possibility of using industrial robots instead of a hand made robot. The answers to these questions seems to reflect the previous considerations; as a matter of fact, even if the 50% states that the project is very time-consuming compared to the CFU offered by the course, only the 10% thinks that the introduction of a ready-made kit would be beneficial, and the 40% believes that using industrial robot would be useful. These results underline that students rather spend more time engaging themselves in design activities then assembling robot kits. It's understandable their desire to also work on industrial robot to grasp, while attending university, the working reality they see themselves employed in.

### **7. Conclusions**

This paper describes the authors' experience in adopting FDM 3D printing for an hands-on robotic course at the Politecnico di Milano. The experience, gained in the course of three years of work, shows that AM can change and improve the approach to the teaching of robotics, as shown by the positive feedback from students. The developed course is discussed highlighting the opportunities offered by AM and electronics prototyping. 3D printing was found to be a valid tool to engage students not only in the programming and control aspects, but also that of mechanical design; this is done by assigning the development of a 3 dof serial kinematics robot capable of performing a given task with the help of only some low-cost electrical hardware handed out to each group. Taking into account the positive results obtained with the use of 3D printing, for future classes the 4D printing technique [18] can be considered in order to enhance the designing experience of the students.

**Author Contributions:** Conceptualization, H.G. and K.C.; methodology, H.G. and K.C.; software, K.C.; validation, H.G. and K.C.; formal analysis, K.C.; writing–original draft preparation, K.C.; writing–review and editing, H.G. and K.C.; supervision, H.G.

**Funding:** This research received no external funding

**Conflicts of Interest:** The authors declare no conflict of interest.

### **Abbreviations**

The following abbreviations are used in this manuscript:


### **References**


© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
