# Grinding Cams - CNC program Beta test



## dsage (Jun 15, 2013)

The moderator is welcome to move this thread to another location. I didn't see another forum that was exactly suited to this that had the popularity of this one.

Continuing from my previous thread question  "Grinding Cams - will this work"
http://www.homemodelenginemachinist.com/f26/grinding-cams-will-work-19756/

For those of you who are CNC mill equipped, we now have a properly working program that will generate Gcode to grind a cam. It properly takes into account the diameter of the grinding wheel unlike my previous attempt using modified Camcalc numbers.

We named the program Gcam and it is free to use. It's is a web-based application so you don't need to install anything. You enter your specs into the program on-line and it creates the Gcode in a file you can download to your machine. Eventually John will release the source code for it. 

With this program you set up your camshaft or cam pair blank in a rotary table horizontally along the X-axis on your mill table and mount a grinding wheel fixed to the back of the machine. The Gcode drives the Y-axis into and away from the grinding wheel and turns the rotary table to control the shape. This gives you a finish ground cam exactly to the specs you choose.
(see picture in next post)

What we're looking for is some people to try the program. If you already have a CNC mill with a rotary table and you have a toolpost grinder then all you'll need to build is a mount to hold the grinder solid to the mill.

I've created a Yahoo group for the program at 
http://groups.yahoo.com/group/GCam_CNC/

If the link above doesn't work the group name is Gcam_CNC

The reason for the Yahoo group is that it's easier for me to manage the pictures and users manual changes with direct access as moderator.
If you already have a Yahoo account then please join that group. I've posted a full users guide and a lot of pictures of the setup in the files and pictures section to help you out.

We already have on board Mike Rehmus from Model Engine Builder magazine and Carl Wilson who has written several articles for that magazine on grinding cams.

If all you want to do is have a look at the program and generate some Gcode to look at then the program is available at:

http://gcam.lucasemail.org/

You should really download the users manual from the Yahoo group since there are a things that need to be explained about the program.

All I want is to get it out there for comments and to see if it will be useful to you people that are equipped with CNC mills.
 I've ground several cams with it and have done some checking at 16x magnification and it appears to generate cams exactly as specified with a nice ground finish.
We'd appreciate some further testing and comments.



I'd  hate to have to duplicate the effort on two forums but if you want, you can comment here as well.

Thanks

Dave Sage
John L. (programmer)


----------



## dsage (Jun 15, 2013)

Since a picture is worth a thousand words, here is a picture of the basic setup.
You'll note my nice grinding spindle driven by an old electric sander motor. Proof that it doesn't take much to grind a nice cam. The spindle is fastened solid to the back column of my mill drill with the center height of the 7" grinding wheel at the same height as the axis of the cam blank.
As I mentioned there is a lot of other important information contained in the Yahoo group Gcam_CNC so you should look there.

Sage


----------



## mu38&Bg# (Jun 15, 2013)

Looks interesting!


----------



## /// (Jun 16, 2013)

Awesome work Dave.
I'm not at cam grinding stage yet, but after reading your previous thread I know this is going to be of benefit to a lot of people Thm:


----------



## dsage (Jun 16, 2013)

I hope so.
But I wonder if the combination of people without CNC, those that don't have a lathe toolpost grinder they can use or those that are unwilling to make a grinding setup will doom it to failure.
On the original thread I show where I used a typical mini-grinder which most folks have around to do the job. Only a mount required. It's not as good as a proper stone wheel but it does work.

There is nothing wrong with the other methods of making a cam but it seemed to me that filing a cam even for a final finish was a bit counter productive.
Almost anything will work on a model engine but to my way of thinking why not make it perfect if your going to make it.


Sage


----------



## Dave Sohlstrom (Jun 16, 2013)

Dave

One question and one suggestion.

Does the program do all the cam lobes on a cam automatically.?

It may be a good idea to make the Yahoo group so anyone can read the messages to get an idea of what the group is about. 

Dave


----------



## jwcnc1911 (Jun 16, 2013)

This is pretty aswesome.  I was just talking to enfieldbullet about making a dedicated cnc lobe milling machine and a grinder based on some of our machines at work.  I think on hobby scale the cost of a dedicated machine would be more than doable - especially home built.


----------



