Comparative Study of Flank Cams Manufactured by WEDM and Milling Processes

Cam-follower mechanisms are usually employed in different machines, like combustion engines, sewing machines, machine tools, etc. In the present paper, the option to manufacture cams utilizing wire electrical discharge machining (WEDM) has been considered. For this, surface roughness and shape error of cam profiles manufactured by the processes of milling and wire electrical discharge machining (WEDM) are presented. The methodology used covers different stages: design, prototyping, manufacturing, and measurement of the cams. As a reference, a cam-follower mechanism from a motorcycle internal combustion engine has been used. A reverse engineering process has been performed to determine the geometrical parameters of the mechanism, which are used for the synthesis of the profile of the cam and its subsequent design. The manufacturing process of the cams has been assisted by CAD-CAM (Computer Assisted Drawing-Computer Assisted Manufacturing) software. Using fused filament fabrication (FFF), a physical prototype of the cam has been manufactured, in order to validate the goodness of the design. Finally, the roughness and shape parameters have been measured on the contour surface of the cams. The arithmetical mean roughness Ra value of the milled cam was 0.269 μm, below the requirement of 0.4 μm, and shape error was 18 μm, below 50 μm. Shape error of the WEDM cam of 48 μm meets the requirements for cams. However, the Ra value of 1.212 μm, exceeded the limit. For this reason, a finish operation is recommended in this case. Some advantages of WEDM cams over milled cams are that different conductive materials can be employed, more complex shapes can be obtained, and that, in rough operations, the amount of material to be removed in subsequent operations is considerably reduced.


