Skip to content

A tool for optimizing spiral torsion springs, intended for but not limited to 3D-printing.

License

Notifications You must be signed in to change notification settings

Zbuser93/SpiralTorsionSpringOptimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spiral Torsion Spring Optimizer

For the fully-functional spreadsheet-based version of this project, see the page on Printables.

Introduction

A spiral torsion spring (STS) is a spring that occupies a cylindrical volume and has an angular range of motion (ROM) around the center axis of that cylinder. In this project I use the term "height" to refer to the dimension of the spring that is parallel with the cylinder center axis, and the term "thickness" to refer to the dimension that runs perpendicular to the spiral tangent. There are several potential optimization goals one might have in designing an STS, for instance, one might want to find:

  1. The maximum thickness under height, radius, and ROM constraints
  2. The minimum height under stiffness, radius, and ROM constraints
  3. The minimum radius under height, stiffness and ROM constraints.
  4. The maximum ROM under stiffness, height, and radius constraints.

All of these optimization goals would also be subject to general feasibility constraints, for instance, the spring must stay within its material's elastic zone at the end of its range of motion. The problem becomes a little more complicated when we add in more spring parameters that a designer might require, such as the spring's preload torque and the distance between spring coils at the end of its ROM (so the spring does not collide with itself). Let's define some possible states for our spring:

  1. Rest state
    • The spring with zero angular force applied. This is the state the spring will be in before it is assembled into the host device, and how the spring will be printed if it is to be made by 3D-printing.
  2. Preload state
    • The spring at rest within its host device. If no preload torque is desired, this will be the same as the rest state. If preload torque is set higher than zero, then some force is applied to the spring during assembly, and therefore the spring applies a non-zero torque to its host device at all times. The ROM of the spring is the angular distance between the preload state and MD, not the rest state and MD.
  3. Maximum deformation (MD) state
    • The spring at the very end of its useful ROM. This may not be as far as the spring can physically be deformed. This tool will require that the spring stays within its material's elastic zone at this state. If we want the spring to stop before it collides with itself (for instance, to avoid the resulting friction) then we must create another parameter of minimum coil distance. This parameter may sound innocuous, but in reality even at low values it can have an enormous effect on the spring's pitch.
  4. End state
    • This is the spring deformed or twisted as far as it possibly can be, where the spring coils have collided with each other and stopped any further deformation. This may be the same as the closed state if no minimum coil distance is set. This tool will not require that the spring stay within its elastic zone at the spring's end state, so pushing the spring past it's closed state may result in permanent damage to the spring. Therefore, it is advisable to design the host device so that it either physically stops the spring from going past MD, or so that it would otherwise not be possible for the spring to exceed MD in normal operation.

There are many properties to a spiral torsion spring. Depending on the optimization goal, some will be inputs, some will be outputs, and some intermediary calculations. Of the inputs, some are material properties, and some will either be variables or "settings" (essentially constraints) depending on the optimization goal. In the case of goal 1 (maximizing stiffness), the properties are organized as follows:

Diagram of spring property relationships when maximizing spring stiffness.

Settings:

  1. rmax
    • The maximum allowable outer radius of the spring (does not account for spring thickness)
  2. rC
    • The radius of the center pad of the spring (the part which connects to or contains the center axle)
  3. p0
    • Gap between spring coils at MD state
  4. Δθopt
    • Desired range of motion of the spring from preload state to MD state
  5. τpre
    • Amount of torque exerted by spring at preload state
  6. h
    • Spring height (z-axis print height if 3D printing)
  7. δ
    • Safety factor (maximum portion of yield stress to be used)

Material Data:

  1. E
    • Elasticity of the material (Young's modulus)
  2. σy
    • Material's yield stress

Variables:

  1. t
    • Spring thickness (on x-y print bed plane if 3D printing)
  2. LE
    • Arclength of the effective portion of the spring

PSO Target:

  1. K
    • Stiffness (spring constant)

Intermediary Calculations:

  1. rE
    • Inner radius of effective portion of spring
  2. ΔθR
    • Range of motion from rest to MD state
  3. θEMD
    • θ (radians) of effective portion of spring at MD state
  4. σmax
    • Stress on spring at MD state
  5. rpre
    • Outer radius at preload state (does not account for spring thickness)
  6. θE
    • θ (radians) of effective portion of spring at rest state
  7. rR
    • Outer radius of spring at rest state (does not account for spring thickness)

Constraints:

  1. C1
    • Stress constraint
  2. C2
    • Positive radius constraint
  3. C3
    • Max radius constraint

Outputs:

  1. nR
    • Number of spring coil revolutions at rest state
  2. pR
    • Spring pitch at rest state

Current State of the Project

The script will successfully optimize a spring using pyswarm, however you have to somewhat tediously type in the inputs by manually changing the variables. The next step will be to create a GUI that takes the inputs from the user, and a macro for FreeCAD that uses this script to automatically generate the spring.

Currently, this project only supports goal 1, though I do plan to support all possible optimization goals in the future. Each optimization goal will have its own constructor method within the SpiralTorsionSpring class, in order to handle the different spring property layouts of each goal.

Releases

No releases published

Packages

No packages published

Languages