## dsage (Jun 17, 2013)

Hi Dave:

No the program does only one lobe. For at least couple of reasons.

Each lobe will need to be re-programmed anyway since the grinding wheel is wearing as you go. 
It's just not worth the extra confusion in the program to have to program the whole camshaft with the distance between lobes since it probably varies anyway due to bearings spacing etc.
The lobe separation angle between intake and exhaust lobes is also not worth the effort and confusion for the above reasons, and, with a CNC machine it's a simple matter to manually issue a command to rotate the cam by the required number of degrees and reset the DRO to zero and start again when you're ready. The grinding always starts at zero degrees that being the tip of the lobe.

Re: opening up the Yahoo group:
I'm pretty new at managing a Yahoo group. So far I haven't seen a way to "open it up" so anyone can view the messages just by going to Yahoo groups.  One still has to "join the group" to be able to look at the messages. The best I can do is make it so I personally don't have to approve a person trying to join. 
But they still have to join. 
A GRROUP a little bit different concept than a FORUM like this as far as I can figure anyway.
If you know otherwise let me know and I'll consider it.


Sage


----------



## dsage (Jun 17, 2013)

Jw:

The cost is almost zero if you already have a CNC mill. (which is why we created the software). No need to make a dedicated machine when you might already have it.

I thought about a dedicated CNC grinding machine but I figured it would be about the same as building a dedicated CNC milling machine if you want it to be any good. Probably would not be cost effective. It would certainly be more than a dedicated mechanical grinder due to the steppers,drivers, computer and software etc.

Sage


----------



## jwcnc1911 (Jun 17, 2013)

I realize that adding this to your existing mill would cost less.  I'm talking about a package that would take up about a cubic foot and cost around $600.  It would have movable steady rests for rigidity.    PM me your email address, I'd like to show you my considerations, not to mention I think my example will give you some inspiration (I machine cams, cranks, heads and blocks for diesel engines for a living).  I'm thinking it could be used as a roughing mill and for grinding.  Essentially you put in a blank piece of stock and get a finished cam or crank out.  Plus you could generate the path with standard lathe CAM for live tooling.  I think it would be kinda like a sawzall, you'd find many ways to use it.  Just a thought.  It's a long term goal for me any way, I figure I'll eventually get into IC even though I have basically no interest at all right now.


----------



## Dave Sohlstrom (Jun 17, 2013)

JW

I'm not sure that I want a grinder mounted to my CNC mill. Grinding grit will make it's way to the ways no matter how much you try and keep it out.
I would think that a small machine built to grind cams and cranks up to maybe 8" long would be the way to go.
I know that there are not a lot of folks out there that would want to build such a machine.

Dave


----------



## dsage (Jun 17, 2013)

JW:

Feel free to post a picture of your idea here but I'd rather stay on topic -  which is to discuss using our new program to grind cams. I guess what I'm saying is that the machine you'd end up with to run our Gcode would essentially be a dedicated milling machine. No point in building another one that will for the most part sit around collecting dust when you are finished. This is partly why I went this route. I was too lazy to build a mechanical cam grinder when I essentially have a very precise device already in my CNC mill.


Dave:

I considered the issue with grinding "grit" as you call it. In fact there is very little to worry about. It is not thrown all over the place it stays directly below the grinding wheel for the most part.
I start by first mounting the rotary table. I then drape heavy plastic from high up under the milling head, down over the table and the rotary table and to well below the machine. I then poke a hole through the plastic just big enough to pass the cam blank into the chuck on the rotary table. I hold the plastic down where necessary with small magnets. (all of that was removed for the picture taken above).
 In operation I place several of those flat magnetic fridge magnet thingy's right below the grinding wheel area. They collect most of the grindings.
Most folks are thinking that the grit is grinding stone. If things are working properly the wheel wears very little so almost all of the "grit" is metal. I don't grind hardened blanks. I harden them afterward so the grit is no harder than normal swarf.

Having said that I will warn that when you dress the wheel, that grit does fly around quite a bit. So what I do is hold a vacuum cleaner right up to the diamond dresser during that operation and it all gets sucked up. The vacuum could also be placed near the grinding wheel but my shop vac is very noisy so I choose not to use it.

 So far the machine has been spotless after I carefully remove the plastic. I don't reuse it. I have felt the machine after the grinding and have not detected any grit.