Introduction
The cam-follower mechanisms have wide applications in different kinds of machines such as alternative combustion engines, sewing machines, machine tools, etc., due to their advantages. For instance, they are simple and compact mechanisms, they are cheap, they have few mobile parts, and the follower displacement law is easy to design. The cam mechanisms have three parts: a cam, a follower, and a fixed frame [1]. The most common cam-follower mechanism that is employed in combustion engines consists of a disk cam and a follower with translating or oscillating movement (Figure 1a). The cams for combustion engines are usually symmetric, while the ones that are used in high speed applications or aeronautics are asymmetric [2]. The cams for combustion engines can be classified into three categories: convex flank cams, tangential flank cams, and concave flank cams. In the present work, a tangential flank cam has been used ( Figure 1b). In the past, the available technologies made it difficult to obtain cams with precise geometries and surface finish. At present, thanks to the numerical control (NC) machines, this phase has been successfully overcome. Today the tedious calculations of the cam design process are assisted by software that allows to obtain the profiles and the graphics in a faster and more precise way [2]. In the 70s of the last century, Grant has analyzed the different methods to manufacture cams [3]. He classified them into three categories: methods for original cams (using conventional machines and manual finish operations), methods for copied cams (using milling machines with indexing heads and/or copying mechanisms, as well as grinding machines), and methods that used numerical control machines. These machines have evolved considerably over time until today, and its use has become widespread in the field of cam manufacturing. On the other hand, for large batches, other manufacturing processes are employed, like forging [4], sintering [5], etc. Wire Electric Discharge Machining (WEDM) consists of using a thin wire of a conductive material like brass, which is wound between two spools, in order to cut a conductive material using electrical discharges. A dielectric fluid such as water allows isolating the wire from the workpiece to achieve a high current density, it cools the heated surface of the wire and it removes the material particles. Due to the high temperatures reached, the surface layer melts and then it quickly cools because of the fluid, leading to the so-called recast layer [6]. Heat can also induce tensile residual stresses, cracks, or microporosity on the parts' surface [7,8]. Some advantages of WEDM processes are that they allow machining different conductive materials regardless of their hardness [9], for example, titanium alloys used in biomedical applications [10], and that it is appropriate for delicate or fragile materials, because it eliminates the mechanical stresses that are present in traditional machining processes [11]. Besides, complex shapes and thin-walled parts can be obtained, such as noncircular gears, including elliptical and oval gears [12] or inclined surfaces that are used in tooling that requires draft angle [13]. Moreover, WEDM avoids the need to manufacture the pre-shaped electrodes that are necessary for sink electrical discharge machining (SEDM) [14]. In recent years, WEDM has started to replace conventional machining in some rough operations, for example, for the manufacture of blades, with the advantage that the amount of material to be removed in subsequent operations is considerably reduced [15]. The main parameters of the WEDM process are: discharge current, servo voltage, pulse on and off time, and wire feed, among others. Several authors have studied the effect of WEDM parameters on surface roughness. For example, Hegab et al. [16] optimized material removal rate, wear electrode ratio, and average surface roughness Ra as a function of machining on-time, discharge current, voltage, total depth of cut and percentage in weight of carbon nanotube composites (CNT) added to an aluminum base. Sonawane et al. [17] considered WEDM parameters such as pulse-on time, servo voltage, pulse-off time, peak current, feed rate, and cable tension and responses like surface roughness, overcut and material removal rate, in Nimonic-75 alloy. Magabe et al. [18]  In the past, the available technologies made it difficult to obtain cams with precise geometries and surface finish. At present, thanks to the numerical control (NC) machines, this phase has been successfully overcome. Today the tedious calculations of the cam design process are assisted by software that allows to obtain the profiles and the graphics in a faster and more precise way [2]. In the 70s of the last century, Grant has analyzed the different methods to manufacture cams [3]. He classified them into three categories: methods for original cams (using conventional machines and manual finish operations), methods for copied cams (using milling machines with indexing heads and/or copying mechanisms, as well as grinding machines), and methods that used numerical control machines. These machines have evolved considerably over time until today, and its use has become widespread in the field of cam manufacturing. On the other hand, for large batches, other manufacturing processes are employed, like forging [4], sintering [5], etc. Wire Electric Discharge Machining (WEDM) consists of using a thin wire of a conductive material like brass, which is wound between two spools, in order to cut a conductive material using electrical discharges. A dielectric fluid such as water allows isolating the wire from the workpiece to achieve a high current density, it cools the heated surface of the wire and it removes the material particles. Due to the high temperatures reached, the surface layer melts and then it quickly cools because of the fluid, leading to the so-called recast layer [6]. Heat can also induce tensile residual stresses, cracks, or microporosity on the parts' surface [7,8]. Some advantages of WEDM processes are that they allow machining different conductive materials regardless of their hardness [9], for example, titanium alloys used in biomedical applications [10], and that it is appropriate for delicate or fragile materials, because it eliminates the mechanical stresses that are present in traditional machining processes [11]. Besides, complex shapes and thin-walled parts can be obtained, such as noncircular gears, including elliptical and oval gears [12] or inclined surfaces that are used in tooling that requires draft angle [13]. Moreover, WEDM avoids the need to manufacture the pre-shaped electrodes that are necessary for sink electrical discharge machining (SEDM) [14]. In recent years, WEDM has started to replace conventional machining in some rough operations, for example, for the manufacture of blades, with the advantage that the amount of material to be removed in subsequent operations is considerably reduced [15]. The main parameters of the WEDM process are: discharge current, servo voltage, pulse on and off time, and wire feed, among others. Several authors have studied the effect of WEDM parameters on surface roughness. For example, Hegab et al. [16] optimized material removal rate, wear electrode ratio, and average surface roughness Ra as a function of machining on-time, discharge current, voltage, total depth of cut and percentage in weight of carbon nanotube composites (CNT) added to an aluminum base. Sonawane et al. [17] considered WEDM parameters such as pulse-on time, servo voltage, pulse-off time, peak current, feed rate, and cable tension and responses like surface roughness, overcut and material removal rate, in Nimonic-75 alloy. Magabe et al. [18] investigated the effect of spark gap voltage, pulse on-time, pulse off-time, and wire feed on the material removal rate and surface roughness of a Ni-Ti shape memory alloy. Chaudhary et al. [19] considered pulse-on time, pulse-off time, and current as process parameters, whereas material removal rate (MRR), surface roughness, and micro-hardness as responses, in superelastic Nitinol shape memory alloy.
Measurement of the shape error of cams is important because better accuracy of the cam profile obtained will favor the compliance of the follower with the motion-law and, consequently, a better operation of the mechanism. Most authors specify a range of tolerances for the manufacture of a cam by means of geometric tolerances, like the shape error, that is, they define a band along the entire contour that validates the functionality of the piece if the measured points on the contour are within the marked band. For example, Norton stated that shape error of ±25 µm or lower (total error of 50 µm) is appropriate for cams [2]. Kang and Han [20] measured form deviation errors of a disk cam on a profile-measuring machine. They found a total form deviation error of 0.1874 mm. Hsieh and Lin [21] proposed and validated a method to carry out the automatic measurement of a cylindrical cam on a coordinate measuring machine (CMM); the method uses a homogenous transformation matrix to derive the CMM ability function matrix and the measuring probe location matrix. The cam was machined on a four-axis vertical machine tool. The maximum deviation between the experimental and theoretical profiles was 21 µm. Other authors, such as Chang and Wu, specify measurements based on dimensional tolerances [22]. The maximum radial dimension of a cam was set to 19.05 mm in this case. Taking into account IT9 for WEDM and IT7 for CNC machining processes, tolerance amplitude values of 52 µm and 21 µm, respectively, were defined. In another example, Le and Nguyen Tank [23] obtained dimensional tolerances for a milled planar cam (with a maximum dimension of 150 mm) of at least 0.018 mm, corresponding to IT5. Regarding the shape error of WEDM curved surfaces. Werner [24] manufactured internal contours and measured shape errors of the profile with a coordinate measuring machine (CMM). He found deviation values between +0.008 mm and −0.010 mm with respect to the theoretical curves. In a comparative study regarding miniature brass gears manufactured using either WEDM and hobbing [25], it was observed that WEDM gears had higher quality than hobbed gears. Form error found was 5.4 µm for the WEDM gears [26].
As for surface roughness of cams, Islam et al. [27] made a numerical approach based on mixed lubrication concept considering roller sliding to predict the friction, taking into account the friction from cam/roller contact, cam bearings, valve/guide, needle roller bearing, and the effect of asperity interaction and roller sliding. A reduction in friction was obtained with a rise in the camshaft speed. Furthermore, they observed that an increased asperity interaction at high operating temperature yielded to relatively higher friction magnitude, especially in the nose of the cam profile, due to a lower curvature radius. Torabi et al. [28] presented a thermo-elasto-hydrodynamics analysis to study the behavior of the cam-and-follower contact, particularly during the running-in period. Their results have shown that the rate of flattening of surface roughness is a crucial factor influencing thermal effects during the running-in period. Therefore, according to the literature cited here, it is important to control the asperity (surface roughness) in the cam profile. Surface finish also influences the lubrication and aesthetic appearance of the cam. In contacts such as those between cam and follower, high surface roughness can lead to high local pressure and a reduction in the real contact area between cam and follower [29]. For this reason, low roughness is required in this case. Agulló and Cardona [30] stated that, when the unit cost is important, an appropriate surface finish for steel cams would be Ra < 0.4 µm. Traditionally, a grinding operation was necessary in order to achieve such roughness values [2]. In a comparative study for cams, Ra = 1.09 µm were obtained in the outer surface of a milled cam, and Ra = 1.42 µm in a WEDM cam, both made of AA6063 aluminum [31]. In another comparative study between hobbing and WEDM for the manufacture of gears, better surface finish was found for WEDM [26]. The average surface roughness was 1 µm, and maximum surface roughness was 6.4 µm in this case. In another work about gear prototypes, Ra = 0.42 µm was reported for the WEDM parts [32].
Machining processes have traditionally been used to obtain cams. However, other technologies like electric discharge machining could replace conventional cutting processes with important advantages, such as the possibility to use hard materials, the possibility to design more complicated shapes, and the reduction of mechanical stresses. Until now, few works are known about the manufacture of cams using WEDM [31]. The main objective of the present paper is to consider the possibility to manufacture tangential flank cams by means of WEDM, and to compare them with milled cams, in terms of surface finish and shape error of their external contours. The geometry of a cam profile has been designed, taking as reference a real cam from a camshaft of a motorcycle engine. The structure of the paper is as follows: Section 2 describes the methods that are used to manufacture the cams, by means of either milling or WEDM, as well as the way the roughness and shape error measurements were performed. Section 3 shows the results of visual inspection, surface roughness, and shape error of the cams; Sections 4 and 5 contain the discussion and conclusions, respectively.  Machining processes have traditionally been used to obtain cams. However, other technologies like electric discharge machining could replace conventional cutting processes with important advantages, such as the possibility to use hard materials, the possibility to design more complicated shapes, and the reduction of mechanical stresses. Until now, few works are known about the manufacture of cams using WEDM [31]. The main objective of the present paper is to consider the possibility to manufacture tangential flank cams by means of WEDM, and to compare them with milled cams, in terms of surface finish and shape error of their external contours. The geometry of a cam profile has been designed, taking as reference a real cam from a camshaft of a motorcycle engine. The structure of the paper is as follows: Section 2 describes the methods that are used to manufacture the cams, by means of either milling or WEDM, as well as the way the roughness and shape error measurements were performed. Section 3 shows the results of visual inspection, surface roughness, and shape error of the cams; Sections 4 and 5 contain the discussion and conclusions, respectively.  The exposed methodology consists of six steps, which will be explained in the following subsections. First, a reference cam-follower mechanism was selected. Then, using reverse engineering, a new cam profile was designed. Next, a three-dimensional (3D) printed prototype was obtained to validate the design. Then, the manufacturing process of the cams, obtained by either milling or WEDM, was defined. The cams were manufactured, and both roughness and shape error of their external contour were measured. Finally, conclusions were drawn from the results.

