Skip to content

Commit

Permalink
update the filter to camera attach designs
Browse files Browse the repository at this point in the history
  • Loading branch information
Prosimio committed Dec 30, 2023
1 parent 79e8b20 commit 6c780a4
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
////////////////////////////////////
// Parameters //

// This values have to be the same as in the filter holder to them to be compatible
// This values have to be the same as in the filter holder to be compatibles
ri = 12.6;
side_thick = 1*1.2 ; // 1.2 times to let the clam enter
side_thick = 1*1.2 ; // 1.2 times to let enter the clamp
h_clam = 2;
h = h_clam * 2;
thick_frac = 0.4 ; // free space fraction of clam thickness
Expand All @@ -23,9 +23,11 @@ angles2 = [20,140,260]; // 2 more degree to let the clam enter
///////////////
//wheel values

r_wheel = 20; //wheel radii
w_thick = 3;
thoot_size = 2; //
re_wheel = 16; //wheel external radii
ri_wheel = 14; // wheel internal radii
w_thick = 3; // wheel height (z axis)
nt = 20; // number of thoot
//thoot_size = 5; //

/////////////////
// M12 aperture
Expand Down Expand Up @@ -56,23 +58,40 @@ for(ang = angles){
}

module wheel(){
// to create the wheel
tooth_ang = 360/nt; //angle per each gear tooth
end_ang = 360 - tooth_ang;

tw = sin(tooth_ang/2)*ri_wheel;
tr = cos(tooth_ang/2)*ri_wheel;
th = re_wheel - tr;

difference(){

union(){
for(ang = [0:10:350]){
rotate([0,0,ang])
translate([0, 0, 0])
linear_extrude(height = w_thick, center = true, convexity = 10, twist = 0)
polygon(points=[[0,-r_wheel*3/4],[0,r_wheel*3/4],[r_wheel,0]]);
}
translate([0,0,w_thick/2])
linear_extrude(height = aperture_h, center = true, convexity = 10, twist = 0,$fn = 100)
circle(M12_re);
}

translate([0,0,w_thick/2])
linear_extrude(height = aperture_h*1.5, center = true, convexity = 10, twist = 0,$fn = 100)
circle(M12_ri);
// M12 ring
translate([0,0,w_thick/2])
cylinder(h=w_thick, r=ri_wheel, $fn=100, center =true);

// gear teeth
for(ang = [0:tooth_ang:end_ang]){
rotate([0,0,ang])
translate([0,tr,w_thick/2])
linear_extrude(height = w_thick, center = true, convexity = 2, twist = 0)
polygon(points=[[tw,0],[-tw,0],[0,th]]);
}
/*
// in this case the spikes starts from center. polygon(points=[[0,-re_wheel*3/4],[0,re_wheel*3/4],[re_wheel,0]]);
}
*/

// M12 ring
translate([0,0,aperture_h/2])
cylinder(h=aperture_h, r=M12_re, $fn=100, center =true);
}
// central hole
translate([0,0,w_thick/2])
cylinder(h=aperture_h*1.5, r=M12_ri, $fn=100, center =true);
/*
intersection(){
translate([0,0,w_thick/2])
Expand All @@ -82,11 +101,11 @@ circle(M12_re-1);
clam_space(M12_re, free_M12 ,total_h, angles_M12);
}
*/
}
}
}


