Author Topic: Cam Calculations SOLVED! (But is there an easier way??)  (Read 3857 times)

Offline awake

  • Full Member
  • ****
  • Posts: 303
Cam Calculations SOLVED! (But is there an easier way??)
« on: April 09, 2020, 03:00:53 AM »
Actually, the answer to the question in my topic title is, yes, there is an easier way, and that's actually how I started down this road.

Let's say you want to design a cam with curved flanks, and you have the following parameters:

the radius (or diameter) of the base circle;
the radius (or diameter) of the nose;
the maximum lift that the cam should exert;
the angle of duration during which the cam should exert lift.

With these parameters, you can generate a diagram like the one in attachment 1 using any decent 2d CAD program that knows how to create tangent circles. In this diagram, the heavy red line represents the desired cam; the green circle represents the base circle; the blue lines represent the angle of duration; the magenta circle represents the nose radius; and the cyan circles represent the cut that needs to be made using a boring bar to achieve the curved flanks - what I will call the "flank circles."

The issue here is for the curved flanks to transition smoothly into both the base circle and the nose radius. In order to achieve this perfect transition, the flank circles have to be tangent to both the base circle and the nose radius. As I said, with a 2d CAD program, this is trivial to achieve, and one can then take a measurement of the resulting flank circles to determine the radius needed on the boring bar to achieve this cut.

The problem is, every time you change your mind about any of the 4 parameters listed above, you have to redraw the diagram in the CAD program, and again take the measurement to find the new radius needed for the flank circle to cut the cam with the new parameters. Yes, not that big a deal ... but I wanted to automate the process.

It turns out that the 3d CAD program I use (FreeCAD) has a nifty system that lets you set up a spreadsheet of values, give any of those values a specific name, and then use those values to control the constraints in a sketch. Attachment 2 shows a screenshot of the spreadsheet I set up, where I can enter the 4 parameters; attachment 3 shows the constrained sketch that uses those values (shown as orange-colored dimensions). Attachment 4 shows the resulting extruded cam shape. It is like magic - change a value in the spreadsheet, and instantly the cam changes shape accordingly.

Except for one small problem - FreeCAD is doing essentially the same thing that the 2d CAD program is doing - it is generating the curved flanks as an arc of a circle, my so-called "flank circle" (shown as a large blue circle in the sketch in attachment 3) that is tangent to the base circle and the nose circle. What it doesn't automatically do is tell me what the radius of that flank circle turns out to be. You can see it in the sketch as a red dimension, but here's the thing - to get that, I have to first constrain this circle to match the flanks, then remove that constraint, then constrain the radius without actually changing it, which finally gives me the red dimension shown. Why such an involved process? Because you can't have competing constraints - either the circle is constrained to be tangent (without showing the radius), or it is constrained to a given radius (which then will no longer automatically update when you change the parameters).

Okay, most of that last paragraph is probably as clear as mud, but I don't know how to describe it more clearly without walking someone through the process in FreeCAD. If there is interest, I could make a video, but I don't know how many people would actually find it useful ...

There may be a way to get this dimension from the 2d drawings that FreeCAD can generate from the automatically generated cam - but it is not obvious, because the large blue circle for which I want the radius is a "construction" circle that doesn't actually show up either in the displayed model or in the 2d drawings. (There may be another way to get at this - I'm still experimenting with it.)

I kept thinking there must be a way to calculate the radius of the flank circle - a simple calculation that takes into account the various parameters above and does whatever it is that the CAD programs are doing in the background to figure out the doubly-tangent circle. So ... I attempted to work out the math. If you are particularly masochistic, attachment 5 shows the calculations - but I warn you that they are not simple. I am guessing there IS a much simpler way to figure this out than I came up with, but I don't know what it is. If you know it, I sure do want to hear it!

Nonetheless, I did finally achieve the goal - as nasty as the calculations turned out to be, I finally wound up with something that could be coded into an Excel spreadsheet to generate a solution. Attachment 6 is that spreadsheet. You enter the parameters in the top left; it grinds through the calculations below that in a nanosecond or two; and it shows two possible solutions for the center and radius of a circle that is tangent to both the base circle and the nose circle. Why two? Because you could have a tangent circle on the "inside" of the base & nose circles. But the solution you (or at least, I) really want is the larger circle - this is, at last, the radius that needs to be set on the boring bar in order to cut the desired cam with the desired parameters.

Having read this, are you as exhausted as I am after spending way, way, way too much time trying to work this out???
Andy

Offline nj111

  • Full Member
  • ****
  • Posts: 144
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #1 on: April 09, 2020, 11:15:49 AM »
remember also you can crunch numbers through CAMCALC which appeared on MEN a while ago, http://modelenginenews.org/design/CamTable.html
Nick

Offline Muzzer

  • Full Member
  • ****
  • Posts: 68
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #2 on: April 09, 2020, 03:40:00 PM »
Most CAD programs allow the use of parameters and expressions to dimension parts.

Fusion 360 (also free) provides a table of parameters that you can edit using conventional expressions or you can type them directly into the dimension tool. https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-76272551-3275-46C4-AE4D-10D58B408C20

Offline awake

  • Full Member
  • ****
  • Posts: 303
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #3 on: April 09, 2020, 08:00:18 PM »
remember also you can crunch numbers through CAMCALC which appeared on MEN a while ago, http://modelenginenews.org/design/CamTable.html

Wait - are you telling me I went through all that tedious algebraic calculation, just to re-invent the wheel?? I can't say that I'm surprised ... :)
Andy

Offline AVTUR

  • Full Member
  • ****
  • Posts: 244
  • West of England
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #4 on: April 09, 2020, 09:08:55 PM »
Andy