Selection of a Reference Cam-Follower Mechanism
As a start point, a reference cam-follower mechanism was selected, a real cam from the camshaft of a single-cylinder internal combustion engine of a motorcycle (Figure 3), available at the Department of Mechanical Engineering (DEM) of the School of Engineering of Barcelona (ETSEIB). Because of the absence of geometric data of the reference cam and follower mechanism, as well as about their displacement law, reverse engineering was used to determine the required start The exposed methodology consists of six steps, which will be explained in the following subsections. First, a reference cam-follower mechanism was selected. Then, using reverse engineering, a new cam profile was designed. Next, a three-dimensional (3D) printed prototype was obtained to validate the design. Then, the manufacturing process of the cams, obtained by either milling or WEDM, was defined. The cams were manufactured, and both roughness and shape error of their external contour were measured. Finally, conclusions were drawn from the results.

Selection of a Reference Cam-Follower Mechanism
As a start point, a reference cam-follower mechanism was selected, a real cam from the camshaft of a single-cylinder internal combustion engine of a motorcycle (Figure 3), available at the Department Metals 2020, 10, 1159 5 of 18 of Mechanical Engineering (DEM) of the School of Engineering of Barcelona (ETSEIB). Because of the absence of geometric data of the reference cam and follower mechanism, as well as about their displacement law, reverse engineering was used to determine the required start information for the design process of the cam. Different parameters of the real cam-follower mechanism were measured (see Figure 4 and Table 1), with a Mitutoyo digital micrometer.
Metals 2020, 10, x FOR PEER REVIEW 5 of 18 information for the design process of the cam. Different parameters of the real cam-follower mechanism were measured (see Figure 4 and Table 1), with a Mitutoyo digital micrometer.    Table 1. Numerical values of the start design parameters (according to Figure 4a,b).

Parameter Value
Maximum angle of displacement of the rotating follower θmáx(°) 12.13 Base radius of the cam Rb (mm) 14.04 Number of sections of the profile (according to the movement law) 3 Length of the follower arm lb (mm) 24.25 Radius of the roller Rr (mm) 10.00 Distance between rotation centers d (mm) 32.82 From these parameters, the design process of the mechanism has been carried out, in order to obtain the corresponding cam profile to be manufactured.  information for the design process of the cam. Different parameters of the real cam-follower mechanism were measured (see Figure 4 and Table 1), with a Mitutoyo digital micrometer.   Table 1. Numerical values of the start design parameters (according to Figure 4a,b).

Parameter Value
Maximum angle of displacement of the rotating follower θmáx(°) 12.13 Base radius of the cam Rb (mm) 14.04 Number of sections of the profile (according to the movement law) 3 Length of the follower arm lb (mm) 24.25 Radius of the roller Rr (mm) 10.00 Distance between rotation centers d (mm) 32.82 From these parameters, the design process of the mechanism has been carried out, in order to obtain the corresponding cam profile to be manufactured.  Table 1. Numerical values of the start design parameters (according to Figure 4a,b).

Parameter Value
Maximum angle of displacement of the rotating follower θ máx ( • ) 12.13 Base radius of the cam R b (mm) 14.04 Number of sections of the profile (according to the movement law) 3 Length of the follower arm l b (mm) 24.25 Radius of the roller R r (mm) 10.00 Distance between rotation centers d (mm) 32.82 Metals 2020, 10, 1159 6 of 18 From these parameters, the design process of the mechanism has been carried out, in order to obtain the corresponding cam profile to be manufactured.

Design of a New Cam Profile
The design process of a cam-follower mechanism consists of three steps [33]: (a) to design the follower displacement law, (b) to obtain the cam profile according to the designed displacement law, and (c) to check that the curvature of the cam profile guarantees a correct cam-follower contact.
In this work, the Dynacam 9.5.0.153 software (Norton Associates Engineering, Norfolk, MA, US) was used to design the cam [34]. After initial analysis, it was decided to choose the Polydyne function as the movement law of the follower, which is frequently used in the design of camshafts of internal combustion engines and in cams of textile machines [35]. Figure 5 shows the kinematic graphics obtained with the Dynacam software. The analysis of the graphics allows checking the continuity of the movement law until the second derivative [34]. Then, the cam profile has been generated, and it has been checked if the cam curvature was appropriate to ensure good performance ( Figure 6).