module clam(){
module clamp(){

difference(){
linear_extrude(height = h, center = true, convexity = 10, twist = 0,$fn = 100)
Expand All @@ -108,14 +127,21 @@ circle(ri);
}

}
///////////////////////////
// Create the focus knob //

difference(){
translate([0,0,w_thick/2])
wheel();
translate([0,0,-h/2+h_clam])
clam();

module WS_camera(){
difference(){
//translate([0,0,w_thick/2])
wheel();
translate([0,0,-h/2+h_clam])
clamp();
}
}

///////////////////////////
// Create the focus knob //
///////////////////////////

// Uncomment to generate the different versions of the module

//WS_camera();
Original file line number Diff line number Diff line change
Expand Up @@ -15,55 +15,110 @@ side_thick = 1 ;
filter_thick = 3;
filter_free_space = 0.5;
bottom_thick = 0.8;
sheet = 1; // sheet tickness to support the filter

rb = ri-sheet; // internal hole radius
re = ri +side_thick; // External radius

h_fs = filter_thick +filter_free_space + bottom_thick; //base filter support heigh

// HQ camera
r_hq = 15; // HQ camera radius
h_ring = 3; // Height of the ring attached to the camera

// RPI V2 camera


// Clamp support system for waveshare camera
h_clam = 2;
free_clam_space = 10;
angles1 = [0,120,240];
angles2 = [15,135,255];

rb = ri-1;
re = ri +side_thick;
h_int = h_clam + filter_thick +filter_free_space; //internal h
h_ext = h_clam + filter_thick +filter_free_space + bottom_thick; //external h

h_WS = h_fs + h_clam; // for waveshare

////////////////////////////////////

module clam_space(length, wide, thickness, angles){

for(ang = angles){
rotate([0,0,ang])
translate([length/2, 0, 0])
cube([length, wide, thickness], center = true);
}
for(ang = angles){
rotate([0,0,ang])
translate([length/2, 0, 0])
cube([length, wide, thickness], center = true);
}
}



////////////////////////
// Create the holder //

module filter_support(h){
difference(){
linear_extrude(height = h, center = true, convexity = 10, twist = 0,$fn = 100)
circle(re);

translate([0,0,bottom_thick])
linear_extrude(height = h, center = true, convexity = 10, twist = 0,$fn = 100)
circle(ri);

translate([0,0,-bottom_thick]) linear_extrude(height = h, center = true, convexity = 10, twist = 0,$fn = 100)
circle(rb);
}
}

module fsup_WS_clamp(h){
difference(){
linear_extrude(height = h_ext, center = true, convexity = 10, twist = 0,$fn = 100)
circle(re);
translate([0,0,bottom_thick])
linear_extrude(height = h_int*1.1, center = true, convexity = 10, twist = 0,$fn = 100)

circle(ri);
translate([0,0,-bottom_thick]) linear_extrude(height = h_int*1.1, center = true, convexity = 10, twist = 0,$fn = 100)
circle(rb);
translate([0,0,h_ext/2-h_clam/2 - h_clam/4])

filter_support(h);

// Clamp system
translate([0,0,h/2-h_clam/2 - h_clam/4])
clam_space(re*1.5, free_clam_space ,h_clam/2, angles1);

translate([0,0,h_ext/2-0.8*h_clam/2.1])
intersection() {
translate([0,0,h/2-0.8*h_clam/2.1])
intersection() {

clam_space(re*1.5, free_clam_space ,h_clam*0.8, angles1);
clam_space(re*1.5, free_clam_space ,h_clam*0.8, angles1);

clam_space(re*1.5, free_clam_space ,h_clam*0.8, angles2);
clam_space(re*1.5, free_clam_space ,h_clam*0.8, angles2);
}
}
}


module fsup_HQ(h){
h_total = h + bottom_thick + h_ring;

difference(){
union(){
filter_support(h);

//union ring
translate([0,0,(h-bottom_thick)/2])
cylinder(h=bottom_thick, r=r_hq+side_thick, $fn=100, center =true);

//ring attached to HQ camera
translate([0,0,(h+h_ring)/2])
difference(){
cylinder(h=h_ring, r=r_hq+side_thick, $fn=100, center =true);
cylinder(h=h_ring, r=r_hq, $fn=100, center =true);
}
}
translate([0,0,bottom_thick+h/2])
cylinder(h=h_total, r=ri, $fn=100, center =true);
}

}

module fsup_rpiv2(h){
union(){
filter_support(h);

}
}

// Uncomment the module you wanna generate
//fsup_WS_clamp(h_WS);
//filter_support(h_WS);
fsup_HQ(h_fs);

0 comments on commit 6c780a4

Please sign in to comment.