To each his own I guess.

Sage


----------



## ruzzie (Jun 17, 2013)

I did a test using a 2mm ballnose cutter and I must say it went better that expected.Their was a bit of mucking around with the code to run in the Z axis.
It was cut as if your grinding wheel was 1mm wide and your lobe is 6mm wide, you take your first cut then move across 1mm and take your second cut and so on until you covered the width of your lobe.
I will also post a  more detailed account of what I am up to on   http://groups.yahoo.com/group/GCam_CNC/


----------



## jwcnc1911 (Jun 17, 2013)

No problem, when I start posting my project I'll start a new thread.

What I'm envisioning will be more like a lathe with live tooling - almost anything you want to make on a lathe would be possible.  Not just cams and cranks.

I actually intend to start drawing it up in the next few months.  Any one interested in such PM me and I'll shorten my time frame if there's enough interest.


----------



## dsage (Jun 18, 2013)

Thanks Ruzzie:

Even though you not grinding I'm happy to see you giving it a try. I never thought of doing it that way since the intention was to end up with a smooth ground finish. But "whatever turns you cam" 
Looks the the program is going to be more versatile than CamCalc for those with a CNC miil.

And as you mentioned there is a bug in the program in that it does not accept Z as the moving axis. It should.  John will no doubt fix that when he gets back from holidays.

Thanks for finding that bug. This is what the beta test is all about.

Thanks

Sage


----------



## Dave Sohlstrom (Jul 9, 2013)

What would happen if you were to use your mill with the program to rough out the cam lobes. Then heat treat the cam. After the cam has been heat treated put it back in the machine and finish grind the lobes and bearing areas.
If you configured you grinding spindle so it would go slow enough to use a narrow diamond wheel on hardened steel. You could grind all the lobes at the same wheel diameter setting in the program. I know you can not grind steel on a diamond wheel with the wheel turning at high speed. The wheel loads up with steel and wrecks it.

Just food for thought

Dave


----------



## dsage (Jul 9, 2013)

Hi Dave:

So far I've only used the program to generate cam-pairs for the Howell V4 engine - which I turned into a V8. The camshaft uses ball bearing races so the shaft needs to be built up from pairs of lobes slid onto a shaft along with the bearings.
 If I were to create a whole shaft I would have thought it would be difficult to remove the cam from the grinding setup and get it indexed back into the grinding setup after hardening. This fear might be unfounded since a simple flat or pin somewhere would remove the issue. (read on)

We are certainly not here to dictate how to create a grinding setup, just to supply the program to generate the cam lobe shape.

Feel free to try anything you wish and report back to us.

If there is anything I have concluded about producing cams by any method it is that only a few thou of eccentricity in the lobe axis with respect to the shaft axis can cause havoc with the timing of the opening and closing of the valve from the expected results. Especially when the typical valve lash setting on a model cam are typically only a few thou. I have seen the valve open where expected in it's rotation but close in the wrong place or not at all because the lobe is (let's call it) lop sided on the shaft. So far this has come from the cam blank not running true in the chuck / collett etc holding it while being ground. As mentioned by only a few thou.

Dave Sage


----------



## Dave Sohlstrom (Jul 9, 2013)

I'm just thinking out loud in print right now. I have never built a cam so it will be a steep learning curve.
As I said in the Yahoo group, I hope to some day build a pair of 4 cylinder engines for a model tow boat.

Dave


----------



## kvom (Jul 10, 2013)

Where you say rotary table above, I think you mean 4th axis, since the control needs to rotate the camshaft.


----------



## Dave Sohlstrom (Jul 10, 2013)

dsage has his rotary table set up as the 4th axis A so it does rotate the cam blank correctly.


----------



## ruzzie (Jul 15, 2013)

I knocked up grinding spindle and tried it out 
Mechanically I have found that my grinding spindle motor needs more hp a 100W is not enough.

A few things that I though may be helpful -
1-Linear moves:- To allow cutting the full width of a cam when using a narrow grinding wheel or ballnose cutter. 

2-Continuous rotation:- If you cut in the one direction all the time then there should be no backlash to worry about 
and it may speed the process up by not having to "rewind after each cut". 

