| Author |
Message |
costonjs Samba Member
Joined: August 03, 2015 Posts: 207 Location: lawrence, ks
|
Posted: Tue Sep 16, 2025 12:13 pm Post subject: cam profiles |
|
|
i did a search on this and found only one thread from 2006 where a guy did some dial indicator readings from an engle 110 cam and produced intake/exhaust profiles. he also did a stock cam for comparison purposes.
i don't want to do it that way. it's easy enough to take a photo of a cam lobe and then plot the lobe, spin the lobe in software while recording lifts @ duration. i only have 1 mild nearly stock cam which i used to build the software. here's a pic of what i'm looking for. the photo is taken straight down the centerline of the cam from about 18" away with the zoom on. i have a piece of white paper behind the lobe. good contrast helps. my camera just doesn't want to focus but it's focused enough.
i'd really like to plot the following: engle fk41, fk42, fk7
the engle W series might be nice to play with too given their popularity.
i'll look at others if anyone wants to participate.
_________________ 73 sport beetle blue 1745cc
74 sunbug grey 2016cc |
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Tue Sep 16, 2025 12:41 pm Post subject: Re: cam profiles |
|
|
I don't have those cams, but here is the raw cam lift data in 0.4 crank degree increments in excel for an FK8 & and FK10/87 that I gathered with my DIY cam doctor.
To look at it in fine detail requires running it through a smoothing algorithm due to dust specks that are unavoidable.
https://drive.google.com/file/d/16DXIar_ZQDQ8NdqR1mZR9g9MWKkdVYX-/view?usp=sharing
https://drive.google.com/file/d/1VkaRNzNsi9SBFEAUxtCzZgLPMVrhIvT9/view?usp=sharing
_________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
costonjs Samba Member
Joined: August 03, 2015 Posts: 207 Location: lawrence, ks
|
Posted: Tue Sep 16, 2025 1:13 pm Post subject: Re: cam profiles |
|
|
| Alexander_Monday wrote: |
| I don't have those cams, but here is the raw cam lift data in 0.4 crank degree increments in excel for an FK8 & and FK10/87 that I gathered with my DIY cam doctor. To look at it in fine detail requires running it through a smoothing algorithm due to dust specks that are unavoidable. |
that is an amazing device. awesome! i'll take a look at the data this evening. the white bass are starting to school up on my local impoundment and i'm heading out in a few minutes for a long afternoon/evening of fishing. _________________ 73 sport beetle blue 1745cc
74 sunbug grey 2016cc |
|
| Back to top |
|
 |
costonjs Samba Member
Joined: August 03, 2015 Posts: 207 Location: lawrence, ks
|
Posted: Thu Sep 18, 2025 1:26 pm Post subject: Re: cam profiles |
|
|
| Alexander_Monday wrote: |
| To look at it in fine detail requires running it through a smoothing algorithm due to dust specks that are unavoidable. |
the FK8 profile from data provided by "Alexander_Monday"
for AM and others if interested. the data had 8 profiles. two for each lobe. i got rid of half the data. i took the remaining data and identified centerlines for each lobe. each lobe was then shifted to a common centerline. since the cam is symmetric single pattern, i took the 4 profiles and reversed them. i then took a median of each data point giving me a single median profile instead of 8 profiles. i then got rid of excess base circle points.
the green lift line is the raw result of the median profile. the red scatter is the resulting velocity. lots of noise. i applied a couple of noise reduction functions a few times. the blue curve is the velocity from the noise reduced lift. the wavy pink curve is the acceleration from the noise reduced velocity after a bit of noise reduction to the accelerations. the data is very noisy.
the black lines are
left/right - adv. duration of 298
mid left/right - .050 duration of 258
center - centerline .382" lift _________________ 73 sport beetle blue 1745cc
74 sunbug grey 2016cc
Last edited by costonjs on Thu Sep 18, 2025 5:01 pm; edited 1 time in total |
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Thu Sep 18, 2025 1:49 pm Post subject: Re: cam profiles |
|
|
I was thinking about the noise since I posted the data.
Went to my machine and had an epiphany.
I ran a ground wire from the frame near the gear motor to the rs232 ground from the digital indicator and eliminated a lot of it.
I need to delve deeper into it with my scope.
I think I have a or some ground loops that are picking up noise from the PWM signal to the gear motor. _________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
costonjs Samba Member
Joined: August 03, 2015 Posts: 207 Location: lawrence, ks
|
Posted: Thu Sep 18, 2025 3:22 pm Post subject: Re: cam profiles |
|
|
| Alexander_Monday wrote: |
| I was thinking about the noise since I posted the data. |
i was thinking that the accel data shows a physical issue. like the entire setup is jerking every few degrees. if you want to rerun and post another sample, i'll take a look. the hard work in the spreadsheet is already done. _________________ 73 sport beetle blue 1745cc
74 sunbug grey 2016cc |
|
| Back to top |
|
 |
