From 95dd484c6299ad30a60ac64d5cce8b363258de26 Mon Sep 17 00:00:00 2001 From: abidingabi Date: Sun, 17 Sep 2023 22:18:24 -0400 Subject: [PATCH] Add inline belt calculator (#393) --- source/_static/calculator-utils.js | 29 ++++ .../power-transmission/belt-calculator.html | 148 ++++++++++++++++++ .../power-transmission/belt.rst | 36 ++--- 3 files changed, 188 insertions(+), 25 deletions(-) create mode 100644 source/_static/calculator-utils.js create mode 100644 source/docs/common-mechanisms/power-transmission/belt-calculator.html diff --git a/source/_static/calculator-utils.js b/source/_static/calculator-utils.js new file mode 100644 index 00000000..fc840473 --- /dev/null +++ b/source/_static/calculator-utils.js @@ -0,0 +1,29 @@ +function prettifyFloat(float) { + return float.toFixed(2); +} + +function writeText(id, content) { + if (isNaN(content)) { + content = "Invalid!"; + } + + document.getElementById(id).innerText = content; +} + +function getValue(id) { + const value = parseFloat(document.getElementById(id).value); + + if (isNaN(value)) { + throw new Error("Value must be a number!"); + } + + if (value <= 0) { + throw new Error("Value must be positive!"); + } + + if (value >= 1e6) { + throw new Error("Value must be reasonably small! (Less than 1e6.)"); + } + + return value; +} diff --git a/source/docs/common-mechanisms/power-transmission/belt-calculator.html b/source/docs/common-mechanisms/power-transmission/belt-calculator.html new file mode 100644 index 00000000..bc9964e2 --- /dev/null +++ b/source/docs/common-mechanisms/power-transmission/belt-calculator.html @@ -0,0 +1,148 @@ + + + +
+ + + +
+Pulley A Pitch Diameter (mm): +
+ + + +
+Pulley B Pitch Diameter (mm): +
+ + + +
+Ratio: +
+ + + + + + + + +
Tooth CountC2C (mm)Length (mm)
+ + + + + + + + diff --git a/source/docs/common-mechanisms/power-transmission/belt.rst b/source/docs/common-mechanisms/power-transmission/belt.rst index 5fd8ef32..de1d00ab 100644 --- a/source/docs/common-mechanisms/power-transmission/belt.rst +++ b/source/docs/common-mechanisms/power-transmission/belt.rst @@ -22,38 +22,24 @@ Like chain, belt is identified by its :term:`pitch ` - common pitches fou When using timing belts, correct tension is very important. There are two main ways to get your tension right. The first is easy - goBILDA and Actobotics already have belts integrated into their hole patterns. You can buy correctly sized belt directly from each vendor, and your tension will be perfect as soon as the belt is installed. As your designs gain complexity, so will your belt runs - maybe there are more than 2 pulleys, and maybe your pulleys are all different sizes. To compensate for this, the second way to ensure tension is to use a dynamic tensioner, similar to those found in complex chain runs. To design for these tensioners, we recommend planning more complex belt runs in CAD before building them in real life. -Center-to-Center calculations ------------------------------ +Belt Calculator +--------------- -Just like chain, the actual calculations for precise :term:`C2C` distances for belts are complicated. Here is a `calculator `_ or `two `_ that simplifies the work. +The actual calculations to determine which belt to use to get close to a given center-to-center (:term:`C2C`) distance are complicated. Below is a calculator to help out: -.. math:: +.. card:: - C=\frac{P}{8}*(2L-(N+n)+\sqrt{(2L-(N+n))^2-\frac{8}{\pi^2}*(N-n)^2}) + Belt Calculator + ^^^ - L=\frac{2C}{P}+\frac{N+n}{2}+\frac{P(\frac{N-n}{2\pi})^2}{C} + .. only:: latex -- :math:`C=` center-to-center distance, inches + The web version of gm0 has a belt calculator available here. -- :math:`L=` belt length in pitches + .. raw:: html + :file: belt-calculator.html -- :math:`P=` pitch of belt - -- :math:`N=` number of teeth in large pulley - -- :math:`n=` number of teeth in small pulley - -.. math:: C=\frac{L-\frac{\pi}{2}(D+d)}{4}+\sqrt{[(\frac{L-\frac{\pi}{2}(D+d)}{4})^2-\frac{(D-d)^2}{8}} - -- :math:`D=` chosen diameter of large pulley - -- :math:`d=` chosen diameter of small pulley - -- :math:`L=` length of belt - -- :math:`C=` center distance - -- (all units must be the same) +SDP-SI has a `more advanced calculator `_, as does `ReCalc `_. The equations for calculating these values by hand can be found in `SDP-SI's Designing a Miniature Belt and Pulley Drive System Design Guide `_. Belt Wrap ---------