Presented at the ASEE Illinios-Indiana Section Meeting at Bradley University, Peoria, Illinois, Session 1A, March 21-23, 1996

Computer-Aided Design of Cam Mechanisms Using Math Toolkit Software: Solve and MathCAD

Gregory P. Neff and Michael D. Myers

Abstract

The power and availability of mathematical toolkit software such as MathCAD, Solve, MATLAB, and TKSolver allow unlimited flexibility and speed in cam design and analysis using tools provided in the software. A further advantage is manufacturing accuracy may be guaranteed by exporting cam profile coordinates to CAD/CAM software with very high precision to guide numerically controlled machine tools.

In this paper we will show how students from the MET program at Purdue University Calumet are using PC:Solve in cam design. We will also show how MathCAD is being used at Panduit Corporation in the design and fabrication of cams used in the operation of their product manufacturing machinery.

Introduction

Textbooks often treat cam shape generation using a graphical paradigm which is laborious and repetitive. This approach usually is limited to coverage of harmonic and cycloidal cam follower displacement profiles and cam shape layout for various follower geometries. Practicing engineers need to understand mathematical (analytical) cam design since the graphical paradigm does not lend itself to the high level of communication and quality required by the computer integrated design for manufacture environment of competitive companies. Analytical design is impractical without utilizing computers.

Formulas for follower displacement for several cam types are nearly always given in textbooks along with the derivatives of the formulas. The analysis for follower jerk (third derivative of displacement) in textbooks is often unconvincing to readers who only have the continuous equation of a portion of the displacement curve to inspect.

Cam Software

Several recent editions of mechanism kinematics and dynamics texts have included cam design software. For instance, the book by Norton [1] includes a version of a commercial cam design program. The Erdman and Sandor text [2] includes a compiled cam program, CAMSYN with interactive input typical of BASIC programs written in the 80’s. R. Chen [3] has made a version of his compiled C language cam and other kinematic design programs available to the academic community at a modest cost. Working Model has a cam-follower tutorial distributed with the student edition [4].

All of these software packages are worthwhile. The first three allow students to vary follower displacement parameters such as rise, fall, and dwell angles; then see the resulting cam shape. However, each package has a limited variety of cam follower motion types included in their menu choices. Working model lacks the facility to generate cam profiles. Polar coordinates defining a cam shape from some other source may be imported for analysis, however. Listings of FORTRAN or BASIC programs are often given in textbooks but have limited value.

Ideally, students would learn to do analytic cam design on their own using a wide variety of motion types and not be limited to calculations or output choices provided in a canned program. Canned programs do not provide the student the opportunity to modify, add, or use the programming in the package as a model for their own work. A drawback of using higher level languages such as FORTRAN, BASIC or C is that some numerical analysis is needed to calculate derivatives. Alternately, subroutines to do the differentiation, as well as plotting could be provided.

A number of colleges and universities are beginning to introduce math toolkit software into the curriculum. Engineering or engineering technology programs often start with a mathematical methods or computer tools course which utilizes math toolkit software and may focus on the "computer algebra" or "equation solver" aspects of the software. Increasingly often, the toolkit software is incorporated into a mathematics or physics course. Numeric toolkit packages such as MatLAB, MathCAD, TKSolver and Solve seem to be most popular in engineering problem solving. Symbolic packages such as Mathmatica or Maple are more often used in mathematics courses. Spreadsheet software also contains many of the same tools and is sometimes used instead. Each of these types of software can be used to good advantage in cam design. A number of packages (e.g. MATLAB, Solve, TKSolver) are available in student versions for about the price of a textbook.

Purdue University Calumet

At Purdue University Calumet PC:Solve is introduced in an introductory computer applications course in mechanical engineering technology. PC:Solve is integrated programming, graphics, and modeling software which can generate geometric solutions for cam shapes corresponding to various follower displacement characteristics with a minimum of programming. The toolkit that PC:Solve contains consists of over 300 built-in functions & procedures and additional libraries of secondary source engineering functions included with the required text. All calculations are double precision.

A cam analysis software program [5] called CAM_MENU has been written in Solve to enhance analysis, avoid traditional treatment shortcomings, and combine mathematical follower displacements into a consistent model. The program provides graphical output of follower displacement, velocity, acceleration, jerk and cam shape. The package is interactive and menu driven. It includes thirteen types of cam follower displacement motion used as the rise and return in the Dwell, Rise, Dwell, return (DRD) configuration.

