sma rigid with possibility of embedded USB sound card
This commit is contained in:
		
							parent
							
								
									ee74b758d9
								
							
						
					
					
						commit
						320b0aae0f
					
				| @ -15,9 +15,8 @@ Also, Python codes are provided for the calibration of the Spherical Microphone | ||||
| 
 | ||||
| # opensCAD designs | ||||
| The designs are in the `cad` folder: | ||||
| - `sma_open.scad` for open SMA configuration with cylindrical shaped microphones, | ||||
| - `sma_rigid.scad` for rigid SMA configuration with cylindrical shaped microphones, | ||||
| - `sma_rigid_mchstreamer.scad` for rigid SMA configuration with digital MEMS microphone and embedded USB sound card. | ||||
| - `sma_open.scad` for open SMA configuration, | ||||
| - `sma_rigid.scad` for rigid SMA configuration, | ||||
| 
 | ||||
| Examples of SMA configurations are provide in `.json` files. | ||||
| See the documentation in `.scad` files to create or customize a SMA design. | ||||
|  | ||||
| @ -1,10 +1,8 @@ | ||||
| /* | ||||
|  * Rigid SMA design for cylindrical microphone capsules | ||||
|  * Rigid SMA design | ||||
|  * Copyright 2023 Pierre Lecomte - sekisushai@gmail.com | ||||
|  */ | ||||
| 
 | ||||
| include <threads.scad> | ||||
| 
 | ||||
| /* | ||||
| The rigid SMA is composed of two hemispherical shells to render separately for 3D printing. | ||||
| */ | ||||
| @ -19,7 +17,7 @@ res = 32; | ||||
| 
 | ||||
| /*[ Array parameters ]*/ | ||||
| // sphere radius (mm): | ||||
| r = 60; | ||||
| r = 80; | ||||
| 
 | ||||
