-
Notifications
You must be signed in to change notification settings - Fork 2
/
coax-trap-form.scad
237 lines (207 loc) · 10.7 KB
/
coax-trap-form.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
/*
* The official home for these files is https://github.com/SmittyHalibut/coax-trap-form
*
* A form for a coax trap, to make a trap dipole
* Electrical design from the 2015 ARRL Antenna Handbook
* page 10-15, section 10.2.2, "Five Band W3DZZ Trap Antenna"
* The idea is a trap resonant at 7.2MHz, which natively builds a 40/80m
* antenna. But the series capacitance in the trap allows the total antenna
* length to resonate at 20, 15, and 10m as well, at higher harmonics.
* The idea being a 5 band antenna with only a single pair of traps.
*
* The book shows two designs, depending on which diagram you look at:
* 1: Traps: 60pF, 8.2uH, 22' outer wire length
* 2: Traps: 100pF, 4.9uH, 21' outer wire length
* Both have 32' inner length, and are fed with 75ohm.
*
* My goal is to make these traps using the coax trap design discussed
* later in the chapter.
*
* Using: https://www.qsl.net/ve6yp/coaxtrap.zip coax trap calculator,
* and C/ft numbers for coax I had on hand (RG8/X and RG58), I wasn't
* able to make a coax trap with the values above; all common coax has
* too much C/ft to get down to 100pF. The best I could do was with my
* RG8/X, down to 137pF and 3.575uH, 6.25 turn on a 3.1in form.
*
* This is that form, with holes in the right places for coax and attachments.
* Printed vertically like a tower, THIS WILL NOT BE STRUCTURAL!
* My intention is to feed the antenna wire through a nylon rope so the
* rope is tensioned, but the wire is not. The trap structure will just be loosely
* hanging from the wire ends that stick out from the rope an inch or two.
*/
use <Writescad/Write.scad>
// Thingiverse Customizer displays the immediately preceeding comment. So
// You'll see some duplication of comments below, with the last line being a shorter
// version to fit on one line for Thingiverse. Sorry about that.
// What are the parameters of the form for your particular trap?
// The coil diameter. Calculator: https://www.qsl.net/ve6yp/coaxtrap.zip
form_diameter_in = 2.1;
// Number of turns (can be decimal, like 6.25) Calculator: https://www.qsl.net/ve6yp/coaxtrap.zip
num_turns = 1;
// What Coax are you using?
// RG8/X, LMR240 = 0.242
// RG58, LMR195 = 0.195
// What's the diameter of your coax?
coax_diameter_in = 0.242;
// Coil pitch: center-to-center spacing of turns. Not less than coax_diameter_in.
coax_pitch_in = 0.500;
// What size bolt are you using to attach to the antenna?
// Oversize by ~10%; 3D printing isn't that precise, and OpenSCAD models circles with lines
// on the INSIDE of the circle, so the actual dimention is smaller than you think.
// No 10-24 = 0.200
// Size of the bolts you use to attach to antenna. Oversize by ~10%.
bolt_diameter_in = 0.200;
// How thick do you need the form to be? Thicker is stronger, but is heavier and takes
// more material. I find .150" to be pretty good, but adjust as you need.
// How thick should the form be?
form_thickness_in = .150;
// Text options
// Text on top half, opposite top hole
text_top = "20m";
// Text on bottom half, opposite bottom hole
text_bottom = "14.15MHz";
// Derived dimensions; you shouldn't need to change these:
// Don't change this in Thingiverse Customizer, it's a constant.
in2mm = 25.4;
form_diameter = form_diameter_in * in2mm;
coax_diameter = coax_diameter_in * in2mm;
coax_pitch = (coax_pitch_in < coax_diameter_in) ? coax_diameter : (coax_pitch_in * in2mm);
echo(coax_pitch);
bolt_diameter = bolt_diameter_in * in2mm;
form_thickness = form_thickness_in * in2mm;
coax_radius = coax_diameter/2;
coax_turns_height = coax_pitch * num_turns;
coax_turns_angle = num_turns * 360;
trap_length = coax_turns_height + coax_diameter*2; // One diameter on either side for "slack"
extra_length = bolt_diameter*3; // Additional form length on either side of the coil
bolt_surface_radius = bolt_diameter;
bolt_surface_height = form_thickness*2;
total_body_length = trap_length + extra_length*2;
// Form is 1mm radius bigger than specified, so when we scoop out 1mm of turn for the
// coax, we're back to the desired diameter
form_radius = form_diameter/2;
form_radius_actual = form_radius + 1;
// Main form Body
difference() {
cylinder(h=trap_length, r=form_radius_actual, center=false, $fn=100);
// Take out the center core
translate([0, 0, -1]) cylinder(h=trap_length+2, r=form_radius_actual-form_thickness, center=false, $fn=100);
// Entry hole, at 0 degrees
translate([form_radius, 0, coax_diameter]) {
rotate(a=90, v=[0, 1, 0]) cylinder(h=form_thickness*2, d=coax_diameter*1.1, center=true, $fn=20);
// Rounding the corners for coax bending into the inside.
translate([-coax_radius*1.1, coax_radius*2, 0]) rotate(a=-90, v=[0, 0, 1])
helix_extrude(angle=90, height=0, $fn=20) translate([coax_radius*2.0, 0, 0]) circle(r=coax_radius, $fn=20);
}
// Entry hole, at num_turns degrees
rotate(a=num_turns*360, v=[0, 0, 1]) translate([form_radius, 0, coax_turns_height + coax_diameter]) {
rotate(a=90, v=[0, 1, 0]) cylinder(h=form_thickness*2, d=coax_diameter*1.1, center=true, $fn=20);
// Rounding the corners for coax bending into the inside.
translate([-coax_radius*1.1, -coax_radius*2, 0])
helix_extrude(angle=90, height=0, $fn=20) translate([coax_radius*2.0, 0, 0]) circle(r=coax_radius, $fn=20);
}
// Coax troff
// Using built-in linear extrude; doesn't work. :-(
//translate([0, 0, coax_diameter])
// #linear_extrude(height = coax_turns_height, center=false, convexity=10, twist = 360*num_turns, $fn=100)
// translate([form_radius + coax_diameter/2, 0, 0])
// circle(r=coax_diameter/2);
// Using occamsshavingkit code from github. Works, but doesn't render?
//$fn=50;
//coax = he_rotate([90, 0, 0], he_translate([form_radius+coax_radius, 0, 0], he_circle(coax_diameter)));
//translate([0, 0, coax_diameter])
// helix_extrude(shape=coax, pitch=coax_diameter, rotations=num_turns);
// Using thingiverse code
translate([0, 0, coax_diameter])
helix_extrude(angle=coax_turns_angle, height=coax_turns_height, $fn=100)
translate([form_radius + coax_radius, 0, 0])
circle(r=coax_radius, $fn=20);
}
// Extra bit on top
translate([0, 0, trap_length]) {
difference() {
union() {
difference() {
cylinder(h=extra_length, r=form_radius_actual, center=false, $fn=100);
// Take out the center core
translate([0, 0, -1]) cylinder(h=extra_length+2, r=form_radius_actual-form_thickness, center=false, $fn=100);
}
rotate(a=num_turns*360, v=[0, 0, 1]) {
// Bolt surface, outside
translate([form_radius_actual, 0, bolt_diameter*1.5]) rotate(a=90, v=[0, 1, 0])
cylinder(h=form_thickness/2, d2=bolt_diameter*2, d1=bolt_diameter*3, center=true, $fn=20);
// Bold surface, inside
translate([form_radius_actual-form_thickness, 0, bolt_diameter*1.5]) rotate(a=90, v=[0, 1, 0])
cylinder(h=form_thickness/2, d1=bolt_diameter*2, d2=bolt_diameter*3, center=true, $fn=20);
// Text
rotate(a=-90, v=[0, 0, 1])
writecylinder(text_top, where=[0, 0, bolt_diameter*1.5], radius=form_radius_actual, height=0,
h=bolt_diameter*2);
}
}
// Mount hole for hardware
rotate(a=num_turns*360, v=[0, 0, 1])
translate([form_radius-form_thickness/2, 0, bolt_diameter*1.5]) rotate(a=90, v=[0, 1, 0])
cylinder(h=bolt_surface_height*2, d=bolt_diameter, center=true, $fn=20);
}
}
// ...and on bottom
translate([0, 0, -extra_length]) {
difference() {
union() {
difference () {
cylinder(h=extra_length, r=form_radius_actual, center=false, $fn=100);
// Take out the center core
translate([0, 0, -1]) cylinder(h=extra_length+2, r=form_radius_actual-form_thickness, center=false, $fn=100);
}
// Bolt surface, outside
translate([form_radius_actual, 0, bolt_diameter*1.5]) rotate(a=90, v=[0, 1, 0])
cylinder(h=form_thickness/2, d2=bolt_diameter*2, d1=bolt_diameter*3, center=true, $fn=20);
// Bold surface, inside
translate([form_radius_actual-form_thickness, 0, bolt_diameter*1.5]) rotate(a=90, v=[0, 1, 0])
cylinder(h=form_thickness/2, d1=bolt_diameter*2, d2=bolt_diameter*3, center=true, $fn=20);
// Text
rotate(a=-90, v=[0, 0, 1])
writecylinder(text_bottom, where=[0, 0, bolt_diameter*1.5], radius=form_radius_actual, height=0,
h=bolt_diameter*2);
}
// Mount hole for hardware
translate([form_radius-form_thickness/2, 0, bolt_diameter*1.5]) rotate(a=90, v=[0, 1, 0])
cylinder(h=bolt_surface_height*2, d=bolt_diameter, center=true, $fn=20);
}
}
// The following code is from https://www.thingiverse.com/thing:2200395
// Yes, code on thingiverse. I had never see it either.
module helix_extrude(angle=360, height=100) {
precision = $fn ? $fn : 24;
// Thickness of polygon used to create an helix segment
epsilon = 0.001;
// Number of segments to create.
// I reversed ingenering rotate_extrude
// to provide a very similar behaviour.
nbSegments = floor(abs(angle * precision / 360));
module helix_segment() {
// The segment is "render" (cached) to save (a lot of) CPU cycles.
render() {
// NOTE: hull() doesn't work on 2D polygon in a 3D space.
// The polygon needs to be extrude into a 3D shape
// before performing the hull() operation.
// To work around that problem, we create extremely
// thin shape (using linear_extrude) which represent
// our 2D polygon.
hull() {
rotate([90, 0, 0])
linear_extrude(height=epsilon) children();
translate([0, 0, height / nbSegments])
rotate([90, 0, angle / nbSegments])
linear_extrude(height=epsilon) children();
}
}
}
union() {
for (a = [0:nbSegments-1])
translate([0, 0, height / nbSegments * a])
rotate([0, 0, angle / nbSegments * a])
helix_segment() children();
}
}