The mathematical models for follower displacement can be complicated. Various cam motions require different functional forms for dwells, initial rises, subsequent rises and returns. The resulting displacement equation is a piece-wise continuous equation over the 360 degree range of the rotation angle. To describe the displacement for modified trapezoidal motion for example, requires that 14 equations be pieced together [6]. Example results from an 18 line PC:Solve workspace are shown in Figure 1.

5-6-7-8-9 Polynomial Cam


 

Figure 1 5-6-7-8-9 Polynomial Cam Output from PC:Solve

An advantage of numerical over symbolic math toolkit software is that it is not too difficult to analyze the kinematics of a curved arc cam such as the one shown in the left half of Figure 3 [7] or a tangent cam shown in the right half. We start with an AutoCAD drawing of the cam such as the one shown in figure 2. An AutoLISP program extracts a geometric data file that can be read into PC:Solve and analyzed kinematically using Solve. The same AutoLISP and Solve routines can also be used to analyze coordinate measuring machine data from an existing cam [8]. Kinematic analysis of a cam shape not easily expressed in closed form such as a circular arc or tangent cam is beyond the scope of mechanism kinematics textbooks.
 

Figure 2 Curved Arc and Tangent Cam Shapes

PANDUIT CORP. CAM DESIGN TECHNIQUES

Panduit has made cams for some of the production machinery used to manufacture its products. Most of the cams used have been DRD (Dwell-Rise-Dwell-return) or DRR (Dwell-Rise-Return) types.

Software Packages

In the past, common spreadsheet packages such as Lotus and Quattro Pro had been used to perform the bulk of the calculations encountered during the design phase of the cams. These did give proper results, but working with them tended to be confusing and unwieldy due to their need for cell addressing.

ex: +A2*3.412*B4+C4*(F3-F4)

The saved spreadsheet data files also tended to be very large and difficult to store.

More recently, software packages such as MATLAB and MathCAD have been used to better handle the complex mathematics of cam design. These types of packages allow direct variable assignments, and direct formula creation using these variables. Figure 3 shows an example of the WYSIWYG environment of MathCAD.

Figure 3, MathCAD Formulas

Design/Specification

Although software packages can and do perform many computations on various aspects of the cam, the principal reason to use software packages is to calculate and graph the position, velocity, acceleration, jerk, and pressure angles of the rise and fall sections of a cam path [6, 9 & 10]. Once these calculations have been made, the data can be used in a number of ways. For instance, the position data can be interpreted, or manipulated, to represent the polar coordinates of box cams, the cylindrical coordinates of barrel cams or ribbon cams, or the Cartesian coordinates of flat ribbon cams; the velocity, acceleration, and jerk can be used to determine the potential dynamic responses of the cam, and the pressure angle data can be evaluated to determine the practicality of the loads on the cam, cam follower, and cam shaft.

Preliminary Calculations

Before going through the effort involved in fully calculating the position, velocity, etc., some preliminary calculations can be made to determine the feasibility or practicality of the cam as it has been specified. The first parts of the provided worksheets perform simple, quick calculations for the cam. These calculations allow the user to quickly look at key results to determine whether further development of the cam is warranted.

The user is first asked to enter the stroke (h) and the period (b). From these, positions and pressure angles are calculated for critical parts of the cam. Next, through the course of further calculations, the user is asked to enter machine speed, system weights, and cam follower dimensions and specifications to give such results as force analyses, maximum acceleration, cam follower life, and cam shaft torque. These results can then be used to quickly see if the cam is practical, or even possible, given its application.

Cam Path Calculations

The cam path calculations are found in the second part of a typical worksheet, beginning with the heading, "CALCULATIONS, TABLES, AND GRAPHS". They start by asking the user for the timing information of the cam; where the dwells, rise, and fall sections begin and end. Once these are entered, the position, velocity, acceleration, jerk, and pressure angles of the cam are calculated, at 1/2 degree increments, and then graphed.

An example of a box cam graph, as well as the five linear graphs can be seen in Figure 6 below.

Radius

Velocity

Acceleration

Jerk

Pressure Angle

Figure 6

Rendering