3-Finishing cuts "spring cuts":- To specify how many rotations the finish cut should do before the grinding wheel moves away.
E.g. Specify 5 spring cut so the cam will do 5 continuous rotations of the finish cut to clean up any high spots or spring in the cam.

I only got a 1/4 of the profile done as it was taking to long with my current setup

I am now on the lookout for a more powerful motor to see what damage I can do.

Cheers
Paul


----------



## dsage (Sep 25, 2013)

High Paul:

We took your suggestion and John has added the ability to rough out the cam with a ball nose cutter. IMHO that's a bit of a step backward from the goal of being able to GRIND a perfect cam. Sort of like going back to using CamCalc. But it's optional so if it helps you out then that's fine. We aim to please. 
As for your other suggestions I don't know anything about the math and how it relates to the grinding process, but I assume there is good reason why John chose to grind and rewind instead of going it circles. Rotary tables are all different. Mine only takes about 20 seconds to rewind on a G0 so it doesn't waste too much time.



Sage


----------



## JamesPruitt (Mar 12, 2014)

I would like to know what type of wheel you are using and where do you find them 
Thanks Dave


----------



## dsage (Mar 12, 2014)

The wheel size you choose is dependent on the grinder you have. I made my grinder and I'm using a 7" diameter wheel because I assumed it might have less error in the grinding calculations if it was closer to a flat surface. According to John (the programmer) it really makes little difference what diameter the wheel is. Except to say that a larger wheel has more circumference so it might wear less for a given grit type.
In any case I'm using an Atlantic EK1 15018 VYF which is 7" diameter x 1/4 wide x with a 1-1/4 hole. The cam lobes I'm grinding are 1/4" wide so it was the correct width to do the grinding without having to repeat each pass with a sideways move. I would recommend that approach.

As for where to purchase them. They are very available from any machine tool supplier. There is a dizzying array of grit types and grades. So you should do some reading on them. The number I quoted is 150 grit (part of the number) and I think it's a medium hardness material (the letters).
I've forgotten. 
I'm not an expert on wheels I purchased a few different grades to see which works best. They run around $15 more or less in that size.

I'm sure others can chime in on the topic.

Sage


----------



## lmarsaglia (May 19, 2014)

Hello my name is Leonardo and I'm from Argentina. I'm new to this forum as you can see and I registered not because I build model engines but because my father, my brother and I manufacture camshafts for spare here in Argentina.

I'm going strictly to the point that has to do with this thread. We grind our camshafts using automatic grinders with LinuxCNC as a controller. The grinders only use LinuxCNC for positioning because we grind the lobe profile using a steel master cam. 

Anyway, a while ago a great contributive user from the community named Andy used LinuxCNC and his lathe to turn eccentrics and other shapes moving the tool based on the spindle position. Here you can see a video of the machine working: [ame="http://www.youtube.com/watch?v=FpP7iTKuWpw"]http://www.youtube.com/watch?v=FpP7iTKuWpw[/ame] The approach he uses is simple and great. He adds an offset to the X axis based on the spindle position for making the profile. So, at the moment I saw this I thought in the way of using the same principle with a cylindrical grinder for making camshafts. I need to clarify that with this method it's not possible the use of G-code cutter compensation since the angular axis is treated as a spindle and not as an actual axis like you would expect on a mill. So the axis is always spinning at a certain speed (wich in commercial CNC grinders is not constant) and the transverse axis is following the spindle position. This is the same principle of the threading procedure.

Since we make our camshafts based on the original part, we capture the profile of the lobe to reproduce it on the new part. Now we use the old method of generating a steel master cam. With this method the reproduction of the lobe has no compensation for the grinding wheel diameter but there's no problem since the wheels are 500 mm or more, thus the error of the finished lobe is of a few hundreths of mm.

Now comes the fun part.

I'm thinking about capturing the shape of the lobes using increments of about 0.5° or 0.1° wich is a lot of accuracy given the size of the lobes we're talking about. And after that, use the data to apply the offset to the machine using LinuxCNC. But for this I'm considering two approachs.

1- I capture the lobe using a big radius for the roller (about 300 mm of radius) and use the plain offset that I get of the capture ignoring the grinding wheel radius compensation. Since the griding wheel has a diameter of 500 mm or more, this is the same sort of error I'm getting now when I use the master cam for grinding the lobes, wich is almost none.

