Page 1 of 4 1234 LastLast
Results 1 to 12 of 46

Thread: Simple Harmonic Motion/Accelerating Pitch

  1. #1
    Registered
    Join Date
    May 2011
    Location
    United Kingdom
    Posts
    53
    Downloads
    0
    Uploads
    0

    Simple Harmonic Motion/Accelerating Pitch

    Hi there, got a project I am working on at the moment, it requires me to manufacture a Timing Spiral on a 4th axis. The Spiral needs to have an accelerating pitch and has been specified as Simple Harmonic Motion.

    Does anyone know what this means? from the investigations I have done so far I think it means the acceleration of the pitch needs to be "smooth"

    I am thinking of writing a program that produces an incremental increase in the X axis for every 1 degree of angular rotation on the 4th axis.

    For example, I need a pitch acceleration from 100mm to 125mm over 360 deg. Anyone any ideas of how to work it out?

    Thanks


  2. #2
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1135
    Downloads
    0
    Uploads
    0
    Is this a different project to the bottle screws?

    Here is some code in increments of 10deg. over 112.5mm. Can supply increments of 1 deg if this is what you require.

    G90 G01 X0 Y0 Z??
    X2.8002 A10
    X5.6177 A20
    X8.4526 A30
    X11.305 A40
    X14.175 A50
    X17.0628 A60
    X19.9683 A70
    X22.8918 A80
    X25.8333 A90
    X28.793 A100
    X31.771 A110
    X34.7673 A120
    X37.7821 A130
    X40.8156 A140
    X43.8678 A150
    X46.9388 A160
    X50.0287 A170
    X53.1378 A180
    X56.266 A190
    X59.4136 A200
    X62.5805 A210
    X65.7671 A220
    X68.9733 A230
    X72.1992 A240
    X75.4451 A250
    X78.7111 A260
    X81.9972 A270
    X85.3035 A280
    X88.6303 A290
    X91.9777 A300
    X95.3456 A310
    X98.7344 A320
    X102.1441 A330
    X105.5749 A340
    X109.0268 A350
    X112.5 A360

    BTW. I have corrected an error and modified the program I provided for your other post.
    Last edited by Kiwi; 06-27-2011 at 04:41 AM.


  3. #3
    Registered
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    11985
    Downloads
    0
    Uploads
    0
    You should Google Simple Harmonic Motion. It is a sine wave dependent type of motion. For instance if you have a pin on a wheel engaging in a slot on a bar that can slide every rotation pushes the bar forward then back and the motion of the bar is simple harmonic motion. I think this is called a Scotch Yoke but my memory may be faulty. As the wheel rotates the bar accelerates up to a maximum speed at the point where the pin is 90 degrees to the motion of the bar, then deccelerates to zero at the 180 degree point when the bar is at its maximum travel and then returns. The variation in speed of the bar plotted against the rotation of the wheel is a sine curve. A regular connecting rod moves a piston in a very close approximation to simple harmonic motion with the slight difference being caused by the fact that the connecting rod does not remain parallel to the motion of the piston through the entire cycle. The longer the rod the less the difference.

    The way I would interpret your accelerating pitch spiral is that the change in pitch should start and end on a sine curve. This is opposed to my suggestions and example in your other thread where I had a constant pitch section then a (stepwise) increasing pitch section followed by constant pitcj again. Plotting my acceleration against the length of the spiral would give a flat line followed by a constant slope then another flat line.

    What you need is a sine wave so your X increments have to vary in a sine wave fashion and I have to admit right at the moment I cannot dream up a math expression to do this.

    As a side comment I will say this SHM spiral would have been fairly simple to cut in the old days of fully mechanical shape generation. To do this the X motion would be driven by a gear/crank/connecting rod or scotch yoke mechanism from the rotation of the spiral.

    And now I am going to curse you because I will be thinking about this all through my golf game this morning. Just like I did last Monday about your other thread. Mind you I had a good game so maybe the distraction helps prevent me over-thinking my golf stroke and screwing things up.


    EDIT:
    Yes it is a Scotch Yoke, I just Googled. Have a look at this: http://en.wikipedia.org/wiki/Scotch_yoke
    An open mind is a virtue...so long as all the common sense has not leaked out.


  4. #4
    Registered
    Join Date
    May 2011
    Location
    United Kingdom
    Posts
    53
    Downloads
    0
    Uploads
    0
    Thanks again guys, really appreciate the responses. To be honest, at the moment, I don't think my maths skills are up to the challenge so been thinking about paying for a couple of hours private tuition to get things fixed once and for all. I know that there is going to be variations of this component over the coming year, some of them are fairly straight forward, an angular rotation plotted against an incremental X movement on the drawing (these are obviously not SHM) but some will require me to produce a program when all I am given is the change in pitch over a length and within a certain number of degrees, using SHM. If I can get a formula for this I will be a happy bunny!

    @ kiwi, did you use your "generator" to produce this code?

    @Geof, hope the golf game went ok, at least you got someone to blame if it didn't


  • #5
    Registered
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    11985
    Downloads
    0
    Uploads
    0
    Getting the tutoring is a good idea. I did think about it while I was playing. Incidentally I had a great game. I am a novice having first swung a golf club on April 20th 2009 and I am totally non-competitive. I play with a friend and we get great laughs out of the horrible strokes we pull off. Anyway back to the math. It will be something like dividing the X distance into 180 increments, doing the calculation for X = X + something, then multiplying X by the sine of the incrment value. You should be able to find someone to help you develop a macro that will just need the start pitch, end pitch, the total length and the number of increments plugged in.
    An open mind is a virtue...so long as all the common sense has not leaked out.


  • #6
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1135
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by pbd1971 View Post
    @ kiwi, did you use your "generator" to produce this code?
    Yes, but after reading Geof's reply it looks like the path should return back to the start.
    I now think you need a path which is a circle rotated/tipped so the ellipse view is 25mm wide for 100mm pitch.
    Here is some code in increments of 10 for 180deg with the pitch starting at zero to 100 and back to zero.
    The second 180deg needs the X decreasing the same values.
    G90 G01 X0 Y0 Z37.5
    X0.601 A10
    X1.3222 A20
    X2.1876 A30
    X3.2261 A40
    X4.4724 A50
    X5.9678 A60
    X7.7624 A70
    X9.9158 A80
    X12.5 A90
    X15.3876 A100
    X17.6976 A110
    X19.5456 A120
    X21.0241 A130
    X22.2068 A140
    X23.153 A150
    X23.91 A160
    X24.5155 A170
    X25 A180


  • #7
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1135
    Downloads
    0
    Uploads
    0
    I've had a bit more of a play and produced some code which I think is 'Simple Harmonic Motion' with a pitch of 100mm
    This is a single plane circle in increments of 10deg.

    G90 G01
    X0 A0
    X0.3798 A10
    X1.5077 A20
    X3.3494 A30
    X5.8489 A40
    X8.9303 A50
    X12.5 A60
    X16.4495 A70
    X20.6588 A80
    X25 A90
    X29.3412 A100
    X33.5505 A110
    X37.5 A120
    X41.0697 A130
    X44.1511 A140
    X46.6506 A150
    X48.4923 A160
    X49.6202 A170
    X50 A180
    X49.6202 A190
    X48.4923 A200
    X46.6506 A210
    X44.1511 A220
    X41.0697 A230
    X37.5 A240
    X33.5505 A250
    X29.3412 A260
    X25 A270
    X20.6588 A280
    X16.4495 A290
    X12.5 A300
    X8.9303 A310
    X5.8489 A320
    X3.3494 A330
    X1.5077 A340
    X0.3798 A350
    X0 A360

    This is the XYZ code for the above.

    G90 G01
    X0 Y0 Z35.3553
    X0.3798 Y-4.3412 Z34.8182
    X1.5077 Y-8.5505 Z33.2232
    X3.3494 Y-12.5 Z30.6186
    X5.8489 Y-16.0697 Z27.0838
    X8.9303 Y-19.1511 Z22.726
    X12.5 Y-21.6506 Z17.6777
    X16.4495 Y-23.4923 Z12.0922
    X20.6588 Y-24.6202 Z6.1394
    X25 Y-25 Z0
    X29.3412 Y-24.6202 Z-6.1394
    X33.5505 Y-23.4923 Z-12.0922
    X37.5 Y-21.6506 Z-17.6777
    X41.0697 Y-19.1511 Z-22.726
    X44.1511 Y-16.0697 Z-27.0838
    X46.6506 Y-12.5 Z-30.6186
    X48.4923 Y-8.5505 Z-33.2232
    X49.6202 Y-4.3412 Z-34.8182
    X50 Y0 Z-35.3553
    X49.6202 Y4.3412 Z-34.8182
    X48.4923 Y8.5505 Z-33.2232
    X46.6506 Y12.5 Z-30.6186
    X44.1511 Y16.0697 Z-27.0838
    X41.0697 Y19.1511 Z-22.726
    X37.5 Y21.6506 Z-17.6777
    X33.5505 Y23.4923 Z-12.0922
    X29.3412 Y24.6202 Z-6.1394
    X25 Y25 Z0
    X20.6588 Y24.6202 Z6.1394
    X16.4495 Y23.4923 Z12.0922
    X12.5 Y21.6506 Z17.6777
    X8.9303 Y19.1511 Z22.726
    X5.8489 Y16.0697 Z27.0838
    X3.3494 Y12.5 Z30.6186
    X1.5077 Y8.5505 Z33.2232
    X0.3798 Y4.3412 Z34.8182
    X0 Y0 Z35.3553

    My other code was 0 to 100mm pitch following the path of a helix.
    Last edited by Kiwi; 06-28-2011 at 05:19 PM. Reason: Replaced code because pitch not correct.


  • #8
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1135
    Downloads
    0
    Uploads
    0
    I'm now thinking that the circle should be true-round looking along the X axis.
    I still think the XA code is right.

    #Addition, Updated code
    G90 G01
    X0 Y0 Z35.3553
    X0.3798 Y-6.1394 Z34.8182
    X1.5077 Y-12.0922 Z33.2232
    X3.3494 Y-17.6777 Z30.6186
    X5.8489 Y-22.726 Z27.0838
    X8.9303 Y-27.0838 Z22.726
    X12.5 Y-30.6186 Z17.6777
    X16.4495 Y-33.2232 Z12.0922
    X20.6588 Y-34.8182 Z6.1394
    X25 Y-35.3553 Z0
    X29.3412 Y-34.8182 Z-6.1394
    X33.5505 Y-33.2232 Z-12.0922
    X37.5 Y-30.6186 Z-17.6777
    X41.0697 Y-27.0838 Z-22.726
    X44.1511 Y-22.726 Z-27.0838
    X46.6506 Y-17.6777 Z-30.6186
    X48.4923 Y-12.0922 Z-33.2232
    X49.6202 Y-6.1394 Z-34.8182
    X50 Y0 Z-35.3553
    X49.6202 Y6.1394 Z-34.8182
    X48.4923 Y12.0922 Z-33.2232
    X46.6506 Y17.6777 Z-30.6186
    X44.1511 Y22.726 Z-27.0838
    X41.0697 Y27.0838 Z-22.726
    X37.5 Y30.6186 Z-17.6777
    X33.5505 Y33.2232 Z-12.0922
    X29.3412 Y34.8182 Z-6.1394
    X25 Y35.3553 Z0
    X20.6588 Y34.8182 Z6.1394
    X16.4495 Y33.2232 Z12.0922
    X12.5 Y30.6186 Z17.6777
    X8.9303 Y27.0838 Z22.726
    X5.8489 Y22.726 Z27.0838
    X3.3494 Y17.6777 Z30.6186
    X1.5077 Y12.0922 Z33.2232
    X0.3798 Y6.1394 Z34.8182
    X0 Y0 Z35.3553
    Last edited by Kiwi; 06-28-2011 at 09:25 PM. Reason: Added updated code.


  • #9
    Registered
    Join Date
    May 2007
    Location
    US
    Posts
    779
    Downloads
    0
    Uploads
    0
    Here is my take.
    Assuming you have macro B on the machine.
    The following is a hacked up version of the code I have used to make an ellipse.
    Basicly just replaced the Y value with the A at the current angle.
    Back plot in NCPlot is just a line but when animated you can see it speeding up and slowing down as it should.
    The step angle can be made as small as needed for the finish but very small values will slow down the machine.


    Code:
    (CHANGE AS NEEDED)
    (CHANGE AS NEEDED)
    #100= 2    (RADIUS)
    #101= 1.0  (Y SCALE, 1.0 FOR A CIRCLE)
               (OTHER VALUES MAKE AN ELLIPSE)
    #102= 1    (STEP ANGLE)
    (----------------------)
    
    
    #103= 0    (CURRENT ANGLE)
    G1X[#100*COS[0]]Y[#101*#100*SIN[0]]
    
    WHILE [#103 LT 360] DO1
    (USE THE FOLLOWING LINE TO DO A CIRLE IN X,Y PLANE)
    (G1X[#100*COS[#103]]Y[#101*#100*SIN[#103]]F10.0)
    (OR)
    (USE THE FOLLOWING LINE TO DO THE SIMPLE HARMONIC MOTION)
    G1X[#100*COS[#103]] A[#103]F10.0
    
    #103=#103+#102
    END1
    (G1X[#100*COS[360]]Y[#101*#100*SIN[360]])
    G1X[#100*COS[#103]] A[#103]F10.0
    G0X0.0Y0.0
    Last edited by Andre' B; 06-29-2011 at 09:50 AM. Reason: Fixed the final move.


  • #10
    Registered
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    11985
    Downloads
    0
    Uploads
    0
    I think I have created confusion by mentioning crank pin rotation and 180 degrees with inadequate explanation. So I will try to be adequate based on what seems to me to be the way in which Simple Harmonic Motion could apply to the change in pitch. And I hope I am not totally out to lunch in all this.

    It is not the motion along the screw that is Simple Harmonic Motion. The SHM refers to the way in which the change in pitch occurs. Changing the pitch from 4tpi to 5tpi over the length is fairly simple in a linear manner and how smooth it is depends on how many steps are used but the change between each step is the same. If it is changed in 100 steps then the first step is 4.01tpi, then 4.02tpi, etc. If a graph is drawn for the change in pitch versus distance along the screw it would be a straight line and the rate at which the pitch is changing is constant all the way. Note this is the change in pitch between each step, not the actual pitch at each step.

    For the rate of change to act in Simple Harmonic Motion it has to start out very slowly and gradually increase to a maximum at the mid point then reduce again to fade away at the end. If this change in pitch is drawn on a graph it will be a line that starts out almost flat, curves up and over a peak and then curves back down to flat again at the end. The curve in this graph is related to a sine curve, it is not just a combination of simple circular, constant radius, curves. Note I say it is "related", the actual shape of the curve is the sine curve squared.

    To get the changes in pitch at each step for this curve it is necessary to multiply the average change, that is the .01 per step for 100 steps by a number that is obtained from the sine of an angle. This is where a rotation of 180 degrees comes, it is just a calculation tool and 180 degrees is used because the sine of an angle is zero at zero degrees, reaches a maximum of 1 at 90 degrees and then goes back to zero at 180 degrees. When 100 steps are used each step corresponds to 1.8 degrees so part of the calculation for the first step is:

    sin1.8 = 0.03141

    0.03141^2 = 0.00099

    0.00099 x 0.01 = 0.0000099

    At the 25th step the corresponding angle is 45 degrees which gives 0.7071^2 x 0.01 = 0.005

    The 50th step is 90 degrees which gives 1^2 x 0.01 = 0.01

    75 steps is 135 degrees which is the same as 45 degrees at 0.005

    But there is a complication/fault in this calculation. The result obtained for the SHM rate of change never goes above 0.01 so the average rate of change will be less than 0.01 per step. There has to be a correction factor which I think would be 2. This would make the change at the first step 2 x 0.0000099 = 0.00002 (close enough). At the 25th step mark it would be 0.01 and midway at 50 steps it would be 0.02.

    And this is as far as I can go. I don't know how to set this type of calculation up into a macro so that you can just enter the starting tpi, the finish tpi, the total length to be covered during the change and the number of steps in the change.

    Now I will go back to playing golf. It hurts my head less.


    EDIT I did make a mistake in calculating the size of the steps. The change in pitch is from 4tpi to 5tpi which is 1 inch. Divide this into 100 steps and the step size is 0.01 and I had used 0.05. I have corrected the numbers above.
    Last edited by Geof; 06-29-2011 at 07:14 PM.
    An open mind is a virtue...so long as all the common sense has not leaked out.


  • #11
    Registered
    Join Date
    May 2011
    Location
    United Kingdom
    Posts
    53
    Downloads
    0
    Uploads
    0
    This is getting more in depth than I anticipated I am just in the process of getting my new printer/scanner up and running. Once I finish this, I will attempt to upload the drawing which should make things clearer.........picture painting a thousand words and all that

    But thanks to everyone for the help so far, really appreciate it.


  • #12
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1135
    Downloads
    0
    Uploads
    0
    Do these pictures show what is required?
    The slot around the cylinder is like an ellipse on a single plane.
    When flattened the slot forms the shape of sine wave.
    Attached Thumbnails Attached Thumbnails Simple Harmonic Motion/Accelerating Pitch-single_plane1.jpg   Simple Harmonic Motion/Accelerating Pitch-single_plane2.jpg  


  • Page 1 of 4 1234 LastLast

    Similar Threads

    1. How do I machine an Accelerating Pitched Scroll?
      By pbd1971 in forum Haas Mills
      Replies: 18
      Last Post: 06-26-2011, 05:23 AM
    2. Newbie- Need ideas for simple 1 axis cnc motion rig
      By Cao314159 in forum DIY CNC Router Table Machines
      Replies: 3
      Last Post: 03-27-2011, 05:17 AM
    3. Is this a harmonic drive?
      By HereinCS in forum DIY CNC Router Table Machines
      Replies: 4
      Last Post: 02-14-2011, 02:06 PM
    4. need help harmonic drver
      By turbopop2001 in forum General Electronics Discussion
      Replies: 0
      Last Post: 02-05-2006, 08:30 PM
    5. Harmonic Drive
      By juzwuz in forum Mechanical Calculations/Engineering Design
      Replies: 13
      Last Post: 12-03-2005, 02:28 AM

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.