A CAD system, either 2D or 3D, is usually used to draw the cam. Accuracy and precision can play a crucial role in the CNC (Computer Numeric Control) fabrication of a cam. Precision of .001 to .0001 inches is common when drawing a cam for CNC fabrication.

The cam paths are drawn much like the computer worksheets calculate them. The dwell sections are simply drawn as single arcs from beginning to end. The rise and fall sections, however, are more complicated. They are drawn using several steps. The first step is to take the position data from the mathematical software package and transform it into an appropriate set of coordinates, based on the type of cam being drawn. Next, line segments are to be drawn between these coordinates. For example, if a 60 degree rise section is calculated (in 1/2 degree increments), then the software generates 120 data points, and line segments can be drawn using these data points to create the rise and fall sections of the cam. These line segments are very small, and will usually look smooth when viewed on the screen, but they can, and probably will, cause problems with a CNC/CAM (Computer-Aided Manufacturing) process. For details, see the next section, Fabrication.

Fabrication

In the previous section, the CAD design process was described as using small line segments between the data points calculated by the software package. This can cause a problem in a CAD/CAM/CNC environment if the machining program or process is given the cam path as this series of line segments. For example, when drawing a cam, the dwell sections of the cam are drawn on a CAD system using arcs, but the rise and fall sections of the cam are drawn with small line segments. The problem is that when the machining process is performed, especially by more sophisticated CNC equipment and processes, the cam will actually be manufactured with tiny facets in the rise and fall sections of the cam. This, of course, is an exact fabrication of the CAD geometry; it’s exactly what was drawn. These facets can be very small and minor, and will probably have radii between them due to the tool used, but they will be there. These facets may not cause problems at lower RPM's, but at higher RPM's they can cause noise, vibration, and even excessive wear on the cam follower.

One solution would be to spline [11] the rise and fall sections of the CAD geometry. Most CAD systems have this ability. Essentially, the splining process replaces the line segments with a single, approximating curve. When a CNC machining process is performed with this splined geometry, no facets will result. There is a very important consideration with this solution; the splining process done by the CAD system is always based on a given tolerance. This tolerance determines how closely the new approximate curve will follow the line segments. If this tolerance is set too large, the approximate curve may vary too far from the ideal cam path represented by the line segments. If the tolerance is set too small, the resulting curve will still have facets, just with smoother radii between them. The trick is to use a good tolerance value. A general rule of thumb has been to use a tolerance value approximately 1/2 the length of the smallest line segment. This should result in smooth rise and fall sections when the cam is fabricated.

If a cam has already been made and found to have facets, the walls of the cam can be manually ground to eliminate these facets. Great care must be taken in this process. The slightest divot or dimple in the cam path can have the same damaging effects as the facets.

Summary

Math toolkit software is ideal for analytic cam design. Numerical analysis tools make calculating derivatives and plotting results an easy task. Numerical math toolkit software can be used to analyze circular arc or tangent cams when used in conjunction with parametric CAD programming tools. The parametric CAD tools allow cam shape data generated by toolkit software to be imported into CAD packages for CAD/CAM fabrication.

Acknowledgments

The authors would like to thank Robert J. Talchik, Design Engineer, Panduit Corporation, for his extensive preliminary work in the development of the cam worksheets.

References

[1] Norton, R.L., 1992, Design of Machinery, McGraw-Hill, New York.

[2] Erdman, A.G. and Sandor, G.N., 1991, Mechanism Design: Analysis and Synthesis, Volume 1, 2nd Ed., Prentice Hall, Englewood Cliffs, NJ.

[3] Chen, R., 1994, 67 Tanglewood Dr., E. Hanover, NJ 07936, phone: (201) 887-3993, e-mail: chenr@admin.njit.edu.

[4] Ruben, C.A., 1995, "Tutorial Manual for The Student Edition of Working Model, V 2.0 by Knowledge Revolution, Addison-Wesley, New York, pp. 187-198.

[5] Neff, G.P., 1994, "Computer-Aided Analysis of Flat Plate Cam Mechanisms," Proceedings of the 1994 ASEE Annual Meeting, June 26-29, Edmonton, Alberta, Volume 2, pp. 2441-2445.

[6] Chen, F.Y., 1982, Mechanics and Design of Cam Mechanisms, Pergamon Press, New York, pp. 36-37.