2- I capture the lobe using a little radius (20 mm or 30 mm) for the roller and then I need to compute the variation of the angle of the tangent between the roller and the lobe. Then I need to figure out a general equation in wich the roller diameter could be changed to the wheel diameter so the offset is automatically compensated. This way I can compensate the grinding wheel in a very accurate manner and also I can change the value of the radius everytime the wheel is dressed.

I try to be a perfectionist so the approach number 2 is the one I want to use. May be my math habilities are not that good or I need more experience with the calculations but I can't figure out how to calculate the angle of the tangent line between the roller/wheel and the lobe. I'm trying to do it graphically and I can't calcule it. The data that I have is the distance between the center of the lobe and the center of the roller, the diameter of the roller and the angle of rotation of the lobe, but it seems I always have missing data.

I would really appreciate if any of you could give me a hand to guide me in the right way. Please let me know if you have any doubts about my problem or if something is not clear.

Thanks in advance for your help!

Leonardo Marsaglia.


----------



## dsage (May 19, 2014)

Hi Leonardo:

 Thanks for asking your question. Hopefully someone here can answer it for you. If not, for sure if you join my Yahoo Group called GCam a couple of guys there can help you out because it sounds like our program Gcam is doing exactly what you are trying to do and I'm sure our programmer has been through all the math you're having issues with. In addition there is another member who has written several articles on grinding cams so I'm sure he can help you with some of the Geometry.

 Hope to see you soon on the Yahoo group Gcam.

 Dave Sage


----------



## dsage (May 19, 2014)

By the way:

 If you go back to the first post in this thread you'll see a link to the Gcam users group where you can join (free) and another link to our program if you'd like to give it a try on line.

 Thanks

 Sage


----------



## dsage (May 19, 2014)

Leonardo:

I had a look at your video. Very cool. It looks very similar to what Gcam is doing only on a lathe.

Maybe John the GCam programmer would be interested in something like this LOL.
 I'll pass this along.

Very nice.

Thanks

Sage


----------



## lmarsaglia (May 21, 2014)

Hello Sage and thanks for your reply.

I was really enthusiastic yesterday so I continued trying to figure out a method to reproduce a cam that it's already machined.

So rewatching my method of capturing the lobe I figured out that what I need is the actual displacement of the lobe without the action of any roller. Thinking this I came up with a possible solution for the capture method and it looks like the image above.

I think that using a really sharp edge like the one in the picture, attached to some measurement device (linear transducer or a gage) and also measuring the rotation of the lobe I can check for the displacement of my prime curve without the action of any radius. So in this way I can figure out the pure form of the profile I'm trying to copy. Of course this is done in Solidworks so the accuracy is perfect, but with a really sharp edge and assuming all the system for measuring the lobe is well done the accuracy coul be in the order of the 0.01 mm for the displacement and 0.1° for the rotational position wich is enough.

So, in this way I can easily calculate the radius compensation with a few formulas, in fact I did it yesterday and turned out to work really well. If all the setup is well on the measurement device and also on the grinder, I can (in theory) finish lobes practically equal to the one I copied with almost none error.

What do you think?

Thanks as always!

Leonardo Marsaglia.


----------



## dsage (May 21, 2014)

Hi Leonardo:
 I got a reply from Carl on the Yahoo group and I'm posting it below. I personally have no knowledge of how to solve your problem. I have asked him to join HMEM and answer you here and we'll see if he is willing. Otherwise it might be best if you joined our Yahoo group (see first post in this thread) so he can answer you directly. It's difficult for me to be to be in the middle posting on two forums. (Sage)

 Here is Carl's response:

Leonardo, at a guess you are familiar with the conventional "analog" cam grinders such as the Berco but I will mention this anyway.  They use one size master follower whose diameter is about 5% less than new grinding wheel then use the wheel until it is about 5% smaller than the follower.  That distributes the error on either side of nominal which is, as you point out 
for 20" grinding wheels, small.

