Spiral Torsion Spring Optimizer v3

Don't just eye-ball it! Take the guess-work out of designing coil springs for your projects.
52
288
0
2565
updated October 7, 2025

Description

PDF

If you are interested in this tool, please give it a like. If you have used this for something, please give it a rating and leave a comment to let me know what you used it for; I would love to see what people do with it! If you have any questions at all please leave a comment and I will get back to you as soon as I can.

Future versions of this project will be in the form of a FreeCAD macro rather than a libreoffice spreadsheet. Check out the repository on GitHub to see my progress on this (in its infancy at the time of this writing).

Introduction:

This project consists of a Libreoffice Calc spreadsheet that generates optimized spiral torsion springs using social-cognitive optimization, and a parametric FreeCAD file that takes the numbers copied from the spreadsheet and generates a 3D model of the optimized spring. By creating your own parametric CAD file, you can also use this spreadsheet to optimize springs in any CAD software of your choice. The spreadsheet also provides several useful graphs for visualizing spring characteristics and efficiency.

To use this tool, you need to determine the Young's modulus and yield stress of the material you are printing with. Some rough but usable numbers can be found in the technical data sheets published by reputable filament brands such as Prusament and Polymaker, though they do not take into consideration factors such as print speed, print temperature, and nozzle diameter which also effect these characteristics. Here is some advice on determining these parameters:

Young's Modulus (E):

The Young's modulus is a measurement of how elastic the material is, or in other words, how much the material bends or deforms when a certain amount of pressure is applied to it. In Prusament data sheets it is called “flexural modulus”, and in Polymaker it is called “bending modulus”. Polymaker also lists a separate characteristic called simply “Young's modulus”, but this is really either a tension modulus as listed in the Prusament data sheets or a compression modulus. We want to use the flexural or bending moduli because they are a combination of tensile (stretching) and compression moduli, which is what is really happening in a spiral torsion spring. If it is important to you to create springs that store a specific amount of energy very accurately, then follow these steps to find the actual Young's modulus for your specific material printed on your specific printer:

  1. Design a spring with a super high spring constant (K). This is to ensure you get a strong torque reading and minimize sources of error like friction. I used a spring constant of 1,000 N mm/rad. I set the height to 10mm and the thickness to 8mm. If you are using my Rad Tester, you will need to set the center pad radius (r_C) to 10mm.
  2. Print the spring using the print speed and temperature settings you chose when determining your initial Young's modulus. For instance, I started with a Young's modulus of 2600 MPa which is associated with a print speed of 40mm/sec and a temperature of 200C (for PLA) in the first paper cited in the bibliography. I also like to increase the number of vertical shells until the entire thickness of the spring is filled with shells (no infill). This way the entire spring has uniform strands of plastic all following the curve of the spring rather than jagged infill lines.
  3. Test the torque of the spring at a specific amount of twist. If you are using my Rad Tester, this will be one radian (hence the name).
  4. Enter the result of the test in N mm at cell D32 of the spreadsheet, and the amount of twist that reading was taken at in radians at cell D33.
  5. The exact Young's modulus of your material based on this reading will be calculated in cell D34. You can now copy this and paste it into cell D4, and the spring will be recalculated based on the actual modulus.
  6. To make sure it worked, print the newly generated spring with the same print settings as the first one and re-test the torque. You should now get the exact torque reading predicted by the spreadsheet (see the torque chart).
  7. Make sure to read the Limitations section below carefully.

Yield Stress (σ_y):

This is the amount of stress at which the material will leave its “elastic zone” and become permanently deformed. It is used to calculate the C_1 constraint in the spreadsheet which itself is used by the solver to ensure the material's full elasticity (subject to the safety factor, see below) is used. If you want to truly optimize a spring, you need to make sure you are applying close to the full yield stress when the spring is at it's maximum desired range of motion. I currently do not have a way to experimentally derive a material's yield stress, so I just use the numbers provided by manufacturers.

Safety Factor (δ):

This is a factor applied to the yield stress to ensure that the spring stays well within the elastic zone where it can be reliably used. I use a safety factor of 0.75 because that is the number used by the engineers who wrote the algorithm cited in the bibliography.

Distance between Spring Coils (p_0):

This is a useful parameter for two reasons:

  1. In the spreadsheet and in the CAD file we are dealing with a mathematically perfect model, but the spring that actually gets printed will have some dimensional inaccuracy to it no matter how well your printer is dialed in. Even if you want the spring to utilize all of the space between the coils, you should probably use a value of at least 0.05 or 0.1 here just to account for this.
  2. When the spring is deformed all the way down to where it collides with itself, there is a significant amount of friction that is introduced that changes the way the spring behaves. This friction will cause a loss of some of the spring's stored energy. For this reason, you may want to use a larger value here, say 0.3 or 0.5, to ensure this does not happen.

A Note on the Included CAD Models:

