Planetary Gear gadget

This forum is for users to submit their own gadgets to the community
Post Reply
tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Planetary Gear gadget

Post by tkern »

Here is a gadget to calculate and display different planetary gear configurations for a
given gear reduction and project diameter,which would be the diameter of the profile cut for
the ring gear.

The Sun is the driven gear and the three planets the output with the ring stationary.

Instead of a dialogue box for input the user directly edits the Planetary_Gear.lua file.
Here are the first lines:

-- VECTRIC LUA SCRIPT
require "strict"

--uncomment one task
-- task = "design"
task = "view"

--Directory must exist but not file. File will be overwritten if exists.
results_file = "c:\\temp\\results.csv"

--Diameter bores for sun,planet
sun_bore = 0.25
planet_bore = 0.25

--maximum diameter of project
ring_profile_diameter = 8

--how far in on each side from ring_profile_diameter
ring_pitch_diameter = ring_profile_diameter - 0.5 *2

gear_reduction = 10

sun_teeth_num_sel = {6, 8, 10, 12}

Pressure_Angle_sel = {10, 14.5, 20 ,25}

Addendum_Factor_sel = {1, 0.9, 0.8, 0.5}

Backlash_Allowance_sel = {0.002, 0.004}


-- This is the copy of the results_file produced when task = "design"
-- The last uncommented line will be displayed.
-- The ,0 is placeholder for proper display in Excel.

--view = {excel, sun teeth, planet teeth, ring teeth, DiaPitch....
--view = {0, 6, 24, 54, 7.7142857142857, 14.5, 0.5, 0.002, 0.25....
--view = {0, 6, 24, 54, 7.7142857142857, 14.5, 0.5, 0.004, 0.25....
.
.

When task = "design" the user can change any input or the number of inputs in the _sel.
A message box will appear when the calculations are complete. All or some of the results
can then be pasted to replace the current --view ={.....

Not all combinations may be listed because some may produce too narrow a tooth.

When task = "view" the last uncommented line will be used to display the gears. The Vectric
rotate tool can then be used to see how gears mesh.
Attachments
Planetary_Gear.zip
(6.87 KiB) Downloaded 129 times

tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Re: Planetary Gear gadget

Post by tkern »

Arranged columns so have better display.

Added input bit_greater_than = your-value so return gears than can be
cut with bits larger than your value.
Attachments
Planetary_Gear.zip
(6.31 KiB) Downloaded 93 times

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Planetary Gear gadget

Post by adze_cnc »

One thing might be of use in the future when posting code in a message is this button:
 
code fence.png
 
Which encloses code in a "code fence" such as this:

Code: Select all

5 REM ON VALUE GOTO line1,line2,line3.. demo
10 TEXT : HOME
20 INPUT "Enter number 1,2 or 3: ";A
30 IF NOT(A=1 OR A=2 OR A=3) GOTO 10
40 ON A GOTO 100,200,300
100 PRINT "line 100" : GOTO 500
200 PRINT "line 200" : GOTO 500
300 PRINT "line 300" : GOTO 500
500 END

tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Re: Planetary Gear gadget

Post by tkern »

Code: Select all

Thanks

tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Re: Planetary Gear gadget

Post by tkern »

I am not sure if any other calculations are needed for the sun gear, three planet gears and
ring gear to work together.

tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Re: Planetary Gear gadget

Post by tkern »

Here is a reference to Constraints on number of teeth and planets https://woodgears.ca/gear/planetary.html

tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Re: Planetary Gear gadget

Post by tkern »

Displays all planets evenly spaced. Works OK if sun gear multiple of 3.
Will need to adjust sun angle to see how gears mesh if sun gear not equal 6.
Attachments
Planetary_Gear.zip
(6.22 KiB) Downloaded 80 times

tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Re: Planetary Gear gadget

Post by tkern »

Sun gear should now mesh for sun teeth in multiples of 3.

Here is one way to derive formula for sun rotation given number of
sun teeth:
Since 30 is our magic number from 360/3 - 90 = 30 and 30 degrees worked
for ring rotation. For 6 teeth sun no rotation was needed so we need a formula
with 6 and 30 as inputs and 0 as output. 30 - 360/6 /2=0
So formula for degree sun rotation is degrees = 30-180/sun_teeth.
Worked for sun teeth = 6,9,12
Attachments
Planetary_Gear.zip
(6.21 KiB) Downloaded 91 times

tkern
Posts: 24
Joined: Fri Mar 25, 2022 3:35 pm
Model of CNC Machine: cncest

Re: Planetary Gear gadget

Post by tkern »

Added dialogues so no need to edit source.

First dialogue user selects design or view.

If select design the user enters design values. The values are stored
in ini.txt in gadget folder so registry is not used.
The results are also stored in gadget folder.

If select view the display selection button displays the selected gear
from the drop down list and keeps the dialogue open so more gears can be displayed.
The OK button displays the selected gear from the drop down list and
closes the dialogue.
Attachments
Planetary_Gear.zip
(8.12 KiB) Downloaded 125 times

Post Reply