Regarding your question about measuring a cam with a small diameter follower:
The methods for these kinds of problems are discussed extensively in cam design handbooks.  I can suggest Rothbart, Harold, Cams: Design, Dynamics, and Accuracy, 1956 as one source.  I'm not entirely certain about the geometry of your proposed measurement and grinding method - are you 
using an oscillating follower (rocking bar cam ) or a linear slide?  
 In any case Rothbart covers both systems p. 122ff.

 The general rules I use for reverse engineering in analog work are:
     1. The geometry of the measurement system is the same as the grinding system
     2. The radius of the grinding wheel is equal to the radius of the measuring follower. As you note, if these requirements are not met, the correction of the profile must be calculated.  In addition, if you are using an oscillating system, you may need to take into account the asymmetrical response of the follower to the cam profile - the rise and fall curves will be different due to the change in distance from the point of contact to the center of oscillation.

 I am, unfortunately, completely unfamiliar with CNC and can offer no help there.  My interest is in analog cam grinding methods and even more in the design of cam profiles.

 Carl Wilson


----------



## JohnLucas (May 21, 2014)

You are quite right in your understanding of the problem computing the grinder offset to follow the CAM.

When I developed the GCam program I could simplify the maths because the CAM is defined by 3 arcs; base, nose and flank.  Since all are arcs of a circle it is not too hard to compute the contact point with a grinding wheel of known diameter.  If you care to try the program gcam.lucasemail.org and enter some values that approximate the size of your cam and grinding wheel the last screen gives a graphical simulation where you can see the geometry at different rotations of the blank.

GCam itself will not work for you as I don't think your CAM geometry can be defined by 3 arcs.

To add to the excellent responses by Sage and others:

Using a mechanical setup with follower the same diameter as the grinding wheel automatically generates the correct grinder displacement.  Measuring the CAM geometry by using a circular gauge same diameter as the grinder will produce correct offsets for a CNC implementation.  However, neither will allow for grinder wear or generate multiple passes.

The method in your video uses a point tool.  Mathematically this is a grinder of zero (or maybe 0.001) diameter and therefor no compensation is necessary and wear is trivial.

You could, as you suggested, capture the true geometry of the sample using a point probe.  This could be automated on a CNC machine and digital probe and give you a very long list of offsets.  You might also be able to use a digital camera square-on (or scan an existing drawing) and digitally process the image to produce a graphic of the required shape.  I don't know just how this would be done or how accurate.

In any case, once you have the shape defined by a list of offsets at small angular increments it is theoretically possible to compute the required grinder offset and compensate for grinder wear.  A possible approach would be to mathematically model the CAM shape with a large number of short circular arcs that when linked up fit the required shape to some degree of accuracy.  The greater the degree of accuracy the more arcs will be needed!  This is the approach taken in GCam but we only use 3 arcs and you will need hundreds!  

This is not a problem for the amateur.  Anybody know a mathematician or computer science graduate with experience with the sort of graphics used in video games or other mathematical modelling?  Could you get some help from a local university? 

To start you will be looking for a computer program that will take the list of offsets from your probe and generate as output a list of arc segments.  A second program would take these segments and generate the offsets for a grinding wheel of known diameter.  These grinder offsets then need conversion to G code with support for multiple passes.  If it is any help the GCam program is open source and available on Github.  It supports the last two steps in this process for the 3 arcs and would need extending to any number of arcs. 

Finally, a completely different option is to first produce a graphic of the required geometry and import to a high end CAD/CAM program that will produce a tool path to mill the shape in the X-Y plane.   The resulting G code would then need conversion to polar coordinates with the appropriate axis.  I tried this out before building GCam and my well known CAD/CAM program did a deplorable job not tracking to any useful level of accuracy.  I'm guessing these programs expect to trace a large profile with a small cutter but we are doing the opposite.  In fairness, I'm using an out of date version and there are many other programs on the market.  I just put this out as an opportunity with a word of caution.

Hope this is of some help and I wish you the best of luck.


----------



## JohnLucas (May 22, 2014)

One of the advantages of retirement is to lay in bed in the morning coming up with fresh ideas; so, here is a further thought to my last post that eliminates the need for curve fitting maths:

If the sample CAM is, as suggested, examined with a digital probe then one will have a list of angles and offsets to the CAM periphery.  3,600 if probed at 0.1 degree intervals.