Reading your posting I thought that there is an easier way – use co-ordinate geometry and solve the resulting simultaneous quadratic equation. I then re-read the posting and realised that is what “Cam Calculations.pdf” did.

After further thought I decided that the flank radius could be calculated by trigonometry without any nasty equations.

Taking a cam with a base radius = 1.500, Tip radius = 0.750, Lift = 1.250, Dwell = 200o, one can drawing a triangle with two sides from the focus of the flank through the tip and base foci and on to the ends of the flank (tangents and all that). The third side is between the tip and base foci (see attachment). This triangle can be attacked by using one of the general trigonometry equations

                     Cos.A = (b2 + c2 – a2)/2bc

In this case:
                     A = half the dwell angle = 100o, so Cos.A = -0.1736
                    a = flank radius – tip radius = R – 0.750, where R = flank radius
                    b = lift + base radius – tip radius = 1.250 + 1.500 – 0.750 = 2.000
                    c = flank radius – base radius = R – 1.500

Winding the handle (in stages)
                    -0.1736 = [22 + (R – 1.500)2 – (R – 0.750)2] / [2 x 2(R-1.500)] = [4 + (R2 – 3R + 2.250) – (R2 – 1.5R + 0.5625)] / [4R – 6]
                    6 – 4R = (5.6875 – 1.5R) / 0.1736 = 32.7621 – 8.640R
                    4.6406R = 26.7671
                    R = 5.7669

This can be confirmed by drawing.

I did think of another method which used a spread sheet “goal seeking” analysis but I like the above.

AVTUR
There is no such thing as a stupid question.

Offline AVTUR

  • Full Member
  • ****
  • Posts: 244
  • West of England
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #5 on: April 09, 2020, 11:18:48 PM »
A minor correction to my earlier posting. The general equation should read

                                     Cos.A = (b2 + c2 – a2)/2bc

Apologies - finger problems.

AVTUR
There is no such thing as a stupid question.

Offline awake

  • Full Member
  • ****
  • Posts: 303
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #6 on: April 10, 2020, 01:22:45 AM »
AVTUR, this is very interesting. I suspected that if there were an easier way, it would involve trigonometry. Unfortunately, I've forgotten most of the trig and pretty much all of the calculus I learned some 40+ years ago. :(

I mostly followed this, but I need to be sure I understand the terms. By dwell angle, do you mean the time during which the cam is not acting on the valves? Or to say it another way, the angle through which the cam consists only of the base circle? That is what I think I am seeing in the diagrams above.

Definitely way, way, WAY easier set of calculations to reduce this down, and better yet, you don't have to fiddle with the two solutions of a quadratic equation.
Andy

Offline AVTUR

  • Full Member
  • ****
  • Posts: 244
  • West of England
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #7 on: April 10, 2020, 11:40:43 AM »
Andy

Yes - the dwell angle is the period of no lift. That is the follower is on the base radius.

Agreed about quadratic equations, especially simultaneous, the square root of minus one might fascinate mathematicians and nerds but I am not sure how spreadsheets handle it or complex numbers.

All the best

AVTUR
There is no such thing as a stupid question.

Offline tangler

  • Full Member
  • ****
  • Posts: 834
  • Christchurch, UK
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #8 on: April 10, 2020, 12:57:45 PM »
Hi guys,

 I went through this exercise (together with a clever colleague at work) a considerable time ago - we all obviously like re-inventing the wheel!  This resulted in CamCalc, a BASIC program which was published in Strictly I.C. Ron Chernich of ModelEngineNews picked this up and published a similar web friendly version.  He commented that he had found the equations governing the cam/follower in Bevan:Theory of Machines and I subsequently have found the equations in an engineering book called Design of Machine Elements by M F Potts.  I've scanned the relevant pages below.

I think the "dwell" angle is usually considered to be the portion of the rotation that actuates the cam follower - I prevented any possible confusion by calling this the "cam action angle".  People also tend to get worked up about the nose radius but this should be developed from the flank radius because this is what controls the acceleration of the cam follower and thereby the size of spring required to keep the follower in contact with the cam.  I think many designers of model engines in the past  have not had the capabilities to design the cam analytically - it was easier to draw the base radius and a circle with a nose radius and just join the two together.

Ron didn't like the way I calculated the the velocity and acceleration from the displacement information.  I used the computer to calculate the gradient of the displacement curve curve at regular small intervals (in effect differentiating it) to give the velocity and then the gradient of the velocity curve to give the acceleration. Ron used the equations given in the text.






:
Anyway, for what it's worth, my current version of CamCalc is an Excel file and is available in my dropbox here:

https://www.dropbox.com/s/2dc9peae1aene3d/cam%20with%20draw.xls?dl=0

Stay well,

Rod





« Last Edit: April 10, 2020, 01:12:49 PM by tangler »

Offline Jo

  • Administrator
  • Full Member
  • *****
  • Posts: 15294
  • Hampshire, england.
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #9 on: April 10, 2020, 04:05:28 PM »
Thanks Rod  8)

I've attached your file to this post  ;)

Jo
Enjoyment is more important than achievement.

Offline awake

  • Full Member
  • ****
  • Posts: 303
Re: Cam Calculations SOLVED! (But is there an easier way??)
« Reply #10 on: April 10, 2020, 05:05:56 PM »
Rod, this is marvelous! Though I am now even more thoroughly embarrassed by my crude efforts, I am glad I started the thread - you have given me lots to work on in understanding cams!
Andy

 

SimplePortal 2.3.5 © 2008-2012, SimplePortal