-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathPushPullFeeder.scad
3528 lines (3222 loc) · 163 KB
/
PushPullFeeder.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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (C) 2020 <mark@makr.zone>
*
* Inspired by Dining-Philosopher's Litefeeder
* https://github.com/dining-philosopher/litefeeder
* and Jed Smith's Litefeeder++ friction wheel
* https://loonatec.com/pnp-semi-automatic-feeder/
*
* The PushPullFeeder is free software: you can redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* The PushPullFeeder is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with OpenPnP. If not, see
* <http://www.gnu.org/licenses/>.
*
* For more information visit https://makr.zone/tag/feeder/
*/
/* [ Make Options ] */
// Single/special selection
option=0; // [0:"* Individual switches (see below...)", -1:"* Phase I Parts", -2:"* Phase II Parts", -3:"* Everything", -4:"* Ratchet parts", 1:"Base plate", 2:"Lever", 3:"Spool, base", 4:"Spool, cover", 5:"Friction wheel", 6:"Tape inset", 7:"Ratchet blocking spring", 8:"Reel counterpart", 9:"Handle and lock", 10:"Liteplacer nozzle adapter", 11:"Liteplacer lever actuator", 12:"Spent Tape Chute", 13:"Test print"]
// Base plate of the feeder
make_base_plate = true;
// Lever with the dog
make_lever = true;
// Spool left side (base), with ratchet wheel
make_spool_left = true;
// Spool right side (cover)
make_spool_right = true;
// Friction wheel, connecting the two spool halves with a slip-transmission
make_friction_wheel = true;
// Exchangable tape inset, allows to use different tape thickness/embossing
make_inset = true;
// Spring blocking the ratchet from going in reverse
make_blocking_spring = true;
// Reel holder counterpart holding the reel up on the other side (for narrow reels only)
make_reel_counterpart = true;
// Handle and lock for the extrusion mount
make_handle_lock = true;
// Liteplacer specific nozzle adapter
make_nozzle_adapter = false;
// Liteplacer specific lever actuator
make_lever_actuator = false;
// Simple spent tape chute
make_tape_chute = true;
// Test print
make_test_print = false;
phase1 = (option == -1);
phase2 = (option == -2);
everything = (option == -3);
ratchet_parts = (option == -4);
do_base_plate = (option == 0 && make_base_plate) || (option == 1) || everything || phase1 || ratchet_parts;
do_lever = (option == 0 && make_lever) || (option == 2) || everything || phase2 || ratchet_parts;
do_spool_left = (option == 0 && make_spool_left) || (option == 3) || everything || phase1 || ratchet_parts;
do_spool_right = (option == 0 && make_spool_right) || (option == 4) || everything || phase2;
do_friction_wheel = (option == 0 && make_friction_wheel) || (option == 5) || everything || phase2;
do_inset = (option == 0 && make_inset) || (option == 6) || everything || phase2;
do_blocking_spring = (option == 0 && make_blocking_spring) || (option == 7) || everything || phase2 || ratchet_parts;
do_reel_counterpart = (option == 0 && make_reel_counterpart) || (option == 8) || everything || phase2;
do_handle_lock = (option == 0 && make_handle_lock) || (option == 9) || everything || phase2;
do_nozzle_adapter = (option == 0 && make_nozzle_adapter) || (option == 10) || everything;
do_lever_actuator = (option == 0 && make_lever_actuator) || (option == 11) || everything;
do_tape_chute = (option == 0 && make_tape_chute) || (option == 12) || everything || phase2;
do_test_print = (option == 0 && make_test_print) || (option == 13);
debug_ratchet = ratchet_parts;
/* [ Logo and Text ] */
// Switch on/off logos and text (except tag)
logo_enabled=true;
// Logo text to be printed on the reverse of the base plate
logo_text="makr.zone";
// Tag to be printed on the reverse of the base plate (revision number etc.)
logo_tag="408";
// Open Source Hardware Logo size (set 0 to switch off)
logo_size=18;
// Etching depth
logo_etch=0.4;
// Logo outline pen width
logo_etch_pen=0.8; // [0.2:0.01:2]
// Additional font weight
logo_etch_font=0.2; // [-0.5:0.01:1]
// Logo position in x
logo_x=-60;
// Logo position in y
logo_y=24;
// Text position in x
logo_text_x=-60;
// Text position in x
logo_text_y=10;
// Tag position in x
logo_tag_x=-22;
// Tag position in y
logo_tag_y=-4.5;
// Logo_font
logo_font="Electrolize:style=Regular"; // ["Electrolize:style=Regular", "Liberation Mono:style=Bold"]
use <Electrolize-Regular.ttf>
// Electrolize-Regular.ttf: Copyright (c) 2011, Cyreal (www.cyreal.org)
// with Reserved Font Name "Electrolize" This Font Software is licensed
// under the SIL Open Font License, Version 1.1. This license is available
// with a FAQ at: http://scripts.sil.org/OFL
// https://github.com/google/fonts/tree/master/ofl/electrolize
// Text font size
logo_font_size=5.4;
logo_tag_font=logo_font;
// Tag font size
logo_tag_font_size=4.6;
/* [ Display ] */
// Arrange the parts as assembled
debug=true;
// Relax the springs in assembled mode
relax_springs=false;
// Render some complex bodies in preview (better quality, slower rendering)
preview_rendering=false;
// Litefeeder reference (from: https://github.com/dining-philosopher/litefeeder)
do_litefeeder=false;
/* [ 3D Printing ] */
// Standard layer height
layer_height=0.3;
// Standard extrusion width
extrusion_width=0.5;
// Minimum gap between parts on the the print bed
gap=2;
// Maximum spacing between supports (0 to switch off)
support_grid=0;
// General play rationale:
// the play is modelled on the smaller, removable part, so you can tune it with quick re-prints.
// Play between parts that need to snap-in (empirical)
play=-0.05;
// Play on axles (empirical)
axle_play=-0.02;
// Play on the spool axle
spool_axle_play=axle_play;
// Specific snap-in play for inset
inset_play=play;
// Play on the handle lock
handle_lock_play=play;
// Play on fixtures
fixture_play=play;
// Minimal sturdy vertical wall
wall_strength_min=1.3;
// Round up to nearest multiple of extrusion width
wall=ceil(wall_strength_min/extrusion_width)*extrusion_width;
// Minimal sturdy horizontal wall
layered_wall_strength_min=0.5;
// Round up to nearest multiple of layer height
layer_wall=ceil(layered_wall_strength_min/layer_height)*layer_height;
// bevel/rounding in X/Y
bevel_xy=wall;
// bevel in Z
bevel_z=2*layer_height;
// Maximum allowed error in (most) curve approximations
_fp=0.02; // $fn is determined by this maximum error
// Epsilon for CSG body overlap
e=0.02;
$fs=extrusion_width;
/* [ Tape Specification ] */
// Tape width
tape_width=8; // [8:4:24]
// Tape width adjustment for inset.
tape_width_adjust=0.0; // [-0.25:0.01:0.25]
tape_width_eff=tape_width+tape_width_adjust;
// Tape thickness (not incuding the embossed pockets)
tape_thickness=0.6; // [0:0.01:1.5]
// Embossed pockets portruding from the underside of the tape
tape_emboss=0; // [0:0.01:2.4]
// 250V cap = 1.6
// Embossed pockets size, across tape, measured outside (underside of tape)
tape_emboss_size=3.75;
/* [ Tape Specification, Advanced ] */
// Maximum overall tape height for exchangeable insets (should not change)
tape_max_height=4;
// Maximum delta from tape width to reel width (from EIA 481, do not change)
tape_reel_max_width_delta=6.4;
// Sprocket hole diameter (should not change)
sprocket_hole_diameter=1.5;
// Sprocket hole distance from tape edge (should not change)
sprocket_hole_distance=1.75;
sprocket_hole_margin=sprocket_hole_distance-sprocket_hole_diameter/2;
// Sprocket hole pitch (should not change)
sprocket_pitch=4;
// maximum sprocket side gap to cover tape
sprocket_gap=sprocket_hole_distance+sprocket_hole_diameter/2;
// Minimum margin where cover tape is attached
tape_min_margin=0.6;
sprocket_margin=sprocket_gap+tape_min_margin;
/* [ Tape Inset ] */
// Tape inset pick window length (make it longer than the inset to keep the end open)
tape_inset_window_length=18;
// Tape inset begin x
tape_inset_begin=-74;
// Tape inset end x
tape_inset_end=6;
// Tension for tape cover (ratio of tape thickness)
tape_inset_cover_tension=0.2;
// Radius of the tape on-ramp
tape_bend_radius_begin=30;
// Bend angle of the tape on-ramp
tape_bend_angle=45;
// Inset snap-in feature size
tape_inset_slant=2;
// Minimum thorn groove
thorn_min_groove=0.4;
// Cover tape edge relative to the pick location
cover_tape_edge=-1.25;
// Tape reversal blocking thorn (set 0 to switch off)
reversal_blocking_thorn_length=0.5;
/* [ Label Holder ] */
// Add the label to the tape inset (cannot be combined with spent tape chute)
label_enabled=false;
// Distance from inset edge
label_distance=4; // [0:0.1:50]
// Label holder length
label_length=15; // [5:0.1:50]
// Surface of label, relative to tape surface
label_top=0; // [-10:0.1:10]
// Label frame [number of extrusions]
label_frame_extrusions=2;
label_frame_thickness=label_frame_extrusions*extrusion_width;
// Label slot [number of extrusions]
label_slot_extrusions=2;
label_frame_slot=2*extrusion_width;
label_frame_wall=layer_wall*2;
// Size of the
label_thumb=8;
/* [ Spent Tape Chute ] */
// First bend angle
tape_chute_angle=210;
// Second (reverse) bend angle
tape_chute_reverse_angle=110;
// First bend diameter (as measured on tape surface)
tape_chute_diameter=60;
// Second bend diameter (as measured on tape surface)
tape_chute_reverse_diameter=52;
// Angle how much the chute can pivot up (for easier insertion)
tape_chute_pivot_angle=43;
// Preview how it pivots up
tape_chute_pivot_debug=false;
// Spent tape sideways play
tape_chute_play=layer_height;
// Tension angle of the first bend (the bend is coiled up that much)
tape_chute_tension_angle = 15;
// Tape width adjustment for spent tape chute. Should be fixed at maximum tape_width_adjust = 0.25mm.
tape_width_adjust_chute=0.25;
tape_width_eff_chute=tape_width+tape_width_adjust_chute;
// filet the top corners to reduce bridges (must be <= tape_max_height/2 to get a manifold)
filet=tape_max_height/2;
/* [ Base Plate] */
// Pick location offset. Tape hole distance increments
pick_offset=0; // [0:4:40]
// Minimum base plate thickness, will be rounded up to form integral mm overall feeder size (minus one layer)
base_min_thickness=1.6;
base_thickness=ceil(base_min_thickness+tape_reel_max_width_delta)
-tape_reel_max_width_delta/2-layer_height;
// Margin all around the base plate
base_margin=3.5;
// Base plate begin in x
base_begin=-84;
// Base plate end in x
base_end=14;
base_length=base_end - (base_begin-pick_offset);
// Base plate height below tape surface
base_height=7;
// Base plate edge on sprocket side of tape
base_tape_edge=1.5;
base_bottom=-base_height;
base_anti_friction_ring=extrusion_width*3;
// Add a reel holder to the base plate
base_with_reel_holder = true;
// Add base mounting screws (depends on other options)
base_mount_screws=true;
// Emboss the base plate to make space for mechanics
emboss=2;
// Cross hole diameter (for punch-outs, optional reinforcment pins, screws etc.)
cross_screw_diameter=3;
// Play in screw holes
screw_play=0.1;
// In case there is no extrusion mount, make screws holes at these x coordinates.
base_screw_hole1=-40;
base_screw_hole2=-10;
base_screw_holes=[base_screw_hole1, base_screw_hole2];
/* [ Cover Tape Spool ] */
//cover_tape_slot=extrusion_width*2;
// Cover tape spool inner (drum) diameter
spool_inner_diameter=24;
// Cover tape spool outer diameter
spool_outer_diameter=56;
spool_wall_left=emboss+sprocket_gap;
spool_wall_right=layer_wall;
// Cover tape pool axle diameter
spool_axle_diameter=8;
spool_axle_groove_innner=spool_axle_diameter-wall;
spool_axle_groove_outer=spool_axle_diameter+2*layer_height;
// Cover tape spool position in x
spool_axle_x=-86;
spool_axle_y=spool_outer_diameter/2+2;
// Spool left side number spokes (set 0 to switch off)
spool_spokes_left=0;
// Spool right side number spokes (set 0 to switch off)
spool_spokes_right=8;
spool_spoke_strength=4*extrusion_width;
spool_drum_clamp_strength=3*extrusion_width;
// Drum clamp tension, relative
spool_drum_clamp_tension=0.05;
// Drum clamp open angle
spool_drum_clamp_open_angle=60;
spool_drum_strength=spool_drum_clamp_strength+wall;
// Spool grip, number of teeth
grip_teeth=60;
// Spool grip, depth of teeth
grip_depth=0.0;
// Spool axle clip tension
axle_groove_tension = 0.3;
/* [ Cover Tape Spool, Ratchet ] */
// Ratchet teeth depth
ratchet_teeth_depth=1.2;
// Ratchet tooth point position, relative (usually 1)
ratchet_overhang=1;
ratchet_inner_diameter=spool_inner_diameter-ratchet_teeth_depth*2;
teeth_length=(sprocket_pitch+0.5)*ratchet_inner_diameter/spool_inner_diameter;
ratchet_diameter=ratchet_inner_diameter+ratchet_teeth_depth*2;
ratchet_teeth=floor(ratchet_diameter*PI/teeth_length/4)*4;
// Ratchet idle position (relative to teeth)
ratchet_tooth_start=-0.7;
ratchet_teeth_length=PI*ratchet_diameter/ratchet_teeth;
ratchet_thickness=spool_wall_left-layer_wall;
ratchet_bluntness=extrusion_width/2/teeth_length;
// Cut out a window into the base plate to see and trouble-shoot the ratchet/spring interaction
ratchet_window=true;
/* [ Springs ] */
// Tension of springs angle
spring_tension=12;
// Strength of springs [number of extrusions]
spring_strength_extrusions=3;
spring_strength_extrusions_small=2;
spring_strength=spring_strength_extrusions*extrusion_width;
spring_small_strength=spring_strength_extrusions_small*extrusion_width;
// Diameter for spring fixture
fixture_axle=8;
// Position of blocking spring in x
block_axle_x=-60;
// Position of blocking spring in y
block_axle_y=fixture_axle/2+wall+extrusion_width;
// Blocking spring bending angle
blocking_spring_bend=-25;
blocking_spring_tooth=-ratchet_teeth/4;
// Ratchet spring early engagement, relative to teeth (empirical and very important)
blocking_spring_early=-0.15; // [-0.5:0.01:0.5]
/* [ Reel ] */
// Reel maximum diameter (178mm +/- 2mm by EIA 481)
reel_diameter=180;
// Reel axle diameter
reel_axle=13;
reel_wall=tape_reel_max_width_delta/2;
reel_width=tape_width+2*reel_wall;
// Reel holder strength
reel_holder_strength=4+4*wall;
reel_washer=reel_axle+2*5;
reel_holder_thickness=base_thickness-reel_wall;
reel_washer_inner=cross_screw_diameter+2*wall;
// Reel horizontal distance from the mounting extrusion
reel_dist=10; // [0:1:50]
// Reel distance from the spool
reel_dist_spool=4; // [0:0.5:8]
// Add connection to spool axle
reel_spool_connect=true;
// Diameter of the connecting end
reel_counterpart_connector=max(reel_holder_strength, spool_axle_groove_outer+4*wall);
/* [ Lever ] */
// Lever axle diameter
lever_axle_diameter=8;
// Lever spring node size
lever_node=3;
// Lever axle position in x
lever_axle_x=-48;
// Lever axle position in y
lever_axle_y=29;
// To make the feeder compatible with various tape widths, the lever only takes up about half the tape width, so the nozzle adapter can actuate it when centered on the tape. This is the delta.
lever_actuation_delta=1;
lever_actuation_thickness=emboss+tape_width/2+lever_actuation_delta;
// Leverage for the feed actuation
lever_feed_leverage=26;
// Angle of the feed lever in idle position.
lever_feed_angle=100;
// Leverage for the dog actuation
lever_dog_leverage=12;
// Angle of the feed lever in idle position.
lever_dog_angle=247;
// Dog spring tensioned bending angle
lever_dog_spring_bend=-35;
// Leverage ratio of the ratchet spring vs. the dog spring [empirical]
lever_spool_leverage_ratio=1.0; // [0.8:0.01:2]
lever_spool_leverage=lever_spool_leverage_ratio*lever_dog_leverage; // empirical overgearing taken up by the friction wheel
// Angle of the spool spring lever in idle position.
lever_spool_angle=125;
// Spool spring relaxed bending angle
lever_spool_spring_bend=5;
// Ratchet tooth that the spool spring connects to (counter-clockwise from 0°)
lever_spool_spring_tooth=-1;
lever_axle_outer_diameter=reel_axle;
lever_strength=lever_axle_diameter+3*wall;
lever_thickness=emboss+tape_width+reel_wall;
lever_spool_x=cos(lever_spool_angle)*lever_spool_leverage;
lever_spool_y=sin(lever_spool_angle)*lever_spool_leverage;
lever_tape_x=cos(lever_dog_angle)*lever_dog_leverage;
lever_tape_y=sin(lever_dog_angle)*lever_dog_leverage;
lever_feed_x=cos(lever_feed_angle)*lever_feed_leverage;
lever_feed_y=sin(lever_feed_angle)*lever_feed_leverage;
/* [ Dog ] */
// Dog spring tensioned angle at idle position
dog_spring_bend=-12;
// Dog spring additional tension angle
dog_tension_angle=-8;
dog_strength=spring_strength+2*extrusion_width;
dog_blocker_strength=3*wall;
// Offset of the dog blocker above the inset cover.
dog_blocker_cover_offset=0.5;
// Dog slant ratio (0 means vertical, 1 means free to rotate up)
dog_slant_ratio=0.15;
// Tape advancing thorn length
thorn_length=0.9; // [0.4:0.05:1.1]
// Tape advancing thorn diameter ratio, relative to nominal sprocket hole size
thorn_diameter_ratio=1; // [0.8:0.01:1.1]
// Thorn sideways "tension" to draw the tape towards the base [mm]
thorn_sideways_tension=0.1;
thorn_diameter=sprocket_hole_diameter*thorn_diameter_ratio;
// Dog aproximative offset from pick location (will be aligned with nearest sprocket pitch)
dog_offset=-24; // [-34:4:-2]
// align the dog with the sprockets
dog_thorn_nominal_x=(round((dog_offset-pick_offset)/sprocket_pitch) - 0.5)*sprocket_pitch;
dog_nominal_x=dog_thorn_nominal_x-dog_strength/2+thorn_diameter/2;
// Thorn pointedness, relative to diameter
thorn_pointedness=0.67; // [0.33:0.01:0.99]
// Thorn overhang, relative to diameter
thorn_overhang=0.025; // [-0.5:0.01:0.5]
// Dog nominal position in y
dog_nominal_y=0;
dog_relaxed_pos=spring_relaxed_endpoint(
[(lever_axle_x-pick_offset)+lever_tape_x, lever_axle_y+lever_tape_y],
[dog_nominal_x, dog_nominal_y],
lever_dog_spring_bend,
dog_tension_angle);
// Dog (thorn) relaxed position in x
dog_x=dog_relaxed_pos.x;
// Dog (thorn) relaxed position in y
dog_y=dog_relaxed_pos.y;
// Dog height on spring side
dog_height0=11;
// Dog height on thorn side
dog_height1=8;
// Dog length
dog_length=9;
// Dog travel (nominal)
dog_travel_nominal=sprocket_pitch;
thorn_groove=max(thorn_min_groove, thorn_length+play*2-tape_thickness);
// Dog grip size
dog_grip=7;
// Dog advancing by bending (empirical)
dog_travel_bend=1.9; // afraid, that's empirical
/* [ Friction Wheel ] */
// Friction wheel number of wings
friction_wings=6;
friction_axle_diameter=(spool_axle_diameter+reel_axle-lever_axle_diameter);
friction_hex_diameter=friction_axle_diameter/cos(180/friction_wings)-extrusion_width;
// Friction wheel tension, additional radius [mm]
friction_tension=0.16; // [-0.2:0.01:0.8]
/* [ Extrusion Mount ] */
// Add the extrusion mount to the base plate
extrusion_mount_enabled=true;
// Extrusion unit size
extrusion_mount_unit=20;
// Extrusion overall width
extrusion_mount_w=20; // [20:20:40]
// Extrusion overall height
extrusion_mount_h=20; // [20:20:60]
// Extrusion mount front edge (from pick location)
extrusion_mount_edge_x=-50; // in my setup, the nozzle tip can just about reach the table edge
// but the camera is +30mm in Y, so plus extrusion = 50mm.
// Extrusion mount top edge (from pick location)
extrusion_mount_edge_y=-20;
// Extrusion center position in x
extrusion_mount_x=extrusion_mount_edge_x-pick_offset+extrusion_mount_w/2;
// Extrusion center position in y
extrusion_mount_y=extrusion_mount_edge_y-extrusion_mount_h/2;
// Hollow out the extrusion mount (left side)
extrusion_mount_hollow_out_left=false;
// Hollow out the extrusion mount (right side, vibrations may increase)
extrusion_mount_hollow_out_right=false;
// Mounting tension, also takes up some of the rounded corner
extrusion_mount_tension=0.3;
// Extrusion mount strength
extrusion_mount_strength=8;
// Extrusion inner slot size (5.68mm for OpenBuilds V-Slot)
extrusion_mount_slot_inner=5.68; // 5.68mm for OpenBuilds V-Slot
// Extrusion slot angle (45° for OpenBuilds V-Slot)
extrusion_mount_slot_angle=45;
// Extrusion slot thickness (1.8mm for OpenBuilds V-Slot)
extrusion_mount_slot_thickness=1.8;
// Extrusion mounting screw diameter (should not be necessary)
extrusion_mount_screw_diameter=4; // [3:M3, 4:M4, 5:M5]
/* [ Lock and Handle ] */
// Lock strength
extrusion_mount_lock_strength=8;
extrusion_mount_slot_outer=extrusion_mount_slot_inner
+extrusion_mount_slot_thickness*2*tan(90-extrusion_mount_slot_angle);
// Handle grip diameter
handle_diameter=22;
// Handle grip strength
handle_strength=6;
handle_lock_diameter=reel_axle;//extrusion_mount_slot_inner*2;
// Length of handle
handle_pull_length=82;
// Handle lock inner axle (set 0 to switch off)
handle_lock_inner_axle=1;
handle_lock_strength=handle_lock_diameter/2;
handle_pull_thickness=reel_wall-spool_wall_right-2*layer_height;
handle_lock_thickness=reel_width/2+handle_pull_thickness/2;
// Tension of the tip of the lock against the extrusion profile edge (includes taking up play)
handle_lock_tension=0.7;
// Squeeze-in tension of lock against the extrusion profile (includes taking up play)
handle_lock_squeeze=0.4;
// Handle lock angle from vertical
handle_lock_angle=22.5; // [10:0.01:35]
// Show the lock as released
handle_lock_debug=false;
// Distance of the lock from the extrusion
handle_lock_axle_dist=8;
handle_lock_axle_x=extrusion_mount_x-extrusion_mount_w/2-handle_lock_axle_dist;
handle_lock_axle_y=extrusion_mount_y+extrusion_mount_h/2+handle_lock_diameter/2;
handle_lock_edge_x=extrusion_mount_x-extrusion_mount_w/2+extrusion_mount_slot_thickness;
handle_lock_edge_y=extrusion_mount_y+extrusion_mount_h/2-extrusion_mount_unit/2
+extrusion_mount_slot_inner/2;
handle_pull_strength=handle_lock_diameter-2*e;
// Special play in cutout of lock
handle_lock_cutout_play=0.1;
/* [ Liteplacer Nozzle Adapter ] */
// Height where the shaft begins, from the feeder tape surface
nozzle_shaft_z=45;
// Shaft diameter
nozzle_shaft_diameter=15;
// Shaft length (to underside of nozzle mount plate)
nozzle_shaft_length=17;
// Nozzle to camera Y offset (for looking at the pick location - add some extra)
nozzle_to_camera_offset=30; // 26mm + 4mm reserve
// Actuator thingy play against feeder lever
nozzle_play=0.2;
// Nozzle tip minmum Safe Z (from feeder tape surface)
nozzle_safe_z=15;
// Cable tie width
cable_tie_width=3.8;
// Cable tie thickness
cable_tie_thickness=1.6;
// The depth of the slide-on groove to mount the actuator thingy on the head
nozzle_mount_groove=2;
// Play in the slide-on (can be negative to give strong mount)
nozzle_mount_attach_play=-0.1; // [-0.5:0.01:0.5];
/* [ Liteplacer Nozzle Adapter, Advanced ] */
// All these are Liteplacer specific and should not change
nozzle_mount_across=21;
nozzle_mount_diameter=31.8;
nozzle_mount_thickness=5;
nozzle_pulley_diameter=28;
nozzle_plate_thickness=2;
nozzle_plate_portrusion=1.5;
nozzle_mount_screw_dist=22;
nozzle_mount_screw_nut=6;
nozzle_mount_screw_height=4.5;
nozzle_adapter_strength=wall+extrusion_width;
nozzle_travel_z=lever_axle_diameter+wall; // nozzle tip vertical travel when lever is inserted
nozzle_actuation_z=nozzle_safe_z-nozzle_travel_z; // nozzle tip height at which the lever is actuated
nozzle_actuation_travel=lever_axle_diameter+6.5; // nozzle tip horizontal travel when lever is actuated
nozzle_actuation_dist=-nozzle_actuation_travel-(lever_axle_x-pick_offset)-lever_feed_x;
//nozzle_mount_diameter/2+nozzle_plate_portrusion;
nozzle_actuation_dist_z=nozzle_actuation_z+nozzle_shaft_z-lever_feed_y-lever_axle_y;
nozzle_shaft_actuation_z=lever_axle_y+lever_feed_y+nozzle_actuation_dist_z;
nozzle_insert_slant=lever_strength-lever_axle_diameter;
nozzle_tape_pos=emboss+tape_width/2+sprocket_gap/2;
/* [ Test Print ] */
// Print the test axle
test_axle=true;
// How many nuts with different play
test_nuts=6;
// Minimum play
test_play_min=-0.04;
// Increment in play
test_play_inc=0.02;
// Height of the nuts
test_height=12;
// Height of the plate
test_thickness=base_thickness-emboss;
/* [Hidden] */
// calculations --------------------------------------------------
debug_eff = debug && $preview;
// DIN 912
screw_dk=([5.5, 7, 8.5])[extrusion_mount_screw_diameter-3];
screw_k=([3, 4, 5])[extrusion_mount_screw_diameter-3];
// Phase II play compansation (use of this is curently not recommended).
phase2_play=0.00;
echo("Overall Size:", reel_width+reel_holder_thickness);
reel_axle_wall=(reel_axle-lever_axle_diameter)/2;
// position of the reel axle within the constraints
reel_x=extrusion_mount_x-extrusion_mount_w/2-reel_dist-reel_diameter/2;
reel_y=spool_axle_y-sqrt(pow(reel_diameter/2+spool_outer_diameter/2+reel_dist_spool, 2)
-pow((spool_axle_x-pick_offset)-reel_x, 2));
hanger_reel_axle_angle=
atan2(extrusion_mount_y+extrusion_mount_h/2-reel_y,
extrusion_mount_x+extrusion_mount_w/2-reel_x); // approx
hanger_connect_x = extrusion_mount_enabled ?
extrusion_mount_x-extrusion_mount_w/2-reel_holder_strength/2-extrusion_mount_strength/2
: (block_axle_x-pick_offset);
hanger_connect_y = extrusion_mount_enabled ?
extrusion_mount_y-extrusion_mount_h/2+reel_holder_strength/2+extrusion_mount_strength*1.25
: block_axle_y;
// rotation movement when hanging into extrusion
hanger_dx=extrusion_mount_w-extrusion_mount_slot_thickness;
hanger_dy=extrusion_mount_unit/2-extrusion_mount_slot_inner/2;
hanger_radius = distance(hanger_dx, hanger_dy);
hanger_y=extrusion_mount_y+extrusion_mount_h/2-hanger_dy;
hanger_angle = atan2(hanger_dy, hanger_dx)*2;
// some spool data
spool_ratchet_shield=ratchet_inner_diameter-spring_strength;
spool_dx=-spool_ratchet_shield/2+reel_holder_strength/2;
spool_reel_r=distance((spool_axle_x-pick_offset)-reel_x, spool_axle_y-reel_y);
spool_reel_a=atan2(spool_axle_y-reel_y, (spool_axle_x-pick_offset)-reel_x);
spool_reel_d=spool_ratchet_shield/2-reel_holder_strength/2;
spool_reel_da=asin(spool_reel_d/spool_reel_r/2)*2;
spool_reel_connect_x = reel_x+spool_reel_r*cos(spool_reel_a+spool_reel_da);
spool_reel_connect_y = reel_y+spool_reel_r*sin(spool_reel_a+spool_reel_da);
spool_width=spool_wall_left+tape_width-sprocket_gap+spool_wall_right;
spool_axle_groove_z=base_thickness-emboss+spool_width+2*layer_height;
spool_axle_groove_width=reel_holder_thickness+reel_width-spool_axle_groove_z;
dog_slant=dog_slant_ratio*(lever_axle_y+lever_tape_y-dog_nominal_y)
/(dog_nominal_x-(lever_axle_x-pick_offset)-lever_tape_x);
dog_slant_c=sqrt(1-dog_slant*dog_slant);
// TODO: do real contour without offset(+/-e) hack
dog_neck=[dog_slant*dog_height0-dog_length, dog_height0];
dog_r=dog_strength/2;
dog_contour = [
each arc(
[dog_slant*(dog_height0+dog_r)-dog_length-dog_r,
dog_height0+dog_r+extrusion_width],
[dog_slant*(dog_height0-dog_r)-dog_length-dog_r,
dog_height0-dog_r-+extrusion_width],
60),
each arc(
[dog_slant*(dog_height0-dog_r)-dog_length-dog_r,
dog_height0-dog_r-extrusion_width],
[-dog_r*2, 0],
-30),
[dog_r, 0],
each arc(
[dog_slant*dog_height1+dog_r,
dog_height1],
[dog_slant*dog_height1+dog_grip/2,
dog_height1+dog_grip/2-dog_r],
-90),
each arc(
[dog_slant*dog_height1+dog_grip/2,
dog_height1+dog_grip/2-dog_r],
[dog_slant*dog_height1+dog_grip/2,
dog_height1+dog_grip/2+dog_r],
180),
each arc(
[dog_slant*dog_height1+dog_grip/2,
dog_height1+dog_grip/2+dog_r],
[dog_slant*dog_height1-dog_r,
dog_height1+dog_slant_c*dog_r],
90),
];
dog_eff_x = debug_eff && ! relax_springs ? dog_nominal_x : dog_x;
dog_eff_y = debug_eff && ! relax_springs ? dog_nominal_y : dog_y;
dog_spring_bend_eff = debug_eff && ! relax_springs ?
dog_spring_bend :
dog_spring_bend+dog_tension_angle;
inset_edge=min(base_tape_edge, reel_wall-layer_height);
inset_height=tape_width+reel_wall-layer_height;
inset_flipped = ! debug_eff;
//side_ramp=reel_wall+min(tape_emboss, tape_min_margin);
standard_tape_chute_fixture_x = extrusion_mount_edge_x+extrusion_mount_unit+extrusion_mount_strength/2+fixture_axle/2;
tape_chute_fixture_x= (pick_offset > (extrusion_mount_w - extrusion_mount_unit)) ?
standard_tape_chute_fixture_x :
standard_tape_chute_fixture_x + (extrusion_mount_w - extrusion_mount_unit) - pick_offset;
tape_chute_fixture_y=-base_height-fixture_axle*0.75;
tape_chute_fixture_strength=fixture_axle*0.6;
tape_chute_end_angle=90-tape_chute_angle;
tape_chute_end_x=base_end+cos(tape_chute_end_angle)*tape_chute_diameter/2;
tape_chute_end_y=(sin(tape_chute_end_angle)-1)*tape_chute_diameter/2;
tape_chute_reverse_x=tape_chute_end_x+cos(tape_chute_end_angle)*tape_chute_reverse_diameter/2;
tape_chute_reverse_y=tape_chute_end_y+sin(tape_chute_end_angle)*tape_chute_reverse_diameter/2;
tape_chute_knee_x=tape_chute_fixture_x;
tape_chute_knee_y=extrusion_mount_y+extrusion_mount_h/2-extrusion_mount_unit/2;
tape_chute_contour = [
[inset_edge-bevel_z, -base_thickness+emboss],
[inset_edge, -base_thickness+emboss+bevel_z],
[inset_edge, emboss+tape_width+reel_wall-bevel_z],
[inset_edge-bevel_z, emboss+tape_width+reel_wall+e*2],
[-inset_edge+bevel_z, emboss+tape_width+reel_wall+e*2],
[-inset_edge, emboss+tape_width+reel_wall-bevel_z],
[-inset_edge, emboss+tape_width_eff_chute+bevel_z],
[-inset_edge+bevel_z, emboss+tape_width_eff_chute],
[0, emboss+tape_width_eff_chute],
[0, emboss-tape_chute_play],
[-emboss+tape_chute_play, 0],
[-emboss+tape_chute_play, -base_thickness+emboss+bevel_z],
[-emboss+tape_chute_play+bevel_z, -base_thickness+emboss],
];
tape_chute_reverse_ramp=min(sprocket_margin+base_thickness, tape_max_height);
tape_chute_reverse_contour = [
[-tape_max_height-inset_edge+bevel_z, -base_thickness+emboss],
[-tape_max_height-inset_edge, -base_thickness+emboss+bevel_z],
[-tape_max_height-inset_edge, emboss+tape_width+reel_wall-bevel_z],
[-tape_max_height-inset_edge+bevel_z, emboss+tape_width+reel_wall+2*e],
[inset_edge-bevel_z, emboss+tape_width+reel_wall+e*2],
[inset_edge, emboss+tape_width+reel_wall-bevel_z],
[inset_edge, -base_thickness+emboss+bevel_z],
[inset_edge-bevel_z, -base_thickness+emboss],
[0, -base_thickness+emboss],
[0, emboss+tape_width+reel_wall-layer_wall],
[-tape_max_height, emboss+tape_width+reel_wall-layer_wall],
[-tape_max_height, -base_thickness+emboss+layer_wall+filet],
[-tape_max_height+filet, -base_thickness+emboss+layer_wall],
[-filet, -base_thickness+emboss+layer_wall],
[0, -base_thickness+emboss+layer_wall+filet],
[0, -base_thickness+emboss],
];
module pivot_chute(cutout=false) {
for (a = [0, cutout ? 1 : 0]) {
translate([tape_chute_fixture_x, tape_chute_fixture_y])
rotate((a)*tape_chute_pivot_angle)
translate([-tape_chute_fixture_x, -tape_chute_fixture_y]) {
children();
}
}
}
// build --------------------------------------------------
module spent_tape_chute(cutout=false, play=0) {
// fixture for spent tape chute
if (extrusion_mount_enabled) {
debug_a = cutout ? 0 : ((debug_eff && tape_chute_pivot_debug) ? 1 : 0);
tensioned_mode = (cutout || (debug_eff && ! relax_springs));
tape_chute_angle_eff = tensioned_mode ? tape_chute_angle :
tape_chute_angle + tape_chute_tension_angle;
tape_chute_diameter_eff = tensioned_mode ? tape_chute_diameter :
tape_chute_diameter*tape_chute_angle/tape_chute_angle_eff;
first_bend_cx =
tape_chute_end_x-cos(tape_chute_end_angle)*tape_chute_diameter_eff/2;
first_bend_cy =
tape_chute_end_y-sin(tape_chute_end_angle)*tape_chute_diameter_eff/2;
tape_chute_tension_angle_eff = tensioned_mode ? 0 : tape_chute_tension_angle;
snout_x = first_bend_cx+cos(tape_chute_tension_angle_eff+90)*tape_chute_diameter_eff/2;
snout_y = first_bend_cy+sin(tape_chute_tension_angle_eff+90)*tape_chute_diameter_eff/2;
difference() {
union() {
// axle
translate([0, 0, emboss]) {
beveled_extrude(height=tape_width+reel_wall+e*2, angle=cutout?135:45,
bevel=bevel_z, convexity=6) {
translate([tape_chute_fixture_x, tape_chute_fixture_y])
circle_p(d=fixture_axle+play);
}
}
translate([tape_chute_fixture_x, tape_chute_fixture_y, 0])
rotate([0, 0, debug_a*tape_chute_pivot_angle])
translate([-tape_chute_fixture_x, -tape_chute_fixture_y, 0]) {
// side structures and pivot leg
translate([0, 0, emboss+tape_width_eff_chute]) {
beveled_extrude(height=reel_wall-tape_width_adjust_chute+e*2, angle=cutout?135:45, bevel=bevel_z, convexity=6) {
pivot_chute(cutout) {
intersection() {
union() {
// connection to chute
hull() {
translate([tape_chute_fixture_x, tape_chute_fixture_y])
circle_p(r=tape_chute_fixture_strength+play/2);
translate([tape_chute_knee_x, tape_chute_knee_y])
circle_p(r=tape_chute_fixture_strength+play/2);
}
hull() {
translate([tape_chute_knee_x, tape_chute_knee_y])
circle_p(r=tape_chute_fixture_strength+play/2);
translate([tape_chute_end_x, tape_chute_end_y])
circle_p(r=tape_chute_fixture_strength*2-inset_edge+play/2);
}
// little thingy to lock to feeder snout
translate([snout_x, snout_y])
rotate(tape_chute_tension_angle_eff*0.66) // don't rotate all the way
translate([-base_end, -0]) {
d=tape_chute_fixture_strength;
polygon([
[base_end, 0],
[base_end, -base_height-d+play],
each arc(
[base_end-tape_chute_fixture_strength/5,
-base_height-d+play],
[base_end-tape_chute_fixture_strength/5,
-base_height-d-tape_chute_fixture_strength-play],
210),
[base_end, -base_height-d-tape_chute_fixture_strength-play],
each arc(
[base_end, -base_height-d-tape_chute_fixture_strength],
[base_end+base_height+d+tape_chute_fixture_strength, 0],
90),
]);
}
}
// intersection contour
hull() {
translate([first_bend_cx, first_bend_cy])
circle_p(d=tape_chute_diameter_eff+2*inset_edge-bevel_z);
translate([tape_chute_knee_x, tape_chute_knee_y])
circle_p(d=tape_chute_fixture_strength*2);
translate([tape_chute_fixture_x, tape_chute_fixture_y])
circle_p(r=tape_chute_fixture_strength*2);
}
}
}
}
}
// actual chute
if (!cutout) {
// first bend
translate([first_bend_cx, first_bend_cy, 0])
rotate([0, 0, 90-tape_chute_angle-e]) {
rotate_extrude(angle=tape_chute_angle_eff+e, $fn=fn_by_err(tape_chute_diameter_eff/2)) {
translate([tape_chute_diameter_eff/2, 0])
polygon(tape_chute_contour);
}
}
// second bend
translate([tape_chute_reverse_x, tape_chute_reverse_y, 0])
rotate([0, 0, tape_chute_end_angle]) {
rotate_extrude(angle=tape_chute_reverse_angle,
$fn=fn_by_err(tape_chute_reverse_diameter/2)) {
translate([-tape_chute_reverse_diameter/2, 0]) {
polygon(tape_chute_reverse_contour);
}
}
}
}
}
}
union() {
// bevel entry into chute
bevel_angle=(inset_edge-extrusion_width)/tape_chute_diameter_eff*360/PI;
bevel_dx=sin(bevel_angle)*tape_chute_diameter_eff/2;
bevel_dy=(1-cos(bevel_angle))*tape_chute_diameter_eff/2+_fp;
translate([snout_x, snout_y, 0])
rotate([0, 0, tape_chute_tension_angle_eff]) // don't rotate all the way
translate([-base_end, 0, 0]) {
hull() {
translate([base_end+bevel_dx, -tape_max_height-bevel_dy, emboss-tape_chute_play])
cube([e, tape_max_height, tape_width_eff_chute+tape_chute_play]);
translate([base_end-1, -tape_max_height-extrusion_width, 0])
cube([1, tape_max_height+inset_edge, emboss+tape_width_eff_chute+bevel_z+layer_height]);
/*
[base_end-e, inset_edge-extrusion_width],
[base_end+inset_edge*4, -inset_edge],
[base_end-e, -inset_edge],
]);*/
}
}
translate([0, 0, -base_thickness+emboss-e]) {
linear_extrude(height=base_thickness+tape_width+reel_wall+4*e) {
// flat end of chute
r=(tape_chute_reverse_diameter/2+tape_max_height+inset_edge-bevel_z);
tape_chute_reverse_end_x=tape_chute_reverse_x
+cos(180+tape_chute_end_angle+tape_chute_reverse_angle)*r;
tape_chute_reverse_end_y=tape_chute_reverse_y
+sin(180+tape_chute_end_angle+tape_chute_reverse_angle)*r;
polygon([
[tape_chute_reverse_x,
tape_chute_reverse_end_y],
[tape_chute_reverse_end_x,
tape_chute_reverse_end_y],
[tape_chute_reverse_end_x-inset_edge*2,
tape_chute_reverse_end_y+inset_edge*2],
[tape_chute_reverse_end_x-inset_edge*2,
tape_chute_reverse_end_y-tape_max_height],
[tape_chute_reverse_x,
tape_chute_reverse_end_y-tape_max_height],
]);
}
}
}
}
}
}
if (do_tape_chute) {
translate([
debug_eff ? 0 : -base_height+gap*2,
debug_eff ? 0 : base_end+(extrusion_mount_y+extrusion_mount_h/2)-tape_chute_fixture_strength-gap*3.5,
debug_eff ? 0 : tape_width+reel_wall+emboss+e*2
]) {
rotate([debug_eff ? 0 : 180, 0, debug_eff ? 0 : -75]) {
color([1, 0.5, 0.0, 0.5])
render_preview(convexity=20)
spent_tape_chute(play=-fixture_play);
}
}
}
function test_play(i) =
(i == 0 ? 0 : (test_play_min+(i-1)*test_play_inc));
if (do_test_print) {
test_outer=lever_axle_diameter+2*reel_axle_wall;
test_step=test_outer+gap;