Often a single stage gear train cannot reach the desired RPM rate that is required, so multi stage gear trains must be used. However, when dealing with multiple stages in a gear box, finding the right combination of gears to reach a desired RPM output can be tricky. Often it requires a trial and error approach that can become time consuming, especially when considering a large number of gears to select from.
To remedy this problem, I have created a gear selection algorithm in Python that will allow the user to input a desired output RPM or range of RPMs and return all combinations of gears that satisfy the specifications. It will take into account each type of vex motor internal gearing as the initial speed, and can consider gear trains consisting of only gears, sprockets, or both. Additionally it gives the user the ability to exclude gear sizes from the computation or add custom sized gears.
The program and source code can be found on GitHub at: https://github.com/DemonicYoshi/Gear-Selection
An example run would be as follows:
Desired RPM: 280
Max number of stages: 2
RPM Tolerance: 5
Vex Motor ratios? (‘393’ or ‘V5’): v5
Press ‘S’ for sprockets, ‘G’ for gears, or ‘C’ for combination: c
Gears or sprockets to exclude (input teeth number, enter to continue): 84
Is this a gear or sprocket? (press ‘g’ or ‘s’):g
Gears or sprockets to exclude (input teeth number, enter to continue):
Custom size gears or sprockets (input teeth number, enter to continue):
Torque
Motor ratio: 1.0
Percent complete: X X X X X X X X X X
277.78: [60, 36, 60, 36]
277.78: [60, 36, 30, 18]
277.78: [30, 18, 60, 36]
277.78: [30, 18, 30, 18]
Speed
Motor ratio: 2.0
Percent complete: X X X X X X X X X X
No matching combinations within tolerance
Turbo
Motor ratio: 6.0
Percent complete: X X X X X X X X X X
No matching combinations within tolerance
In this example, a desired output of 280 RPM was desired, and due to space constraints the 84 tooth gear was decided to be omitted. By running the program, it was found that a 100 rpm motor cartridge must be used, and the closest achievable RPM output is approximately 278 rpm.