Design of a New Cam Profile
The design process of a cam-follower mechanism consists of three steps [33]: (a) to design the follower displacement law, (b) to obtain the cam profile according to the designed displacement law, and (c) to check that the curvature of the cam profile guarantees a correct cam-follower contact.
In this work, the Dynacam 9.5.0.153 software (Norton Associates Engineering, Norfolk, MA, US) was used to design the cam [34]. After initial analysis, it was decided to choose the Polydyne function as the movement law of the follower, which is frequently used in the design of camshafts of internal combustion engines and in cams of textile machines [35]. Figure 5 shows the kinematic graphics obtained with the Dynacam software. The analysis of the graphics allows checking the continuity of the movement law until the second derivative [34]. Then, the cam profile has been generated, and it has been checked if the cam curvature was appropriate to ensure good performance ( Figure 6).  The two performance quality indices of the mechanism, pressure angle, and cam profile curvature radius, have been checked with Dynacam (Table 2). Table 2. Quality indices of the cam-follower mechanism.

Parameter Value
Maximum pressure angle βmax (°) 27.7 (limit value = 35) Minimum radius of curvature of the cam profile Rcmin (mm) 17.89 (greater than the radius of the follower) The profile of the designed cam consists of two arcs of circles and two small segments that join them. These segments, called flanks, correspond to two circle arcs with a large radius of curvature that, at first glance, appear to be straight sections. These two flanks have been adjusted to two small tangent straight segments with respect to the base circle (larger radius) and the nose circle (smaller radius) to simplify the manufacturing processes. Therefore, a tangential flank cam has been designed ( Figure 1b).

Manufacturing of a Prototype of the Cam and Validation of the Design
For the 3D design, a thickness value of 13 mm and a hole diameter of 12 mm have been selected, corresponding to the measurements of the model cam. The dimensions of the keyway have been defined according to DIN 6885 [36], which is equivalent to the withdrawn standard ISO R773 [37] ( Figure 7a).
Based on the profile obtained, a virtual prototype of the cam has been created using SolidWorks 2016 (Dassault Systèmes SE, Vélizy-Villacoublay, France). Subsequently, a prototype of the cam has been printed in polylactic acid (PLA) with the fused filament fabrication (FFF) or fused deposition modeling (FDM) technology (Figure 7b). The two performance quality indices of the mechanism, pressure angle, and cam profile curvature radius, have been checked with Dynacam (Table 2). Table 2. Quality indices of the cam-follower mechanism.

Parameter Value
Maximum pressure angle β max ( • ) 27.7 (limit value = 35) Minimum radius of curvature of the cam profile R cmin (mm) 17.89 (greater than the radius of the follower) The profile of the designed cam consists of two arcs of circles and two small segments that join them. These segments, called flanks, correspond to two circle arcs with a large radius of curvature that, at first glance, appear to be straight sections. These two flanks have been adjusted to two small tangent straight segments with respect to the base circle (larger radius) and the nose circle (smaller radius) to simplify the manufacturing processes. Therefore, a tangential flank cam has been designed ( Figure 1b).

Manufacturing of a Prototype of the Cam and Validation of the Design
For the 3D design, a thickness value of 13 mm and a hole diameter of 12 mm have been selected, corresponding to the measurements of the model cam. The dimensions of the keyway have been defined according to DIN 6885 [36], which is equivalent to the withdrawn standard ISO R773 [37] ( Figure 7a).
Based on the profile obtained, a virtual prototype of the cam has been created using SolidWorks 2016 (Dassault Systèmes SE, Vélizy-Villacoublay, France). Subsequently, a prototype of the cam has been printed in polylactic acid (PLA) with the fused filament fabrication (FFF) or fused deposition modeling (FDM) technology (Figure 7b).
From a visual inspection, it was found that the physical prototype was similar to the model cam, thus validating the goodness of the design. From a visual inspection, it was found that the physical prototype was similar to the model cam, thus validating the goodness of the design.

Design of the Manufacturing Processes to Obtain the Cams
The cams have been manufactured with NC milling and with WEDM, respectively. For both processes, the machines, tools, and fixtures to be used have been defined, as well as the cutting conditions. Table 3 presents the main characteristics of the two processes.

Design of the Manufacturing Processes to Obtain the Cams
The cams have been manufactured with NC milling and with WEDM, respectively. For both processes, the machines, tools, and fixtures to be used have been defined, as well as the cutting conditions. Table 3 presents the main characteristics of the two processes. A common high temperature structural steel was used to manufacture the cams, C45E4 from ISO 4957 [38].
Both the milling and the WEDM process are described in more detail in the following subsections.

Machining Process
The CAM (Computer Aided Manufacturing) software Cimatron 11.0 (3D Systems, Rock Hill, SC, USA) has been used to generate the g-code for the machining canter. The raw material was a block of Metals 2020, 10, 1159 9 of 18 dimensions 50 mm × 50 mm × 22 mm. The software simulates the programmed stages to evaluate possible tool-piece intersections or errors in the trajectory followed by the tool. Two operations were carried out, rough and finish contour milling.

WEDM
Because no simulation software was available for the WEDM process, the tool path of the wire and the contour of the cam have been manually programmed using the assisted programming of the machine. For this, the tangency points of the profile, that is, the points that join the different sections of the cam profile, have been determined, and either circular or linear interpolation has been applied. Before programming, the dimensions of the material, a 50 mm × 50 mm × 16 mm block, were introduced in the program. An excessively high cutting speed value was avoided to prevent the wire from breaking. The wire diameter used was 0.25 mm.
Only rough machining was used, because it was not possible to machine the full shape without reclamping it, which would have induced alignment errors [32].

Roughness Measurement
The surface finish of the cams has been measured and analyzed with a Taylor Hobson contact roughness meter-Form Talysurf Series 2 model-using a contact inductive sensor with a resolution of 18 nm in a height range of 1 mm.
The cut-off value employed was 0.8 mm, with a measurement length of 4 mm, according to the ISO 4288 standard [39]. One measurement was carried out on each of the four areas of the cam contour (see Section 2.5.2), along the longitudinal direction of the cam. Arithmetical mean height parameter Ra was considered.

