AWG2mm
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.0, Creation date: 2020-10-26, Last change: 2025-09-15
converts American Wire Gauge to Wire Diameter
See Also: French2mm
, mm2inch
, Charriere2mm
, Gauge2mm
, SGcablewinch
, PS2KW
, KW2PS
, Fahrenheit2Celsius
Example Illustration
Syntax
dmm=AWG2mm([awg,len,Ucc,Isc])
Input Parameter
awg: | | AWG |
len: | | optional cable length in METER |
Ucc: | | optional cable voltage |
Isc: | | optional cable current |
Output Parameter
Examples
AWG2mm(23,0.2)
Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, AWG2mm, converts American Wire Gauge (AWG) to wire diameter in millimeters. It is part of the SolidGeometry library and was introduced in version 5.0.
Input Parameters
- awg: The American Wire Gauge value. Default is 36 if not provided.
- len: Optional cable length in meters. Default is 1 meter.
- Ucc: Optional cable voltage. Default is 12 volts.
- Isc: Optional cable current. If not provided, it is calculated using the formula
I = Ucc / rmm.
Output
- dmm: The wire diameter in millimeters.
Algorithm Steps
- Retrieve the input parameters using the
getfuncparams function. If parameters are not provided, use default values: AWG = 36, len = 1 meter, Ucc = 12 volts.
- Define constants:
AWG36 = 0.127 mm for the diameter of AWG 36 wire, and rcup = 0.0178 Ohm/mm² for resistivity.
- Calculate the wire diameter
dmm using the formula: dmm = AWG36 * 92^((36 - awg) / 39).
- Calculate the cross-sectional area
amm using the formula: amm = (dmm / 2)^2 * pi.
- Calculate the resistance
rmm using the formula: rmm = rcup * amm * len.
- Calculate the current
I using the formula: I = Ucc / rmm.
- If
Isc is not provided, set it to I.
- Calculate the power
W using the formula: W = Ucc * Isc.
- If no output is requested, print the results using
dbprintf:
- Print the wire diameter and cross-sectional area.
- If the length is not the default, print the resistance.
Algorithm explaination created using ChatGPT on 2025-08-19 07:00. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21