In previous versions, the spring was formed with a simple circle for the center pad, and by revolving a rectangle around the center axis to make the spring. The problem with this is: that doesn't actually make an accurate spiral! Also, the spiral never emerged smoothly from the center pad, there was always some unused space there that bothered me. The new center pad is actually formed by a spiral itself-- one with a pitch equal to that of the spring at the end of its range of motion. That way when the spring is all the way deformed, it will at every point be the same distance from the center pad as it will from itself. In other words, when the spring is deformed all the way to the point it is designed for, all of the available space in the center is used up by the center pad. Also, the spring is now formed by a genuine spiral, and by sweeping a spring profile normal to that spiral across its length. This eliminates the need for several calculations from the previous versions, which needed to put the spring profile within the center pad in order to join the two parts.

The parameter r_C used to denote the radius of this center pad, and now it denotes the inner radius of the center pad spiral. So it still basically controls the same thing. The parameter r_P used to be needed to determine how far from origin the center of the spring profile should be, so that it will begin within the center pad and smoothly emerge from it. Then r_E would the the point along this spiral where the actual spring begins (the point at which the spring had fully emerged from the center pad). This is no longer necessary, now the spring profile simply begins at r_E. The old n_P used to denote the number of revolutions from the spring profile, and has been changed to n_R, the number of revolutions of the spring at rest since there is no longer a need for superfluous revolution.

Old model:

New model:

New model at maximum deformation (experimental version):

How to Optimize:

You can theoretically use this spreadsheet to optimize a spring in several different ways, but here is a step-by-step guide to what will probably be the most common form of optimization, that of maximizing the spring constant (stiffness):

  1. Download Libreoffice Calc and ensure you have Sun Microsystems' NLP Solver extension installed.
  2. Open the spreadsheet and enter your material's elasticity and yield stress from the filament data sheet (or from your own measurements).
  3. Enter values for all of the fields under “Inputs” except for t and K.
  4. Go to the “Tools” tab, and click “Solver”. In the box that opens up, click “Options” at the bottom. Under “Solver engine” select “SCO Evolutionary Algorithm”. Check the box for “Assume non-negative variables”. Click OK to exit options.
  5. Set the “Target Cell” to the K value in the spreadsheet (cell D16) and check “maximum”. Note: your cells may already have names like “solver_opt” rather than “D16”. This is because the solver saves these settings. Go to “manage names” to change them.
  6. Set “by changing cells” to cells D15-D16 (t and K). It might be unusual to maximize K by treating K as a variable, but it works in this case.
  7. Now its time to put in the constraints- under “Limiting Conditions” put D19-D21 in the “cell reference” column (individually). set the operators to “<=” and the values to 0.
  8. Optional constraints-- You will almost certainly want to keep the radius of the spring under a certain size. For this use cell D36. I also like to make a constraint to keep my thickness less than or equal to my height, so the spring stays in its plane easier.
  9. Now hit solve and watch it run through thousands of candidates before converging on the best one! Then click “OK” and “Keep result” if it worked. If it did not work (it will say “no solution found”) try loosening one of the constraints. Maybe you set such a high range of motion that it cannot make a spring as small as you wanted, for instance.

Limitations:

  1. This tool assumes that the radius of the spring will be allowed to decrease naturally as the spring is deformed. If the outer end of the spring is held fast to a fixed object (as in the case of many 3D printed spiral springs I have seen), then this tool will be totally useless.
  2. This tool also assumes that the “hinge” of the spring (the part where the spring connects with the center pad) moves freely as the spring deforms, which is clearly not actually the case. In the case of very thin springs, this is negligible, however in the case of moderately thick springs this becomes a problem for several reasons. If you want to create a truly accurate, optimized spring, then try the experimental “compliant hinge” version of the CAD file. 

Bibliography:

This paper explains how print temperature and speed changes the material properties of 3D printed objects. This is where I got my initial numbers for the Young's modulus and yield stress:

Hsueh, Ming-Hsien & Lai, Chao-Jung & Wang, Shi-Hao & Zeng, Yu-Shan & Hsieh, Chia & Pan, Chieh-Yu & Huang, Wen-Chen. (2021). Effect of Printing Parameters on the Thermal and Mechanical Properties of 3D-Printed PLA and PETG, Using Fused Deposition Modeling. Polymers. 13. 1758. 10.3390/polym13111758.

https://www.researchgate.net/publication/351925060_Effect_of_Printing_Parameters_on_the_Thermal_and_Mechanical_Properties_of_3D-Printed_PLA_and_PETG_Using_Fused_Deposition_Modeling

This is a paper on a different optimization algorithm for 3D-printed coil springs. I tried getting this to work in a spreadsheet for a while before giving up and deciding to create my own from the ground up. I did use a couple things from this paper, including my C_1 constraint. I mostly used the same terminology from this paper as well:

Scarcia, Umberto & Berselli, Giovanni & Melchiorri, Claudio & Ghinelli, Manuele & Palli, Gianluca. (2016). Optimal Design of 3D Printed Spiral Torsion Springs. V002T03A020. 10.1115/SMASIS2016-9218.

https://www.researchgate.net/publication/311169135_Optimal_Design_of_3D_Printed_Spiral_Torsion_Springs

I also used some of the equations from omnicalculator and benefited greatly from its explanation of the Archimedean spiral.

Big thanks to Symbolab for helping me double-check my algebra.

Change Log:

10/7/2025: Fixed this issue with the non-articulated model

Tags



Model origin

The author marked this model as their own original creation.

License