Shape Measurement
The cam profile was measured in a Mitutoyo Euro CA5-44 coordinate measuring machine (CMM), with Mcosmos v3.0 software (Mitutoyo Corporation, Kawasaki-shi, Kanagawa, Japan). The shape error is defined as the distance between the highest and the lowest distortion along the complete measured profile.
The coordinate origin (x c1 , y c1 ) was defined at the center of the cam hole, from which the positions (x i , y i , z i, ) of the profile points were determined ( Figure 8). Later, 354 points of the contour of the piece have been measured at a vertical distance of z i = 5 ± 0.001 mm from the upper face of the cam.
Both the milling and the WEDM process are described in more detail in the following subsections.

Machining Process
The CAM (Computer Aided Manufacturing) software Cimatron 11.0 (3D Systems, Rock Hill, SC, USA) has been used to generate the g-code for the machining canter. The raw material was a block of dimensions 50 mm × 50 mm × 22 mm. The software simulates the programmed stages to evaluate possible tool-piece intersections or errors in the trajectory followed by the tool. Two operations were carried out, rough and finish contour milling.

WEDM
Because no simulation software was available for the WEDM process, the tool path of the wire and the contour of the cam have been manually programmed using the assisted programming of the machine. For this, the tangency points of the profile, that is, the points that join the different sections of the cam profile, have been determined, and either circular or linear interpolation has been applied. Before programming, the dimensions of the material, a 50 mm × 50 mm × 16 mm block, were introduced in the program. An excessively high cutting speed value was avoided to prevent the wire from breaking. The wire diameter used was 0.25 mm.
Only rough machining was used, because it was not possible to machine the full shape without reclamping it, which would have induced alignment errors [32].

Roughness Measurement
The surface finish of the cams has been measured and analyzed with a Taylor Hobson contact roughness meter-Form Talysurf Series 2 model-using a contact inductive sensor with a resolution of 18 nm in a height range of 1 mm.
The cut-off value employed was 0.8 mm, with a measurement length of 4 mm, according to the ISO 4288 standard [39]. One measurement was carried out on each of the four areas of the cam contour (see Section 2.5.2), along the longitudinal direction of the cam. Arithmetical mean height parameter Ra was considered.

Shape Measurement
The cam profile was measured in a Mitutoyo Euro CA5-44 coordinate measuring machine (CMM), with Mcosmos v3.0 software (Mitutoyo Corporation, Kawasaki-shi, Kanagawa, Japan). The shape error is defined as the distance between the highest and the lowest distortion along the complete measured profile.
The coordinate origin (xc1, yc1) was defined at the center of the cam hole, from which the positions (xi, yi, zi,) of the profile points were determined ( Figure 8). Later, 354 points of the contour of the piece have been measured at a vertical distance of zi = 5 ± 0.001 mm from the upper face of the cam.  In the measurement process, the cam profile was divided into four segments (Figure 9). Segment 1 corresponds to the base circle (in blue); segment 3 corresponds to the nose circle (in green); and, segments 2 (in orange) and 4 (in yellow), correspond to the straight flanks. In the measurement process, the cam profile was divided into four segments (Figure 9). Segment 1 corresponds to the base circle (in blue); segment 3 corresponds to the nose circle (in green); and, segments 2 (in orange) and 4 (in yellow), correspond to the straight flanks. This division of the measured profile in sections might introduce some geometrical errors. In order to minimize them, each tangency area has been measured twice, from the two corresponding adjacent areas, and the measurement having greater error has been discarded.
Next, the procedure used in order to determinate the difference between the measured and the theoretical profiles is explained. From the CAD file, the four geometric entities that constitute the theoretical cam profile have been defined: the base circle, the nose circle, and the two straight flanks. The circles are defined using three parameters: the (xc, yc) coordinates of the cam hole center and its radius Rc. The straight sections have been defined using the A, B, and C parameters, according to the equation of the line Ax + By + C = 0.
On the other hand, the coordinates (xi, yi) of the measured points of the cam profiles have been obtained with the CMM. Subsequently, a transformation (rotation and translation) of the measured points required, in order to make a superposition of the measured and the theoretical profile, so as to minimize the differences between them. This minimization problem is solved with a code written in Matlab R2015b (Mathworks, Natick, MA, US). This code calculates the values of the parameters (x', y') of the translation and the angle θ of the rotation that minimizes the distance between the measured points and the theoretical profile, which is, the sum of the point-straight line and pointcircle distances (Equation (1)).
The equation of the perpendicular distance between a point-straight line, dpoint-line is (Equation (2)): The equation of the perpendicular distance between a point-circle, dpoint-circle is (Equation (3)): where xc and yc are the coordinates of the center of the circle. Table 4 shows the values of x' translation, y' translation, and rotation θ that must be applied to the measured points in order to minimize the square value of the distance between both of the profiles, which is, the measured error. This division of the measured profile in sections might introduce some geometrical errors. In order to minimize them, each tangency area has been measured twice, from the two corresponding adjacent areas, and the measurement having greater error has been discarded.
Next, the procedure used in order to determinate the difference between the measured and the theoretical profiles is explained. From the CAD file, the four geometric entities that constitute the theoretical cam profile have been defined: the base circle, the nose circle, and the two straight flanks. The circles are defined using three parameters: the (x c , y c ) coordinates of the cam hole center and its radius R c . The straight sections have been defined using the A, B, and C parameters, according to the equation of the line Ax + By + C = 0.
On the other hand, the coordinates (x i , y i ) of the measured points of the cam profiles have been obtained with the CMM. Subsequently, a transformation (rotation and translation) of the measured points required, in order to make a superposition of the measured and the theoretical profile, so as to minimize the differences between them. This minimization problem is solved with a code written in Matlab R2015b (Mathworks, Natick, MA, US). This code calculates the values of the parameters (x', y') of the translation and the angle θ of the rotation that minimizes the distance between the measured points and the theoretical profile, which is, the sum of the point-straight line and point-circle distances (Equation (1)). x The equation of the perpendicular distance between a point-straight line, d point-line is (Equation (2)): The equation of the perpendicular distance between a point-circle, d point-circle is (Equation (3)): where x c and y c are the coordinates of the center of the circle. Table 4 shows the values of x' translation, y' translation, and rotation θ that must be applied to the measured points in order to minimize the square value of the distance between both of the profiles, which is, the measured error. Table 4. Values of x' translation, y' translation, and rotation that must be applied in order to minimize the square of the distance between theoretical and manufactured profiles.