| // shell thickness (mm): | ||||
| e = 6; | ||||
| @ -30,6 +28,12 @@ theta = [0, 90, 90, 90, 90, 180, 54.7356, 54.7356, 54.7356, 54.7356, 125.264, 12 | ||||
| // microphone azimuth coordinates (°): | ||||
| phi = [0, 0, 90, 180, 270, 0, 45, 135, 225, 315, 45, 135, 225, 315]; | ||||
| 
 | ||||
| // microphone type | ||||
| mic_type = "1/4"; // [1/4:Quarter_Inch, PDM:PDM MEMS] | ||||
| 
 | ||||
| // include USB sound card (only for digital MEMS mics) | ||||
| usb_card = true; | ||||
| 
 | ||||
| /* the microphone array can be rotated to be in accordance with the array cut and mic stand position | ||||
| */ | ||||
| // microphones global rotation (°): | ||||
| @ -69,6 +73,7 @@ The mic stand threaded hole should be close to the passing cable hole. It's dire | ||||
| dir_thread = [13, 0]; | ||||
| 
 | ||||
| // DO NOT EDIT BELOW HERE | ||||
| include <threads.scad> | ||||
| 
 | ||||
| // Hollow sphere | ||||
| module hollow(r1=r-e, r2=r, fn1=$fn, fn2=$fn){ | ||||
| @ -78,8 +83,7 @@ module hollow(r1=r-e, r2=r, fn1=$fn, fn2=$fn){ | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| // Torus for "joint torique" for B&K 1/4" mics | ||||
| 
 | ||||
| // Torus for O-ring for 1/4" mics | ||||
| module b_k(){ | ||||
| mirror([0,0,-1]) | ||||
| rotate_extrude($fn=32){ | ||||
| @ -91,12 +95,69 @@ square([3.55, 1.1*e]); | ||||
| } | ||||
| } | ||||
| 
 | ||||
| module mics(){ | ||||
| // Adafruit PDM MEMS breakout.  | ||||
| // https://www.adafruit.com/product/3492 | ||||
| module pdm_breakout(l=14-5, w=13-5){ | ||||
| $fn=64; | ||||
| 
 | ||||
| translate([-l/2,-w/2,-5]){ | ||||
| 
 | ||||
| // big condo | ||||
| linear_extrude(7){ | ||||
| translate([l/2+4.5,w/2,0]) | ||||
| square([3,4],center=true); | ||||
| } | ||||
| 
 | ||||
| // small condo | ||||
| linear_extrude(5.75){ | ||||
| translate([l/2+2.75,w/2,0]) | ||||
| square([3,4],center=true); | ||||
| } | ||||
| 
 | ||||
| // tiny resistor | ||||
| linear_extrude(5.5){ | ||||
| translate([l/2-2.9,w/2+1,0]) | ||||
| square([3,2],center=true); | ||||
| } | ||||
| 
 | ||||
| // mic | ||||
| linear_extrude(6){ | ||||
| translate([l/2,w/2-0.5,0]) | ||||
| square([3.5,4.5],center=true); | ||||
| } | ||||
| linear_extrude(50){ | ||||
| translate([l/2,w/2,0]) | ||||
| circle(d=2); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // wires | ||||
| translate([0,0,5]) | ||||
| linear_extrude(2){ | ||||
| translate([l/2,w,0]) | ||||
| square([l+4,2.5],center=true); | ||||
| } | ||||
| 
 | ||||
| linear_extrude(5){ | ||||
| difference(){ | ||||
| minkowski(){ | ||||
| square([l,w]); | ||||
| circle(2.6); | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| 
 | ||||
| module mics(type){ | ||||
|         rotate(mics_rotate) | ||||
| for (i = [0 : len(theta)-1]){ | ||||
|     rotate([theta[i], 0, phi[i]]) | ||||
|     translate([0, 0, r-e+1]){ | ||||
|         if (type=="1/4") | ||||
|     b_k(); | ||||
|         else  | ||||
|     pdm_breakout(); | ||||
|     translate([3,3,e-1.8]) | ||||
|         linear_extrude(3) | ||||
|     text(str(i+1), size=3); | ||||
| @ -104,6 +165,45 @@ for (i = [0 : len(theta)-1]){ | ||||
| } | ||||
| } | ||||
| 
 | ||||
| module mchstreamer(){ | ||||
|     $fn=64; | ||||
|     adj = 0.2; // adjustment | ||||
|     // usb_cart dimensions | ||||
|     w_usb = 40+adj; | ||||
|     l_usb = 60+adj; | ||||
|     h_usb = 15+adj; | ||||
|     attach_l = 20; | ||||
|     attach_w = 7.3 + adj; | ||||
|     attach_h = 8.2+adj; | ||||
|     rotate([0,-90,90]) | ||||
|     translate([r-l_usb-attach_l/2,-w_usb/2,-h_usb/2]) | ||||
|     union(){ | ||||
|     cube(size = [l_usb, w_usb, h_usb], center = false); | ||||
|         plug_l = 20; | ||||
|         plug_w = 12+adj; | ||||
|         plug_h = 10.7+adj; | ||||
|         translate([l_usb - plug_l/2, w_usb/2 - plug_w/2, 1.8+adj]) | ||||
|         cube(size = [1.5*plug_l, plug_w, plug_h], center =false); | ||||
|         translate([l_usb - attach_l + 2, 1, 2.4+adj]) | ||||
|         attach(); | ||||
|         translate([l_usb - attach_l + 2, w_usb - attach_h -1, 2.4+adj]) | ||||
|         attach(); | ||||
|         translate([w_usb + 2, 0, 0]) | ||||
|         cube(size=[attach_l, w_usb, 2.7]); | ||||
|       | ||||
|     } | ||||
|     module attach(){ | ||||
| 
 | ||||
|     rotate([0, 90, 0]){ | ||||
|         translate([-attach_w/2, attach_h/2, attach_l/2]){ | ||||
| union(){ | ||||
|         cube(size=[attach_w, attach_h, attach_l], center = true); | ||||
|         cylinder(r=1.5, h=2*attach_l ); | ||||
|     } | ||||
|     }} | ||||
| } | ||||
| } | ||||
| 
 | ||||
| module bottom_shell(r1= r-e, r2=r-e/2, r3=r, delta=0.2) { | ||||
|     union(){ | ||||
|     difference(){ | ||||
| @ -155,8 +255,12 @@ cylinder(d=param[1]+0.2, h=param[0]+1, $fn=6); | ||||
| } | ||||
| 
 | ||||
| module attach() { | ||||
| rotate([(angle_min+angle_max)/2,0,hole_phi_offset]) | ||||
| rotate([(angle_min+angle_max)/2,0,hole_phi_offset]){ | ||||
| if (usb_card==false) | ||||
| cylinder(d=d_hole, h=100); | ||||
| else | ||||
| mchstreamer(); | ||||
|     } | ||||
| rotate([(angle_min+angle_max)/2 + dir_thread[0],0, hole_phi_offset + dir_thread[1]]) | ||||
| translate([0,0,(r-3*e)]) | ||||
| render() | ||||
| @ -181,7 +285,7 @@ difference(){ | ||||
| bottom_shell(); | ||||
| attach(); | ||||
| vis_all(); | ||||
| mics();  | ||||
| mics(mic_type);  | ||||
| } | ||||
| } | ||||
| 
 | ||||
| @ -189,7 +293,7 @@ module top_shell_all(){ | ||||
| difference(){ | ||||
| top_shell(); | ||||
| attach(); | ||||
| mics(); | ||||
| mics(mic_type); | ||||
| vis_all(); | ||||
| } | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user