modok Samba Member

Joined: October 30, 2009 Posts: 27757 Location: Colorado Springs
|
Posted: Fri Sep 19, 2025 7:59 pm Post subject: Re: cam profiles |
|
|
The idea of using optics to measure a cam is a really cool idea!
And a cam doctor is a really cool idea!
But don't forget, the way I did it, worked just fine, and was probably faster too, tho it's just technical difficulties to blame and I'm sure you guys can get that worked out eventually
Alexander.... Turn the thing 90 degrees, (gravity is a handy constant, don't fight it make it work for you) and put it in vee blocks not round bores. |
|
| Back to top |
|
 |
mikedjames Samba Member

Joined: July 02, 2012 Posts: 3477 Location: Hamble, Hampshire, UK
|
Posted: Sat Sep 20, 2025 11:47 pm Post subject: Re: cam profiles |
|
|
Do you have to spin the cam at speed to get measurements? Looks to me like a stepper motor drive might be more appropriate.. Move the cam to position, hold it, average measurements, move. Acceleration can be derived from differences in sufficiently accurate positions.
Or if it has to be moving, synchronise the ADC doing the sampling with a brushless motors driver pulses.
After all it is not like a distributor where it has to be moving at the correct speed to get the cam lobes in the correct centrifugal advance/friction pad dragging derived relative positions. _________________ Ancient vehicles and vessels
1974 VW T2 : Devon Eurovette camper with 1641 DP T1 engine, Progressive carb, full flow oil cooler, EDIS crank timed ignition.
Engine 1: 40k miles (rocker shaft clip fell off), Engine 2: 30k miles (rebuild, dropped valve). Engine 3: a JK Preservation Parts "new" engine, aluminium case: 26k miles: new top end.
Gearbox rebuild 2021 by Bears.
1979 Westerly GK24 24 foot racer/cruiser yacht Forethought of Gosport.
1973 wooden Pacer sailing dinghy |
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Mon Sep 22, 2025 6:49 am Post subject: Re: cam profiles |
|
|
I have some stuff I can cobble together and use a closed loop stepper motor.
And I will redesign to measure from above instead of the side.
Biggest drawbacks to what I have available are that the dial indicator readings via RS232 are not very fast (relative to what it could be if a different communication standard was used) and the older microcontroller I am using has limited RAM to store the results from the 6000p encoder I am currently using.
I am very familiar with programming in the 4D Systems micro but might need to use one of the spare PI's I have and learn more Python the hard way or use a computer and brush up on Visual Basic in Visual Studio.
Having initially learned programming in Fortran, PL1, Cobol, and IBM370 assembler, object-oriented programming and classes just don't come naturally for me. _________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
modok Samba Member

Joined: October 30, 2009 Posts: 27757 Location: Colorado Springs
|
Posted: Mon Sep 22, 2025 9:12 pm Post subject: Re: cam profiles |
|
|
COOL!
Keep us updated  |
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Sat Sep 27, 2025 8:21 pm Post subject: Re: cam profiles |
|
|
Got the frame converted with the dial indicator vertical and the stepper motor.
Still using cam bearings in 3D printed stands since I am using a belt drive and it would pull the cam out of alaignment with v blocks.
Why belt drive?
Because stepper motors are usually either 200 or 400 steps per revolution.
Even with microstepping there is not a way to land on exactly 0.1 degree increments which is what I want.
But with a 16 tooth pulley on the stepper and 36 tooth on the cam and 1/8 microstepping you can.
200 step per 360 degrees = 1.8 degrees per step.
(1.8 degrees × (16 / 36)) / 8 = 0.1 degrees.
At the end of the video watch what happens when I remove the ground jumper between the dial indicator RS232 ground and the frame.
That is the noise I was getting.
Now to do a little hardware modification since I don't need to read an encoder or control a DC motor, just either send UART commands to the closed loop stepper or simple step pulses and direction.
Link
_________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Tue Dec 09, 2025 9:32 pm Post subject: Re: cam profiles |
|
|
Software is in beta and I am adding features constantly.
I greatly improved stability of the readings with the latest version.
I also spent many hours researching digital data filtering and had to brush up on calculus and matrix math.
Link
[/youtube] _________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
costonjs Samba Member
Joined: August 03, 2015 Posts: 207 Location: lawrence, ks
|
Posted: Wed Dec 10, 2025 5:50 am Post subject: Re: cam profiles |
|
|
| Alexander_Monday wrote: |
| Software is in beta and I am adding features constantly. |
i haven't abandoned things on my side either. got busy with other projects but before that i was able to get a lot of curve smoothing with my original data which was no where near as smooth as that data dumped by your rig. i got stuck with a kink in the acceleration curve at about 20 degrees before peak lift. the acceleration should be smoothly heading towards peak negative accel at peak lift but my software isn't getting that part correct. i focused on reducing jerk first which helped me to get most of the noise out of the data. only took me so far though. at some point i may try to fit a polynomial and that will lead to linear equations just as you're doing. _________________ 73 sport beetle blue 1745cc
74 sunbug grey 2016cc |
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Wed Dec 10, 2025 7:16 am Post subject: Re: cam profiles |
|
|
If you are using Visual Studio NET Framework or Core you can NuGet a free package called MathNet.Numerics.
It has a function called Fit.Polynomial in the form of Double[] Polynomial(Double[] x, Double[] y, int order, DirectRegressionMethod method).
It does a Least-Squares fitting of the points in an x data array and a y data array to a k-order polynomial y : x -> p0 + p1*x + p2*x^2 +... + pk*x^k, returning its best fitting parameters as [p0, p1, p2,..., pk] array.
That part does the heavy lifting of finding the coefficients like an excel polynomial trend line does, but does not apply them back to the input.
So pick an odd number of data points as a window at least 1 data point higher than the number of coefficients you want and it will return the coefficients.
Then apply the x data point in the middle of the odd numbered window to the coefficients to get the y point that best fits the coefficients curve and put that in the result array.
Rinse and repeat for each data point moving the window 1 data point forward.
I added data points at the beginning from the end and the end from the beginning in the amount of (number of window points - 1) / 2 so I would have a valid set of points for each end of the original data set.
(basically making it circular for the amount I needed)
I am still experimenting with the window size and number of coefficients.
A larger window acts like a low pass filter and a narrower window acts like a high pass filter.
So far doing 3 consecutive passes with windows = 29 => 11 => 5 using 6 => 4 => 3 polynomial coefficients seems to work pretty good.
There is a weighted version Fit.PolynomialWeighted(xData, yData, weighted array, degree) that you can use Savitsky-Golay weights (or any that you make into an array) that I am tinkering with.
There is also a MathNet.Filtering package that includes a Butterworth filter which might be useful but I haven't played with it yet.
If you are using NET Core the package SignalSharp has a Savitsky-Golay filter, but I either am using it wrong or it does not give very good results. _________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Thu Dec 11, 2025 3:33 pm Post subject: Re: cam profiles |
|
|
Well then, there is a much simpler way to get a Least-Squares fitting in Math.Net.Numberics than I was doing
This function will return the fitted point without having to know the coefficients or do the math with them:
| Code: |
| Func<double, double> PolynomialFunc(Double[] x, Double[] y, int order, DirectRegressionMethod method) |
Here is a generic example in VB from AI:
| Code: |
Imports MathNet.Numerics
Imports System
Imports System.Linq
Public Class PolynomialFitter
Public Shared Sub RunPolynomialFit()
' 1. Define your input data points (x and y arrays)
Dim xDataArr As Double() = {1.0, 2.0, 3.0, 4.0, 5.0}
Dim yDataArr As Double() = {1.1, 2.3, 4.0, 6.5, 10.0}
' 2. Define the order (degree) of the polynomial to fit (e.g., 2 for a quadratic fit)
Dim order As Integer = 2
' 3. Perform the polynomial fit using Fit.PolynomialFunc
' The result is a function that takes an x value and returns the fitted y value
Dim fittedFunction As Func(Of Double, Double) = Fit.PolynomialFunc(xDataArr, yDataArr, order)
' 4. Use the fitted function to evaluate points or generate a fitted curve
Console.WriteLine($"Fitted polynomial function (order {order}):")
For Each x As Double In xDataArr
Dim actualY As Double = yDataArr(Array.IndexOf(xDataArr, x))
Dim predictedY As Double = fittedFunction(x)
Console.WriteLine($"x = {x}, Actual y = {actualY:F2}, Predicted y = {predictedY:F2}")
Next
' Example of predicting a new value
Dim newValueX As Double = 6.0
Dim predictedNewY As Double = fittedFunction(newValueX)
Console.WriteLine($"\nPrediction for x = {newValueX}: y = {predictedNewY:F2}")
End Sub
End Class |
_________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Fri Dec 12, 2025 6:57 pm Post subject: Re: cam profiles |
|
|
_________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
costonjs Samba Member
Joined: August 03, 2015 Posts: 207 Location: lawrence, ks
|
Posted: Tue Dec 16, 2025 1:13 pm Post subject: Re: cam profiles |
|
|
i notice how smooth the jerk curve is. i can't quite get my curve to that point. i'm starting with more noise though. this optical method is tough. i'll keep at it. _________________ 73 sport beetle blue 1745cc
74 sunbug grey 2016cc |
|
| Back to top |
|
 |
Alexander_Monday Samba Member

Joined: November 09, 2007 Posts: 457 Location: Springfield Missouri
|
Posted: Tue Dec 16, 2025 1:35 pm Post subject: Re: cam profiles |
|
|
If it helps any, here is the function I use as a filter.
I run the lift through it 3 times, 1st with 29, 2nd with 11, and 3rd with 5.
Then I calculate the velocity by subtracting the lift 2 crank (1 cam) degree before the lift point from the lift 2 crank (1 cam) degree ahead and divide that result by 2 to get the average velocity at the lift point.
Then I run the velocity through the filter the same as the lift.
Rinse and repeat for acceleration and jerk.
I went to this filter which has the matrix coefficients and divisor for the Savitzky-Golay filter for 29, 11, and 5 points to avoid the computational power required to implement the filter as a polynomial for any number of points.
| Code: |
Private Function SavitzkyFliter(ByVal unFiltered As Double(), ByVal points_5_11_29 As Integer) As Double()
Dim lastElement As Integer = UBound(unFiltered)
Dim filtered() As Double
Dim array() As Double
Dim divisor As Double
Dim emptyPoints As Integer = points_5_11_29 - 1
Dim halfEmptyPoints As Integer = emptyPoints / 2
Select Case points_5_11_29
Case 5
array = {-3, 12, 17, 12, -3} 'These are the multipliers for each data point with the middle being the number we are smoothing
divisor = 35 'Add all the multiplied values together and divide by the sum of the multipliers
Case 11
array = {-36, 9, 44, 69, 84, 89, 84, 69, 44, 9, -36}
divisor = 429
Case 29
array = {-351, -216, -91, 24, 129, 224, 309, 384, 449, 504, 549, 584, 609, 624, 629, 624, 609, 584, 549, 504, 449, 384, 309, 224, 129, 24, -91, -216, -351}
divisor = 8091
Case Else
msgResponse = MsgBox("Number Of Points Must Be 5, 11, or 29", vbOKOnly)
Return {}
End Select
ReDim filtered(lastElement) 'Make filtered have the same number of points as the dimension we want in measure
Dim temp() As Double = unFiltered
ReDim unFiltered(lastElement + emptyPoints)
Dim tempStart(halfEmptyPoints - 1)
System.Array.Copy(temp, 0, tempStart, 0, halfEmptyPoints)
Dim tempEnd(halfEmptyPoints - 1)
System.Array.Copy(temp, lastElement - halfEmptyPoints + 1, tempEnd, 0, halfEmptyPoints)
System.Array.Copy(temp, 0, unFiltered, halfEmptyPoints, lastElement + 1)
System.Array.Copy(tempStart, 0, unFiltered, lastElement + emptyPoints - halfEmptyPoints + 1, halfEmptyPoints)
System.Array.Copy(tempEnd, 0, unFiltered, 0, halfEmptyPoints)
lastElement = unFiltered.Length - 1 'To simplify the loop since we are working on unfiltered with the added data points
For i As Integer = 0 To filtered.Length - 1 'This is where the original data points are located
For j As Integer = 0 To points_5_11_29 - 1 'The number of times necessary for multiplication
filtered(i) += array(j) * unFiltered(j + i) 'Multiply each factor in the matrix by the appropriate data point
Next
filtered(i) /= divisor 'Now that we have a sum of all the multiplications we need to divide by the sum of the multipliers
Next
Dim max As Double = filtered.Max
Return filtered
End Function |
_________________ Danth’s or Parker’s Law:
“If you have to insist that you've won an internet argument, you've probably lost badly.”
Alexander_Monday->What were the rings gapped at?
bedlamite->Almost enough.
| andk5591 wrote: |
The original german engineers have attained sainthood and it is impossible to improve perfection.
Anything that anyone does to deviate from the original designs will be made to wrench on 20 year old Yugos with Harbor Freight tools in hell. |
|
|
| Back to top |
|
 |
|