Results
In the present section, first, the results of a visual inspection are presented, followed by the roughness measurements (micro geometric errors) and the shape measurements (macro geometric errors).

Visual Inspection
Once the two cams have been obtained, visual inspection has been performed in order to evaluate the appearance of the different machining processes.
In the milled cam, two main flaws have been detected. The first one corresponds to the mark left by the adaptable clamp that was used to fix the part in the machining center. The mark does not comprise the whole thickness of the piece, but only a local area ( Figure 10). In the future, it is recommended to place a small aluminum plate between the clamp and the workpiece, in order to minimize the effect of the clamp. On the other hand, the contoured surface presented slight scratches that can be attributed to an incorrect setting of the tool or tool wear [40], although it was apparently in good condition.
Metals 2020, 10, x FOR PEER REVIEW 11 of 18 Table 4. Values of x' translation, y' translation, and rotation that must be applied in order to minimize the square of the distance between theoretical and manufactured profiles.

Results
In the present section, first, the results of a visual inspection are presented, followed by the roughness measurements (micro geometric errors) and the shape measurements (macro geometric errors).

Visual Inspection
Once the two cams have been obtained, visual inspection has been performed in order to evaluate the appearance of the different machining processes.
In the milled cam, two main flaws have been detected. The first one corresponds to the mark left by the adaptable clamp that was used to fix the part in the machining center. The mark does not comprise the whole thickness of the piece, but only a local area ( Figure 10). In the future, it is recommended to place a small aluminum plate between the clamp and the workpiece, in order to minimize the effect of the clamp. On the other hand, the contoured surface presented slight scratches that can be attributed to an incorrect setting of the tool or tool wear [40], although it was apparently in good condition. In the WEDM cam, a geometric imperfection has been observed due to the entry and exit of the wire (Figure 11). This kind of shape error is inherent to this type of process if the piece does not contain any outer corner at 90°. For this reason, it has been decided to begin and end the passes tangentially to the surface of the piece, at one of the points of change of shape, in order to reduce as much as possible its influence on the quality of the cam. Figure 11 shows a detail of the workpiece, where the expected shape is shown in red. The real surface is slightly different because the force applied by the fixing magnet was not sufficient to keep the piece completely straight, and its weight has made it tilt slightly. During the cutting process, a clamping nerve is maintained in the area ( Figure  12).

Mark of the clamp (flat area)
Marks of the tool (scratches) In the WEDM cam, a geometric imperfection has been observed due to the entry and exit of the wire (Figure 11). This kind of shape error is inherent to this type of process if the piece does not contain any outer corner at 90 • . For this reason, it has been decided to begin and end the passes tangentially to the surface of the piece, at one of the points of change of shape, in order to reduce as much as possible its influence on the quality of the cam. Figure 11 shows a detail of the workpiece, where the expected shape is shown in red. The real surface is slightly different because the force applied by the fixing magnet was not sufficient to keep the piece completely straight, and its weight has made it tilt slightly. During the cutting process, a clamping nerve is maintained in the area (Figure 12).  The WEDM surfaces offer a different appearance than the milled surface, with craters instead of cutting tool marks [6], which are produced by the electrical discharges. This gives the parts a matte color that is quite different from the bright appearance of the milled parts. Table 5 shows the roughness results of the milled cam. The highest Ra value has been found in segment 2, where the tool starts and ends the machining operation. For this reason, it does not really correspond to surface finish, but to a surface mark.  The average value of parameter Ra of the four segments is 0.269 μm, which is lower than the required roughness value below 0.4 μm for cams [30]. This is due to the fact that a finish operation has been performed, with a small feed per tooth value [41].

Roughness of the Milled Cam
As an example, Figure 13 depicts the measured profile in Segment 1. Figure 11. Detail of the contour of the cam profile in the area where the wire starts and finishes cutting.  The WEDM surfaces offer a different appearance than the milled surface, with craters instead of cutting tool marks [6], which are produced by the electrical discharges. This gives the parts a matte color that is quite different from the bright appearance of the milled parts. Table 5 shows the roughness results of the milled cam. The highest Ra value has been found in segment 2, where the tool starts and ends the machining operation. For this reason, it does not really correspond to surface finish, but to a surface mark.  The average value of parameter Ra of the four segments is 0.269 μm, which is lower than the required roughness value below 0.4 μm for cams [30]. This is due to the fact that a finish operation has been performed, with a small feed per tooth value [41].

Roughness of the Milled Cam
As an example, Figure 13 depicts the measured profile in Segment 1. The WEDM surfaces offer a different appearance than the milled surface, with craters instead of cutting tool marks [6], which are produced by the electrical discharges. This gives the parts a matte color that is quite different from the bright appearance of the milled parts. Table 5 shows the roughness results of the milled cam. The highest Ra value has been found in segment 2, where the tool starts and ends the machining operation. For this reason, it does not really correspond to surface finish, but to a surface mark. The average value of parameter Ra of the four segments is 0.269 µm, which is lower than the required roughness value below 0.4 µm for cams [30]. This is due to the fact that a finish operation has been performed, with a small feed per tooth value [41].

Roughness of the Milled Cam
As an example, Figure 13 depicts the measured profile in Segment 1. The profile is quite regular, with consecutive tool marks of approximately 0.05 mm width, corresponding to the feed value employed, and peak to valley distance of around 0.5 μm as a general trend. Some irregularities are observed, mainly deeper valleys, which can be attributed to scratches due to tool wear. The maximum peak to valley distance is around 2.4 μm. Table 6 shows the roughness results of the WEDM cam. Segment 3 corresponds to the highest Ra value. The average Ra value of the four segments is 1.212 μm. This value is higher than that of the milled cam as expected, taking into account that only rough WEDM had been performed, and it is higher than the requirement of 0.4 μm [29].

