I'm designing PCB just occasionally, let say two or three times a year, and I am always struggling to choose the correct trace widths for different currents flowing in different parts of my circuit. Thus I've written a program for the computation of PCB traces according the IPC-2221 standard. The relevant variables are the maximum current for a trace, the trace height, trace width, trace length, and the allowed temperature rise for the trace, ambient temperature, and the trace resistance. The trace height is in most of my cases 35um, that's why this is the default value in the program.
The program is using the metric units A, K and m. If you want it in A, K and mil you have to convert or modify the code by removing the lines 27-28, 30-31, 58-59, 61-62.
Best regards,
Frank
Code: Select all
@ computation of PCB traces according IPC-2221 standard
@
@ internernal traces : I = 0.024 x dT^0.44 x A^0.725
@ externernal traces: I = 0.048 x dT^0.44 x A^0.725
@ Resistance = Resistivity*Length/Area*(1 + (Temp_Co*(Temp - 25))
@
@ The formulas are defined for the units A, K and mil. The programm
@ takes and gives the metric unit m instead of mil!
@
@ Default value for the trace height is 35um
@ Default value for the temperature rise is 10K
@
@ Frank Kirschbaum, frank.kirschbaumr@gmail.com
@
00 { 669-Byte Prgm }
01 LBL "Trace"
02 CLMENU
03 "extern" @ main Menu: choice between internernal and externernal traces
04 KEY 1 XEQ "extern"
05 "intern"
06 KEY 2 XEQ "intern"
07 "resist"
08 KEY 3 XEQ "resist"
09 MENU
10 STOP
11 LBL "extern" @ routine for externernal traces
12 MVAR "IMax"
13 MVAR "dT"
14 MVAR "width"
15 MVAR "height"
16 VARMENU "extern"
17 CF 21 @ continue program execution after a VIEW instruction
18 STOP
19 ASTO "CONTROL" @ store the name of the unknown variable in CONTROL
20 PGMSLV ".extern" @ specify solver routine
21 SOLVE IND "CONTROL" @ Indirectly specify the variable to be solved
22 VIEW IND "CONTROL" @ View the solution
23 GTO "extern" @ return to start
24 LBL ".extern" @ function to be solved for externernal traces
25 XEQ 00 @ call subroutine for default values
26 RCL "width"
27 39370.07874
28 ×
29 RCL× "height"
30 39370.07874
31 ×
32 0.725
33 Y↑X
34 RCL "dT"
35 0.44
36 Y↑X
37 ×
38 0.048
39 ×
40 RCL- "IMax"
41 RTN
42 LBL "intern" @ routine for internernal traces
43 MVAR "IMax"
44 MVAR "dT"
45 MVAR "width"
46 MVAR "height"
47 VARMENU "intern"
48 CF 21 @ continue program execution after a VIEW instruction
49 STOP
50 ASTO "CONTROL" @ store the name of the unknown variable in CONTROL
51 PGMSLV ".intern" @ specify solver routine
52 SOLVE IND "CONTROL" @ Indirectly specify the variable to be solved
53 VIEW IND "CONTROL" @ View the solution
54 GTO "intern" @ return to start
55 LBL ".intern" @ function to be solved for internernal traces
56 XEQ 00 @ call subroutine for default values
57 RCL "width"
58 39370.07874
59 ×
60 RCL× "height"
61 39370.07874
62 ×
63 0.725
64 Y↑X
65 RCL "dT"
66 0.44
67 Y↑X
68 ×
69 0.024
70 ×
71 RCL- "IMax"
72 RTN
73 LBL "resist" @ routine for resistance computation
74 MVAR "width"
75 MVAR "height"
76 MVAR "length"
77 MVAR "temp"
78 MVAR "Res"
79 VARMENU "resist"
80 CF 21 @ continue program execution after a VIEW instruction
81 STOP
82 ASTO "CONTROL" @ store the name of the unknown variable in CONTROL
83 PGMSLV ".resist" @ specify solver routine
84 SOLVE IND "CONTROL" @ Indirectly specify the variable to be solved
85 VIEW IND "CONTROL" @ View the solution
86 GTO "resist" @ return to start
87 LBL ".resist" @ function to be solved for internernal traces
88 XEQ 01 @ call subroutine for default values
89 RCL "temp"
90 25
91 -
92 3.9ᴇ-3
93 ×
94 1
95 +
96 RCL× "length"
97 RCL÷ "width"
98 RCL÷ "height"
99 1.7ᴇ-8
100 ×
101 RCL- "Res"
102 RTN
103 LBL 00 @ subroutine 00 for default values
104 RCL "height"
105 X≤0?
106 0.35ᴇ-6 @ default track height of 35um
107 STO "height"
108 RCL "dT"
109 X≤0?
110 10 @ default temperature rise
111 STO "dT"
112 RTN
113 LBL 01 @ subroutine 01 for default values
114 RCL "height"
115 X≤0?
116 0.35ᴇ-6 @ default track height of 35um
117 STO "height"
118 RCL "temp"
119 X≤0?
120 25 @ default temperature rise
121 STO "temp"
122 RTN
123 END