[7] Neff, G.P. and Zahraee M.A., 1995, "Cam Mechanisms: A Practical Topic to Integrate Several Computer/Lab Oriented MET Courses," ASME Technical Paper 95-WA-MET-6, San Francisco, CA, November 12-17.

[8] Neff, G.P., Zahraee M.A., and Higley J.B., 1995, "Computer-Aided Kinematic Analysis of Flat Disk Plate Cams: A Reverse Engineering Approach", Proceedings of the 1995 ASEE Illinois/Indiana Section Conference, West Lafayette, IN, March 16-18, pp. 43-47

[9] Moon, Clyde H., 1962, Cam Design Manual for Engineers, Designers, and Draftsmen, Commercial Cam Division - Emerson Electric Company

[10] Sandex Company 1995 Catalog, Sankyo America Inc.

[11] Tickoo, S.L. and Neff G.P., 1995, "NURBS: Spline command options control fit and tangency," AutoCAD World, Vol. 4, No. 7, pp. 15-18, July.

*****

Gregory P. Neff

Gregory Neff is professor of mechanical engineering technology at Purdue University Calumet, Hammond, Indiana 46323-2094, phone (219) 989-2465, e-mail: neff@calumet.purdue.edu. He is a Registered Professional Engineer, a Certified Manufacturing Engineer, a Certified Manufacturing Technologist, and a Certified Senior Industrial Technologist. Greg is active in ASEE where he won the Meryl K. Miller award in 1994 and in SME where he is education & certification chair for chapter 112 and faculty sponsor for student chapter 161. He is a member of ASME, NAIT, and the Order of the Engineer. His biography appears in recent Marquis Who's Who in Science and Engineering and Who's Who in America.

Michael D. Myers

Michael Myers is a Machine and Equipment Design Engineer for the Panduit Corporation, New Lenox, Illinois, 60451, phone (800) 777-3300 x2234, e-mail: mdmyers@interserv.com. He received his Bachelor’s of Science degree in Mechanical Engineering from Bradley University in Peoria, Illinois in 1989 and is currently working on a Master’s of Science degree in Mechanical Engineering from the University of Illinois in Champaign-Urbana, Illinois. Mike is a Registered Professional Engineer In Training and a member of the National Society of Professional Engineers. Mike expects to obtain his Professional Engineer Registration within the next 2 years.

Appendix

An example of a PC:Solve program for the 5-6-7-8-9 polynomial cam which produces the graphical output shown in Figure 1 is shown in Figure 7 below. The program can also analyze:

2-3 Polynomial y=3*z^2-2*z^3

3-4-5 Polynomial y=10*z^3-15*Z64+6*z^5

4-5-6-7 Polynom. y=35*z^4-84*z^5+70*z^6-20*z^7

or another user specified polynomial by editing the 5-6-7-8-9 polynomial equation default at run time..

;POLYNOMIAL 5-6-7-8-9 MOTION

; y’s are follower displacements for various parts of the cam cycle

; d0, dwell at the beginning of the cycle in degrees.

; d1, dwell at peak motion in degrees.

; b1, rise and b2, fall angles in degrees.

; h, rise distance. drdr is dwell, rise, dwell, return cam

get_drdr_data ;input subroutine for d0, d1, b1, b2 & h

get_x ;define angle subdomains using d0, d1, b1 & b2

y1 = fill(basecircle, d0/deg+1) ;initial dwell

y2=askname('What is the equation of the polynomial?','y2=126*z^5-420*z^6+540*z^7-315*z^8+70*z^9')

y3=fill(basecircle + h, d1/deg) ;peak dwell

y4=y2 ;make copy of polynomial text expression

z=((x2-d0)/b1)

execute(y2) ;evaluates polynomial for rise

y2=y2*h+basecircle ;rise

z=(1-(x4-d0-d1-b1)/b2)

y4=tjoin('y4',ttake(y4,3,42))

execute(y4) ;evaluates polynomial for fall

y4=y4*h+basecircle ;fall

y=joinrow(y1,y2,y3,y4)

gline(x,y) ;displacement graph

v= derivative(x,y)@gline(x,v) ;velocity graph

a= derivative(x,v)@gline(x,a) ;acceleration graph

gline(x,derivative(a)) ;jerk graph

Figure 7 PC:Solve Cam Design Program