Roughness of the WEDM Cam
As an example, Figure 14 shows the measured profile in Segment 1.  The profile is quite regular, with consecutive tool marks of approximately 0.05 mm width, corresponding to the feed value employed, and peak to valley distance of around 0.5 µm as a general trend. Some irregularities are observed, mainly deeper valleys, which can be attributed to scratches due to tool wear. The maximum peak to valley distance is around 2.4 µm. Table 6 shows the roughness results of the WEDM cam. Segment 3 corresponds to the highest Ra value. The average Ra value of the four segments is 1.212 µm. This value is higher than that of the milled cam as expected, taking into account that only rough WEDM had been performed, and it is higher than the requirement of 0.4 µm [29].

Roughness of the WEDM Cam
As an example, Figure 14 shows the measured profile in Segment 1. The profile is quite regular, with consecutive tool marks of approximately 0.05 mm width, corresponding to the feed value employed, and peak to valley distance of around 0.5 μm as a general trend. Some irregularities are observed, mainly deeper valleys, which can be attributed to scratches due to tool wear. The maximum peak to valley distance is around 2.4 μm. Table 6 shows the roughness results of the WEDM cam. Segment 3 corresponds to the highest Ra value. The average Ra value of the four segments is 1.212 μm. This value is higher than that of the milled cam as expected, taking into account that only rough WEDM had been performed, and it is higher than the requirement of 0.4 μm [29].

Roughness of the WEDM Cam
As an example, Figure 14 shows the measured profile in Segment 1.   Figure 14 corresponds to a more irregular profile, with higher valleys than peaks, which correspond to the craters that are produced by the electrical discharges of the WEDM process. As a general trend, along the profile peak to valley distance has a value of around 6 µm. The maximum peak to valley distance is close to 9 µm. Figure 15 presents the shape error of the milled cam. It corresponds to the numerical values of the differences between the measured and the theoretical points of the cam profile, for each angle.

Shape Error of the Milled Cam
Metals 2020, 10, x FOR PEER REVIEW 14 of 18 general trend, along the profile peak to valley distance has a value of around 6 μm. The maximum peak to valley distance is close to 9 μm.

Shape Error
3.3.1. Shape Error of the Milled Cam Figure 15 presents the shape error of the milled cam. It corresponds to the numerical values of the differences between the measured and the theoretical points of the cam profile, for each angle. Along the profile, errors are mainly positive, with some small areas where they are negative. This means that the milled piece is slightly larger than the theoretical model. The highest positive difference within segment 1 is obtained at 90°, which corresponds to the end of the cam in the area of the base circle. At the end of segment 2, there is a sharp decrease in the value of the shape error up to 0 μm, followed by an increase up to 15 μm at the beginning of segment 3. Those extreme values correspond to the entry and exit of the milling tool during the machining process of the contour. The total error range is 18 μm. It is lower than the shape error that was reported by Norton, around ±25 μm for parts that were manufactured with standard milling tools [4], and similar to the value reported by Rothbart for high-speed machines, in the ±8 μm range [40]. For camshafts of combustion engines with ground lobes, lower tolerances are obtained of ±2.5 μm [14]. Figure 16 presents the shape error of the WEDM cam. In this case, the points belonging to the transition region between segments 3 and 4 have been removed, because the area that corresponds to entry and exit of the wire had been manually polished, and it is not relevant to the WEDM process. However, polishing these points is important to guarantee a smooth transition between two adjacent segments of the cam profile and thus avoid discontinuities in the follower acceleration law and keep its jerk at normal values [2]. As the authors Angeles and López-Cajún expose in their book [1], a cam-follower mechanism can produce the desired motion program with an accuracy that is only limited by that of the machine used to cut the cam [1]. Along the profile, errors are mainly positive, with some small areas where they are negative. This means that the milled piece is slightly larger than the theoretical model. The highest positive difference within segment 1 is obtained at 90 • , which corresponds to the end of the cam in the area of the base circle. At the end of segment 2, there is a sharp decrease in the value of the shape error up to 0 µm, followed by an increase up to 15 µm at the beginning of segment 3. Those extreme values correspond to the entry and exit of the milling tool during the machining process of the contour. The total error range is 18 µm. It is lower than the shape error that was reported by Norton, around ±25 µm for parts that were manufactured with standard milling tools [4], and similar to the value reported by Rothbart for high-speed machines, in the ±8 µm range [40]. For camshafts of combustion engines with ground lobes, lower tolerances are obtained of ±2.5 µm [14]. Figure 16 presents the shape error of the WEDM cam. In this case, the points belonging to the transition region between segments 3 and 4 have been removed, because the area that corresponds to entry and exit of the wire had been manually polished, and it is not relevant to the WEDM process. However, polishing these points is important to guarantee a smooth transition between two adjacent segments of the cam profile and thus avoid discontinuities in the follower acceleration law and keep its jerk at normal values [2]. As the authors Angeles and López-Cajún expose in their book [1], a cam-follower mechanism can produce the desired motion program with an accuracy that is only limited by that of the machine used to cut the cam [1].