Image the CAM in a horizontal rotary table turned to each of these angles in succession.  At each position a program can calculate the X-Y coordinates of all the 3,600 points.  An imaginary grinding wheel (horizontal) positioned along the X axis could be moved till it just touches each of these X-Y points in turn and the offset to the centre of the wheel calculated for each (from the two triangles.)  This gives 3,600 wheel offsets.

In all but one location the grinding wheel will be gouging into the CAM.  At the point where the wheel is just touching the CAM the offset to the centre of the wheel will be at it's maximum.

What is needed is a program with two loops.  The outer loop takes each of the readings from the probe in turn.

An inner loop then computes the distance to the wheel centre when touching each point in turn and determines the maximum.

The angle from the first loop and the maximum offset from the second loop result in 3,600 coordinates to be converted to G code.  Plus support for multiple roughing passes, a finish pass and compensation for grinder wear.

This is a more practical approach because it uses simple geometry.  The downside is that since the curve is not known mathematically there is no way to determine how close the contour is followed.  With sufficient points and high accuracy in probing the original this may not be a concern.

Not difficult to implement in GCam.  Add an option that will replace the geometry screen with code to read a file of data from the probe.  An alternate, and much simpler, calculation module to run the loops and compute the grinder offsets.  Much of the rest of the program will handle definition of axis, multiple passes etc. should remain the same. 

Much easier to find a Visual Studio (Microsoft C#) developer than the high level of math skills needed to do the curve fitting.

If anyone wants to take this on I offer support and help.


----------



## lmarsaglia (May 23, 2014)

Hello John, and thank you for your detailed answer. 

I've been thinking about it and doing some calculations with the help of Solidworks for the sketches and I think the best for me, since we manufacture a lot of different camshafts is to capture it as we were discussing using a probe with a radius so small that approaches to 0. 

I have no problem in making such a device to place the different camshafts and use an enconder for the rotational position sensing, and an LVDT for the increments in displacement. Since we do make camshafts for living I'm taking this really serious. I'm thinking about using an Arduino microcontroller to control the device and adquire the data of the cams. My brother has experience with these kind of microcontrollers so it's doable.

About the machining of the profile. The video shows a lathe that's working in the normal way, with the spindle turning at a constant speed, and not using it as an axis at all. The guy who did this, made a little program (wich is easy with LinuxCNC) to trick the X axis of the lathe and add an offset at the required angle to match the profile of the part. In this case as you well said, the cutting tool could be considered as a 0 radius wheel and then there is no need for radius compensation.

Since I need to grind the cams, and since the center of the part is aligned with the center of the grinding wheel on the machine, I can easily calculate the distance between the both centers in Solidworks playing with different angles and radius. The calculations I made were based on the angle of every offset captured as I mentioned before and I can ensure a 0.0001 mm accuracy in the offset for the grinding wheel. This is more than the machine can handle since the increment for the machine I'm going to use is going to be of 0.001 mm.

I'm now working on the general calculation that I need to place inside LinuxCNC to apply the offsets to the axis of the wheel so the grinder can make the profile.

As you pointed out, using cutter compensation with G code is another option and I thought about that but it's more complicated for me since I need to add an extra servo motor for the angular axis of the part. Also, I prefer the constant speed approach and follow the position of the spindle with the encoder because it's more flexible for me.

I might have the chance to test this in the next weeks on a conventional machine that we have running steppers for positioning. It's going to be slow but it's a beggining. 

I'll be telling you if I make some progress on the matter. By now it seems pretty much doable and also seeing what Andy done with his lathe and the eccentric I'm more than convinced so I hope I can make it work soon!

Thank you guys for your support and knowledge!

Leonardo Marsaglia.


----------



## dsage (May 23, 2014)

I think you need one  of these to do your measurements 

http://adcole.com/pdf/ADL_911_r7.pdf

 Sage


----------



## carlw (May 26, 2014)

I looked at Leonardo's drawing of the knife edge follower on the cam profile and thought that while it was theoretically good, there might be metrological difficulties.  I found one source of info on measuring cams: Camshaft Reference Handbook by Don Hubbard.  Don (deceased) was the chief engineer for Crane Cams and his book is a source of info on cam measuring and much more.  It is available from several sources.  This is the link to a google search:
https://www.google.com/#q=camshaft+reference+handbook+don+hubbard

Carl


----------