Shape Error of the WEDM Cam
The obtained piece is oversized because only a rough WEDM operation has been performed. By default, the WEDM machine leaves a material surplus, which would later require to be removed in a finishing stage. This, finishing stage would improve the accuracy and surface finish of the part and would allow for better compliance with the displacement law of the follower and its derivatives (shown in Figure 5). Slightly negative values have been observed in the transition area between Sections 1 and 4. The shape error increases at 90 • and 270 • , corresponding to both ends of the cam with a curved shape, at the base circle, and the nose circle, respectively. This suggests that, as it is usual in WEDM machines, especially at high cutting speed [42], the machine has a higher deviation between the actual and programmed trajectory in corners than in straight areas. This is due to the fact that, in corners, where there is a change in the direction of movement of the guides, flexion and vibration produce deformation of the wire, with wire-lag, and the so-called back-wheel effect.
The total shape error is 48 µm. It lies within the usual range between 25 µm and 127 µm for WEDM parts in rough phases [43], although it is higher than the shape error of the milled cam. The obtained piece is oversized because only a rough WEDM operation has been performed. By default, the WEDM machine leaves a material surplus, which would later require to be removed in a finishing stage. This, finishing stage would improve the accuracy and surface finish of the part and would allow for better compliance with the displacement law of the follower and its derivatives (shown in Figure 5). Slightly negative values have been observed in the transition area between Section 4 and Section 1. The shape error increases at 90°and 270°, corresponding to both ends of the cam with a curved shape, at the base circle, and the nose circle, respectively. This suggests that, as it is usual in WEDM machines, especially at high cutting speed [42], the machine has a higher deviation between the actual and programmed trajectory in corners than in straight areas. This is due to the fact that, in corners, where there is a change in the direction of movement of the guides, flexion and vibration produce deformation of the wire, with wire-lag, and the so-called back-wheel effect.
The total shape error is 48 μm. It lies within the usual range between 25 μm and 127 μm for WEDM parts in rough phases [43], although it is higher than the shape error of the milled cam.

Discussion
In the present paper, the option to manufacture a tangential flank cam by means of two different processes, milling, and wire electric discharge machining (WEDM), is considered. Milling is one of the most usual processes employed in the serial production of cams. However, WEDM presents several advantages that could allow the manufacture of cams in serial production: different conductive materials can be machined regardless of their hardness, more complex shapes can be obtained, and it avoids the use of pre-shaped electrodes that are necessary for SEDM [14]. Alternatively, WEDM could be used in the first rough operation to reduce the amount of material to be removed in subsequent operations [15].
The surface finish of cams is important, because low roughness reduces friction in the cam-roller contact [27]. Roughness has been measured with a contact profile meter, as is usual in metallic parts with curved surfaces [44]. Shape error is important since better accuracy of the cam profile will favor the compliance with the motion-law of the follower and, consequently, better operation of the mechanism [2]. Shape error has been measured with a coordinate measuring machine, as is usual in the measurement process of cams and other curved surfaces [24].
As for the milled cam, after a finish operation, an average Ra value of 0.269 μm has been found. This value is similar to that obtained for miniature brass gears [26]. Moreover, the milled cam meets

Discussion
In the present paper, the option to manufacture a tangential flank cam by means of two different processes, milling, and wire electric discharge machining (WEDM), is considered. Milling is one of the most usual processes employed in the serial production of cams. However, WEDM presents several advantages that could allow the manufacture of cams in serial production: different conductive materials can be machined regardless of their hardness, more complex shapes can be obtained, and it avoids the use of pre-shaped electrodes that are necessary for SEDM [14]. Alternatively, WEDM could be used in the first rough operation to reduce the amount of material to be removed in subsequent operations [15].
The surface finish of cams is important, because low roughness reduces friction in the cam-roller contact [27]. Roughness has been measured with a contact profile meter, as is usual in metallic parts with curved surfaces [44]. Shape error is important since better accuracy of the cam profile will favor the compliance with the motion-law of the follower and, consequently, better operation of the mechanism [2]. Shape error has been measured with a coordinate measuring machine, as is usual in the measurement process of cams and other curved surfaces [24].
As for the milled cam, after a finish operation, an average Ra value of 0.269 µm has been found. This value is similar to that obtained for miniature brass gears [26]. Moreover, the milled cam meets the requirement of Ra value below 0.4 µm [30]. The shape error of the milled cam is 18 µm, which is lower than the values of ±25 µm that were reported by Norton [2], and slightly higher than those that are mentioned by Rothbart [40] for high-speed cams, of ±8 µm.
Regarding the WEDM cam, subjected only to a rough operation, an average Ra value of 1.212 µm has been measured. This suggests that the WEDM cam would require a further finish operation to meet the requirement of 0.4 µm [30]. The shape error of the WEDM cam is 48 µm. This error value is higher than that of the milled cam, and of the 21 µm reported by Hsieh and Lin for spatial cams [21]. However, it is lower than the value of 187 µm that was measured by Kang and Han [20] for marine engine cams, and it complies with the requirement of 50 µm defined by Norton [2]. Concerning the compliance of the required motion program of the cam-follower mechanism (meeting the displacement, velocity, acceleration, and jerk), in this case, the milled cam would have better compliance, and the WEDM cam would require a finish operation in order to guarantee proper compliance.
Thus, from the standpoint of quality, WEDM cams obtained with a rough operation allow obtaining the required shape error, although, a finish operation would be required in order to reduce surface roughness. From an economic point of view, a comparative study between milling, WEDM, and SEDM concluded that WEDM provides material removal rates that, although lower than those for milling, are higher than those for SEDM [15]. In the same study, it was calculated that the roughing costs of EDM are lower than the roughing costs of milling for short batches. This shows the potential of the WEDM technique for the manufacture of complex shapes, such as cams, especially in short production batches.

Conclusions
In the present paper, the option to obtain tangential flank cams by means of the WEDM process was considered. For this, two different cams have been manufactured by means of either milling or WEDM processes. Main conclusions are as follows: - The milled cam, obtained with subsequent rough and finish contour milling operations, meets both the requirements about surface roughness (average Ra = 0.269 µm < 0.4 µm) and shape error (shape error = 18 µm < 50 µm) for cams. - The WEDM cam, obtained with a rough operation, complies with the shape requirements (shape error = 48 µm < 50 µm), but not with the roughness requirements, with an average Ra value of 1.212. For this reason, a finish operation would be recommended, with a special clamping system to ensure the proper alignment of the part. -WEDM is a potential process for the manufacture of cams, especially in short production batches. Some advantages of this technique are the possibility to obtain complex shapes in different conductive materials, and the fact that, if WEDM is used in rough operations, the quantity of material to be removed in subsequent operations can be reduced.
The present study will help to develop the manufacture of tangential flank cams and other types of parts having curved surfaces by means of WEDM.