Browse Source

Edited the illuminator, so it fits the new PCB.

master
Maximilian Stiefel 7 years ago
parent
commit
db47ec5950
  1. 97
      cad/mechanics_rev6/housing/box.scad
  2. 58
      cad/mechanics_rev6/housing/box_female.scad
  3. 25454
      cad/mechanics_rev6/housing/box_female.stl
  4. 64
      cad/mechanics_rev6/housing/box_male.scad
  5. 25566
      cad/mechanics_rev6/housing/box_male.stl
  6. 132
      cad/mechanics_rev6/housing/dimensions.scad
  7. 79
      cad/mechanics_rev6/housing/lid_f_b.scad
  8. 82882
      cad/mechanics_rev6/housing/lid_front.stl
  9. 62
      cad/mechanics_rev6/housing/lid_l_r.scad
  10. 15990
      cad/mechanics_rev6/housing/lid_l_r.stl
  11. 89938
      cad/mechanics_rev6/housing/lid_rear.stl
  12. 59
      cad/mechanics_rev6/housing/lid_t_b.scad
  13. 9702
      cad/mechanics_rev6/housing/logo.dxf
  14. BIN
      cad/mechanics_rev6/housing/logo.png
  15. 2412
      cad/mechanics_rev6/housing/logo_taylored.dxf
  16. BIN
      cad/mechanics_rev6/housing/logo_taylored.png
  17. 89
      cad/mechanics_rev6/housing/main.scad
  18. 77
      cad/mechanics_rev6/housing/main2.scad
  19. 41
      cad/mechanics_rev6/housing/open_box.scad
  20. 31
      cad/mechanics_rev6/housing/oring.scad
  21. 30
      cad/mechanics_rev6/housing/roundy.scad
  22. BIN
      cad/mechanics_rev6/housing/screenshot_closed.png
  23. BIN
      cad/mechanics_rev6/housing/screenshot_cut_closed.png
  24. BIN
      cad/mechanics_rev6/housing/screenshot_cut_open.png
  25. BIN
      cad/mechanics_rev6/housing/screenshot_female.png
  26. BIN
      cad/mechanics_rev6/housing/screenshot_male.png
  27. BIN
      cad/mechanics_rev6/housing/screenshot_open.png
  28. 24
      cad/mechanics_rev6/housing/screw_holes.scad
  29. 30
      cad/mechanics_rev6/housing/screw_sinkings.scad
  30. 59
      cad/mechanics_rev6/pcb/dimensions.scad
  31. 60
      cad/mechanics_rev6/pcb/glass_holder.scad
  32. 8570
      cad/mechanics_rev6/pcb/glass_holder.stl
  33. 5770
      cad/mechanics_rev6/pcb/illuminator.stl
  34. 50
      cad/mechanics_rev6/pcb/led_illuminator.scad
  35. 1038
      cad/mechanics_rev6/pcb/leg.stl
  36. 43
      cad/mechanics_rev6/pcb/legs.scad
  37. 56
      cad/mechanics_rev6/pcb/main.scad
  38. BIN
      cad/mechanics_rev6/pcb/screen_shot_1.png
  39. BIN
      cad/mechanics_rev6/pcb/screenshot_2.png
  40. 24
      cad/mechanics_rev6/pcb/screw_holes.scad
  41. 30
      cad/mechanics_rev6/pcb/screw_sinkings.scad
  42. 18
      pcbs/analog_board_v0.33/analog_board_v0.33.kicad_pcb
  43. 2
      pcbs/analog_board_v0.33/analog_board_v0.33.kicad_pcb-bak

97
cad/mechanics_rev6/housing/box.scad

@ -0,0 +1,97 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for the box without lids just to structure the code a bit better.
//
// Author: Maximilian Stiefel
// Last modification: 20.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module to make a nice round box
include <roundy.scad>
use <roundy.scad>
// Module for screw holes
include <screw_holes.scad>
use <screw_holes.scad>
// Module for orings
include <oring.scad>
use <oring.scad>
module box()
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
difference()
{
// Main body
roundy(housing_outside_width, housing_outside_depth, housing_outside_height);
union()
{
// Cut out basic inner shape
cube([housing_inside_width, housing_inside_depth, housing_inside_height], center = true);
// Cut out all six sides
// Left and right
cube([housing_inside_width + 3*housing_thickness, lid_l_r_width, lid_l_r_height], center = true);
// Front and back
cube([lid_f_b_width, housing_inside_depth + 3*housing_thickness, lid_f_b_height], center = true);
// Cut deepenings for lids
// Left and right
for(x = [-1, 1])
translate([x*housing_outside_width/2 - x*lids_depth/2 + x*0.1, 0, 0])
rotate([0, 90, 0])
roundy(lid_l_r_x, lid_l_r_y, lids_depth + 0.2, center = true);
// Front and back
for(y = [-1, 1])
translate([0, y*housing_outside_depth/2 - y*lids_depth/2 + y*0.1, 0])
rotate([90, 0, 0])
cube([lid_f_b_x, lid_f_b_y, lids_depth + 0.2], center = true);
// Screw holes
// Left and right
for(x = [-1, 1])
translate([x*housing_outside_width/2 - x*drill_depth_m3, 0, 0])
rotate([90, 0, 90])
screw_holes(lid_l_r_holes_x, lid_l_r_holes_y, drill_thread_dia_m3, 2*lids_depth);
// Front and back
for(y = [-1, 1])
translate([0, y*housing_outside_depth/2 - y*drill_depth_m3, 0])
rotate([90, 0, 0])
screw_holes(lid_f_b_holes_x, lid_f_b_holes_y, drill_thread_dia_m3, 2*lids_depth);
// O-rings
// Left and right
for(x = [-1, 1])
translate([x*housing_outside_width/2 - x*lids_depth - x*oring_channel_depth/2, 0, 0])
rotate([90, 0, 90])
oring(oring_l_r_x, oring_l_r_y, oring_channel_width, oring_channel_depth);
// Front and back
for(y = [-1, 1])
translate([0, y*housing_outside_depth/2 - y*lids_depth - y*oring_channel_depth/2, 0])
rotate([90, 0, 0])
oring(oring_f_b_x, oring_f_b_y, oring_channel_width, oring_channel_depth);
// Cut holes for battery holder
translate([battery_holder_pos_x, battery_holder_pos_y, 0.01 - (housing_inside_height + drill_depth_m3)/2])
cylinder(r = drill_thread_dia_m3/2, h = drill_depth_m3, center = true);
translate([battery_holder_pos_x - battery_holder_hole_dis_x, battery_holder_pos_y + battery_holder_hole_dis_y, 0.01 - (housing_inside_height + drill_depth_m3)/2])
cylinder(r = drill_thread_dia_m3/2, h = drill_depth_m3, center = true);
}
}
}

58
cad/mechanics_rev6/housing/box_female.scad

@ -0,0 +1,58 @@
/////////////////////////////////////////////////////////////////////////////////
// Female part of the box.
//
// Author: Maximilian Stiefel
// Last modification: 31.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module for raw box without any lids
include <box.scad>
use <box.scad>
// Module for screw holes
include <screw_holes.scad>
use <screw_holes.scad>
////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
// Set minimum angle of a fragment
//$fa = 0.5;
// Set minimum size of a fragment
//$fs = 0.5;
////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
module box_female()
{
//translate([0, 0, housing_outside_height/2])
//rotate([180, 0, 0])
{
difference()
{
// Draw hole box
box();
union()
{
// Cut off half of it
translate([0, 0, housing_outside_height/4])
cube([housing_outside_width + 1, housing_outside_depth + 1, housing_outside_height/2 + 0.01], center = true);
// Draw cylinders for mortise joint
translate([0, 0, -(mortise_joint_height + allowance5)/2])
screw_holes(housing_inside_width + housing_thickness/2, housing_inside_depth + housing_thickness/2, mortise_joint_dia + allowance1, mortise_joint_height + allowance5);
}
}
}
}

25454
cad/mechanics_rev6/housing/box_female.stl

File diff suppressed because it is too large

64
cad/mechanics_rev6/housing/box_male.scad

@ -0,0 +1,64 @@
/////////////////////////////////////////////////////////////////////////////////
// Male part of the box.
//
// Author: Maximilian Stiefel
// Last modification: 31.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module for raw box without any lids
include <box.scad>
use <box.scad>
// Module for screw holes
include <screw_holes.scad>
use <screw_holes.scad>
////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
// Set minimum angle of a fragment
//$fa = 0.5;
// Set minimum size of a fragment
//$fs = 0.5;
////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
module box_male(myColor1)
{
//translate([0, 0, housing_outside_height/2])
//rotate([180, 0, 0])
union()
{
rotate([180, 0, 0])
{
// Draw cylinders for mortise joint
translate([0, 0, (mortise_joint_height - mortise_joint_cone_height)/2 - 0.01])
screw_holes(housing_inside_width + housing_thickness/2, housing_inside_depth + housing_thickness/2, mortise_joint_dia, mortise_joint_height - mortise_joint_cone_height);
// Draw cones
for(x=[-0.5,+0.5])
for(y=[-0.5,+0.5])
translate([x*(housing_inside_width + housing_thickness/2), y*(housing_inside_depth + housing_thickness/2), mortise_joint_height - mortise_joint_cone_height/2 - 0.01])
cylinder(r1 = (mortise_joint_dia)/2, r2 = 1, mortise_joint_cone_height, center = true);
}
difference()
{
// Draw hole box
box();
// Cut off half of it
translate([0, 0, -housing_outside_height/4])
cube([housing_outside_width + 1, housing_outside_depth + 1, housing_outside_height/2 + 0.01], center = true);
}
}
}

25566
cad/mechanics_rev6/housing/box_male.stl

File diff suppressed because it is too large

132
cad/mechanics_rev6/housing/dimensions.scad

@ -0,0 +1,132 @@
/////////////////////////////////////////////////////////////////////////////////
// File for all dimensions, so they can be changed globally.
//
// Author: Maximilian Stiefel
// Last modification: 07.07.2017
/////////////////////////////////////////////////////////////////////////////////
// Allowance
allowance15 = 15;
allowance10 = 10;
allowance5 = 5;
allowance2 = 2;
allowance1 = 1;
allowance05 = 0.5;
// Dimensions battery holder
battery_holder_width = 53.5;
battery_holder_depth = 50.5;
battery_holder_height = 13;
// Dimensions motherboard
motherboard_width = 80;
motherboard_depth = 1.6;
motherboard_height = 50;
// Dimensions plugin boards
pluginboard_width = 80;
pluginboard_depth = 1.6;
pluginboard_height = 50;
// Dimensions magnet
extra_space_magnet = 10;
// Dimensions housing inside (cubic)
housing_inside_width = motherboard_width + allowance15;
housing_inside_depth = pluginboard_height + extra_space_magnet + allowance5;
housing_inside_height = motherboard_height + battery_holder_height + allowance10;
echo(housing_inside_width=housing_inside_width);
echo(housing_inside_depth=housing_inside_depth);
echo(housing_inside_height=housing_inside_height);
// Dimensions housing
housing_thickness = 12; // Make it thick to avoid light comming through the walls
housing_outside_width = housing_inside_width + 2*housing_thickness;
housing_outside_depth = housing_inside_depth + 2*housing_thickness;
housing_outside_height = housing_inside_height + 2*housing_thickness;
echo(housing_outside_width=housing_outside_width);
echo(housing_outside_depth=housing_outside_depth);
echo(housing_outside_height=housing_outside_height);
// Colors
myColor1 = "DodgerBlue";
myColor2 = "Maroon";
// Lids dimensions
lids_depth = housing_thickness/4;
echo(lids_depth=lids_depth);
lid_l_r_height = (3/4)*housing_inside_height;
lid_l_r_width = (3/4)*housing_inside_depth;
lid_l_r_overlap = (1.7)*housing_thickness;
lid_l_r_x = lid_l_r_height + lid_l_r_overlap;
lid_l_r_y = lid_l_r_width + lid_l_r_overlap;
lid_f_b_width = housing_inside_width - 10;
lid_f_b_height = housing_inside_height - 5;
lid_f_b_overlap = (1.7)*housing_thickness;
lid_f_b_x = lid_f_b_width + lid_f_b_overlap;
lid_f_b_y = lid_f_b_height + lid_f_b_overlap;
lid_t_b_width = housing_inside_width;
lid_t_b_height = housing_inside_depth;
lid_t_b_overlap = (1.7)*housing_thickness;
lid_t_b_x = lid_t_b_width + lid_t_b_overlap;
lid_t_b_y = lid_t_b_height + lid_t_b_overlap;
// Screw holes
drill_dia_m3 = 3.2;
drill_thread_dia_m3 = 4; // Diameter is adopted to metal thread which will be glued inside the hole
drill_depth_m3 = 5.5;
drill_sinking_dia1_m3 = 5.5 + allowance05;
drill_sinking_dia2_m3 = 3;
drill_sinking_height_m3 = 2;
echo(drill_depth_m3=drill_depth_m3);
lid_l_r_holes_x = lid_l_r_width + (6/10)*lid_l_r_overlap;
lid_l_r_holes_y = lid_l_r_height + (6/10)*lid_l_r_overlap;
lid_f_b_holes_x = lid_f_b_width + (6/10)*lid_f_b_overlap;
lid_f_b_holes_y = lid_f_b_height + (6/10)*lid_f_b_overlap;
lid_t_b_holes_x = lid_t_b_width + (6/10)*lid_t_b_overlap;
lid_t_b_holes_y = lid_t_b_height + (6/10)*lid_t_b_overlap;
motherboard_mounting_x = motherboard_width - 2*5;
motherboard_mounting_y = motherboard_height - 2*5;
motherboard_mounting_d = 6;
motherboard_mounting_h = 6;
motherboard_mounting_drill_depth = 5.5;
electronics_offset = 8;
// O-rings
oring_channel_depth = 1.2;
oring_channel_width = 2;
oring_l_r_x = lid_l_r_width + 2*oring_channel_width + 6;
oring_l_r_y = lid_l_r_height + 2*oring_channel_width + 6;
oring_f_b_x = lid_f_b_width + 2*oring_channel_width + 6;
oring_f_b_y = lid_f_b_height + 2*oring_channel_width + 6;
oring_t_b_x = lid_t_b_width + 2*oring_channel_width + 6;
oring_t_b_y = lid_t_b_height + 2*oring_channel_width + 6;
// Mortise joint
mortise_joint_height = 15;
mortise_joint_dia = 7;
mortise_joint_cone_height = 5;
// Dimensions battery holder
battery_holder_width = 53.5;
battery_holder_depth = 50.5;
battery_holder_height = 13;
battery_holder_hole_dis_x = 12.5;
battery_holder_hole_dis_y = 36.5;
battery_holder_pos_x = battery_holder_hole_dis_x/2;
battery_holder_pos_y = -battery_holder_hole_dis_y/2;

79
cad/mechanics_rev6/housing/lid_f_b.scad

@ -0,0 +1,79 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for the front and back lid.
//
// Author: Maximilian Stiefel
// Last modification: 28.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module to make a nice round box
include <roundy.scad>
use <roundy.scad>
// Module for screw holes
include <screw_holes.scad>
use <screw_holes.scad>
// Module for screw holes
include <screw_sinkings.scad>
use <screw_sinkings.scad>
module lid_f_b(logo, mounting)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
translate([0, 0, -lids_depth/2])
rotate([180, 0, 0])
difference()
{
// Main body for the lid
union()
{
// Actual lid
cube([lid_f_b_x - allowance05, lid_f_b_y - allowance05, lids_depth], center = true);
translate([0, 0, housing_thickness/2 - 0.01])
cube([lid_f_b_width - allowance05, lid_f_b_height - allowance05, housing_thickness - lids_depth], center = true);
// Mounting cylinders
translate([0, -electronics_offset, (housing_thickness - lids_depth/2 + motherboard_mounting_h/2 - 0.01)])
screw_holes(motherboard_mounting_x, motherboard_mounting_y, motherboard_mounting_d, mounting*motherboard_mounting_h);
}
union()
{
// Cut out cylindric holes for screws to mount the lid on the housing
screw_holes(lid_f_b_holes_x, lid_f_b_holes_y, drill_dia_m3, 2*lids_depth);
// Cut out sinking holes
translate([0, 0, -lids_depth/2 + drill_sinking_height_m3/2 + 0.5])
screw_sinkings(lid_f_b_holes_x, lid_f_b_holes_y, drill_sinking_dia1_m3, drill_sinking_dia2_m3, drill_sinking_height_m3);
// Cut out drill holes in mounting cylinders
translate([0, -electronics_offset, housing_thickness + motherboard_mounting_h - motherboard_mounting_drill_depth/2 - lids_depth/2 + 0.01])
screw_holes(motherboard_mounting_x, motherboard_mounting_y, drill_thread_dia_m3, mounting*(motherboard_mounting_drill_depth) );
// Logo
// Can be turned off by setting logo to 0
translate([-30, 20, -lids_depth/2 - 0.01 + 2])
rotate([180, 0, 0])
linear_extrude(height = logo*2)
scale(1.5)
import("logo_taylored.dxf");
// Text
translate([-40, 35, -lids_depth/2 - 0.01 + 2])
rotate([180, 0, 0])
linear_extrude(height = logo*2)
text("UppSense", size = 12, font = "Liberation Sans:style=Bold");
}
}
}

82882
cad/mechanics_rev6/housing/lid_front.stl

File diff suppressed because it is too large

62
cad/mechanics_rev6/housing/lid_l_r.scad

@ -0,0 +1,62 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for the left and right lid.
//
// Author: Maximilian Stiefel
// Last modification: 28.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module to make a nice round box
include <roundy.scad>
use <roundy.scad>
// Module for screw holes
include <screw_holes.scad>
use <screw_holes.scad>
// Module for screw holes
include <screw_sinkings.scad>
use <screw_sinkings.scad>
module lid_l_r()
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
rotate([0, 90, 0])
translate([0, 0, -lids_depth/2])
rotate([180, 0, 0])
difference()
{
// Main body for the lid
union()
{
roundy(lid_l_r_x - allowance05, lid_l_r_y - allowance05, lids_depth);
translate([0, 0, housing_thickness/2 -0.01])
cube([lid_l_r_height - allowance05, lid_l_r_width - allowance05, housing_thickness - lids_depth], center = true);
echo(housing_thickness=housing_thickness);
echo(lids_depth=lids_depth);
}
union()
{
// Cut out cylindric holes
screw_holes(lid_l_r_holes_y, lid_l_r_holes_x, drill_dia_m3, 2*lids_depth);
translate([0, 0, -lids_depth/2 + drill_sinking_height_m3/2 + 0.5])
screw_sinkings(lid_l_r_holes_y, lid_l_r_holes_x, drill_sinking_dia1_m3, drill_sinking_dia2_m3, drill_sinking_height_m3);
}
}
}

15990
cad/mechanics_rev6/housing/lid_l_r.stl

File diff suppressed because it is too large

89938
cad/mechanics_rev6/housing/lid_rear.stl

File diff suppressed because it is too large

59
cad/mechanics_rev6/housing/lid_t_b.scad

@ -0,0 +1,59 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for the top and bottom lid.
//
// Author: Maximilian Stiefel
// Last modification: 28.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module to make a nice round box
include <roundy.scad>
use <roundy.scad>
// Module for screw holes
include <screw_holes.scad>
use <screw_holes.scad>
// Module for screw holes
include <screw_sinkings.scad>
use <screw_sinkings.scad>
module lid_t_b()
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
translate([0, 0, -lids_depth/2])
rotate([180, 0, 0])
difference()
{
// Main body for the lid
union()
{
roundy(lid_t_b_x - allowance05, lid_t_b_y - allowance05, lids_depth);
translate([0, 0, housing_thickness/2 - 0.01])
cube([lid_t_b_width - allowance05, lid_t_b_height - allowance05, housing_thickness - lids_depth], center = true);
}
union()
{
// Cut out cylindric holes
screw_holes(lid_t_b_holes_x, lid_t_b_holes_y, drill_dia_m3, 2*lids_depth);
translate([0, 0, -lids_depth/2 + drill_sinking_height_m3/2 + 0.5])
screw_sinkings(lid_t_b_holes_x, lid_t_b_holes_y, drill_sinking_dia1_m3, drill_sinking_dia2_m3, drill_sinking_height_m3);
}
}
}

9702
cad/mechanics_rev6/housing/logo.dxf

File diff suppressed because it is too large

BIN
cad/mechanics_rev6/housing/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

2412
cad/mechanics_rev6/housing/logo_taylored.dxf

File diff suppressed because it is too large

BIN
cad/mechanics_rev6/housing/logo_taylored.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

89
cad/mechanics_rev6/housing/main.scad

@ -0,0 +1,89 @@
/////////////////////////////////////////////////////////////////////////////////
// Main file to assemble everything.
//
// Author: Maximilian Stiefel
// Last modification: 20.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module for male part of raw box
include <box_male.scad>
use <box_male.scad>
// Module for female part of raw box
include <box_female.scad>
use <box_female.scad>
// Module for raw box without any lids
include <lid_l_r.scad>
use <lid_l_r.scad>
// Module for raw box without any lids
include <lid_f_b.scad>
use <lid_f_b.scad>
// Module for raw box without any lids
include <lid_t_b.scad>
use <lid_t_b.scad>
////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
// 0 = put lids, 1 = remove lids
close = 0;
// Set minimum angle of a fragment
$fa = 0.5;
// Set minimum size of a fragment
$fs = 0.5;
////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
//difference()
//{
union()
{
color(myColor1)
{
// Lid right
translate([housing_outside_width/2 + close*20, 0, 0])
rotate([0, 0, 0])
lid_l_r();
// Lid left
translate([-housing_outside_width/2 - close*20, 0, 0])
rotate([0, 180, 0])
lid_l_r();
// Lid front
translate([0, -housing_outside_depth/2 - close*20, 0])
rotate([90, 0, 0])
//rotate([0, 180, 0])
lid_f_b(1,0);
// Lid back
translate([0, +housing_outside_depth/2 + close*20, 0])
rotate([-90, 180, 0])
rotate([0, 180, 0])
lid_f_b(1,1);
color(myColor1, 0.8)
translate([0, 0, close*10 +0.0])
//translate([0, 0, housing_outside_height/2])
//rotate([0,180,0])
box_male();
translate([0, 0, -close*10 -0.0])
!translate([0, 0, housing_outside_height/2])
box_female();
}
}
//translate([-200, 0, 0])
//cube([400,400,400], center=true);
//}

77
cad/mechanics_rev6/housing/main2.scad

@ -0,0 +1,77 @@
/////////////////////////////////////////////////////////////////////////////////
// Main file to assemble everything.
//
// Author: Maximilian Stiefel
// Last modification: 20.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module for raw box without any lids
include <box.scad>
use <box.scad>
// Module for raw box without any lids
include <lid_l_r.scad>
use <lid_l_r.scad>
// Module for raw box without any lids
include <lid_f_b.scad>
use <lid_f_b.scad>
// Module for raw box without any lids
include <lid_t_b.scad>
use <lid_t_b.scad>
////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
// 0 = put lids, 1 = remove lids
close = 0;
// Set minimum angle of a fragment
$fa = 0.5;
// Set minimum size of a fragment
$fs = 0.5;
////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
//difference()
//{
union()
{
color(myColor1)
{
// Lid right
translate([housing_outside_width/2 + close*20, 0, 0])
rotate([0, 0, 0])
lid_l_r();
// Lid left
translate([-housing_outside_width/2 - close*20, 0, 0])
rotate([0, 180, 0])
lid_l_r();
// Lid front
translate([0, -housing_outside_depth/2 - close*20, 0])
rotate([90, 0, 0])
lid_f_b(1,0);
// Lid back
translate([0, +housing_outside_depth/2 + close*20, 0])
rotate([-90, 180, 0])
lid_f_b(1,1);
color(myColor1, 0.8)
box();
}
}
//translate([-200, 0, 0])
//cube([400,400,400], center=true);
//}

41
cad/mechanics_rev6/housing/open_box.scad

@ -0,0 +1,41 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for a open box with rounded edges.
//
// Author: Maximilian Stiefel
// Last modification: 26.04.2017
/////////////////////////////////////////////////////////////////////////////////
module open_box(width, length, height, thickness)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
edge_rounding = 8;
compensation = 2*abs(edge_rounding-thickness);
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
translate([0, 0, 0]) difference(){
// Hull 4 cylinders which are compensated against the thickness
// so the actual desired thickness/2 and edge rounding is always achieved.
hull(){
// x=0, y=0
translate([edge_rounding, edge_rounding, 0])
cylinder(r = edge_rounding, h = height + thickness);
// x=width, y=0
translate([width + edge_rounding - compensation, edge_rounding, 0])
cylinder(r = edge_rounding, h = height + thickness);
// x=0, y=length
translate([edge_rounding, length + edge_rounding - compensation,0])
cylinder(r = edge_rounding, h = height + thickness);
//x=width, y=length
translate([width + edge_rounding - compensation, length + edge_rounding - compensation,0])
cylinder(r = edge_rounding, h = height + thickness);
}
translate([thickness, thickness, thickness])
cube([width, length, height + 1]);
}
}

31
cad/mechanics_rev6/housing/oring.scad

@ -0,0 +1,31 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for oring deepnings.
//
// Author: Maximilian Stiefel
// Last modification: 28.07.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Module to make a nice round box
include <roundy.scad>
use <roundy.scad>
module oring(xdim, ydim, channel_width, channel_depth)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
difference()
{
roundy(xdim, ydim, channel_depth + 0.1);
roundy(xdim - 2*channel_width, ydim - 2*channel_width, channel_depth + 0.15);
}
}

30
cad/mechanics_rev6/housing/roundy.scad

@ -0,0 +1,30 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for a open box with rounded edges.
//
// Author: Maximilian Stiefel
// Last modification: 26.04.2017
/////////////////////////////////////////////////////////////////////////////////
module roundy(width, depth, height, center)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
edge_rounding = 5;
transx = -width/2;
transy = -depth/2;
transz = -height/2;
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
// Hull 4 cylinders
// The thickness of the cylinders (edge_rounding) is compensated
//translate([transx, transy, transz])
hull(){
for(x=[-1, +1])
for(y=[-1, +1])
translate([x*width/2 + -x*edge_rounding, y*depth/2 + -y*edge_rounding, 0])
cylinder(r = edge_rounding, h = height, center =true);
}
}

BIN
cad/mechanics_rev6/housing/screenshot_closed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
cad/mechanics_rev6/housing/screenshot_cut_closed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
cad/mechanics_rev6/housing/screenshot_cut_open.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
cad/mechanics_rev6/housing/screenshot_female.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
cad/mechanics_rev6/housing/screenshot_male.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
cad/mechanics_rev6/housing/screenshot_open.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

24
cad/mechanics_rev6/housing/screw_holes.scad

@ -0,0 +1,24 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for four holes along a rectangle for screw threads.
//
// Author: Maximilian Stiefel
// Last modification: 09.07.2017
/////////////////////////////////////////////////////////////////////////////////
module screw_holes(xdim, ydim, dia, depth)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
union(){
for(x=[-1, +1])
for(y=[-1, +1])
translate([x*xdim/2, y*ydim/2, 0])
cylinder(r = dia/2, h = depth, center =true);
}
}

30
cad/mechanics_rev6/housing/screw_sinkings.scad

@ -0,0 +1,30 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for four sinking holes, that cone-shaped screw heads can sink in.
//
// Author: Maximilian Stiefel
// Last modification: 09.07.2017
/////////////////////////////////////////////////////////////////////////////////
module screw_sinkings(xdim, ydim, dia1, dia2, depth)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
union(){
for(x=[-1, +1])
for(y=[-1, +1])
translate([x*xdim/2, y*ydim/2, 0])
union()
{
translate([0, 0, -depth + 0.1])
cylinder(r = dia1/2, h = depth, center = true);
cylinder(r1 = dia1/2, r2 = dia2/2, h = depth, center = true);
}
}
}

59
cad/mechanics_rev6/pcb/dimensions.scad

@ -0,0 +1,59 @@
/////////////////////////////////////////////////////////////////////////////////
// File for all dimensions, so they can be changed globally.
//
// Author: Maximilian Stiefel
// Last modification: 29.07.2017
/////////////////////////////////////////////////////////////////////////////////
allowance03 = 0.3;
allowance05 = 0.5;
allowance1 = 1;
// Glass dimensions
glass_slide_height = 1;
glass_slide_depth = 26 + allowance05;
glass_slide_width = 76;
// Holder dimensions
window_x = 25;
window_y = 7;
holder_height = 3 + glass_slide_height + allowance05;
holder_depth = glass_slide_depth + allowance05 + 4;
holder_width = 80; // Width of the PCB
echo(holder_height=holder_height);
holder_bottom_side_thickness = 2;
// LED illuminator dimensions
led_illuminator_thickness = 2;
led_illuminator_dia = 20 - led_illuminator_thickness;
led_illuminator_height = 9;
led_illuminator_leg1_pos_x = 10;
led_illuminator_leg2_pos_y = 5;
led_illuminator_leg2_pos_x = -9;
led_illuminator_leg_dia = 2.2 - allowance05;
led_illuminator_leg_height = 2;
led_pos_x = 18;
led_pos_y = 13;
led_illuminator_slot = 4;
led_illuminator_angle = 35;
// Screw dimensions
drill_dia_m3 = 3.2;
drill_depth = 7;
drill_sinking_dia1_m3 = 5.5;
drill_sinking_dia2_m3 = 3;
drill_sinking_height_m3 = 2;
// Leg dimensions
leg_width = 7;
leg_depth = 13;
leg_height = led_illuminator_height;
leg_inner_dia = 2.5;
leg_pos_y = 13;
leg_pos_x = 2.5;
leg_distance = 6.5;
leg_diff1 = leg_depth - leg_distance;
//leg_drill_depth = 7;
leg_drill_depth = leg_height + 1;
myColor1 = "Grey";

60
cad/mechanics_rev6/pcb/glass_holder.scad

@ -0,0 +1,60 @@
/////////////////////////////////////////////////////////////////////////////////
// Glass slide holder to be mounted on the PCB.
//
// Author: Maximilian Stiefel
// Last modification: 29.06.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Dimesnions
include <screw_sinkings.scad>
use <screw_sinkings.scad>
/////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
module glass_holder()
{
//translate([0, 0, holder_height/2 + leg_height -0.01])
difference()
{
// Main body
cube([holder_width, holder_depth, holder_height], center = true);
union()
{
// Cut glass slide out and make an entrance
translate([-2.5, 0, holder_bottom_side_thickness])
cube([glass_slide_width + allowance05 + 5, glass_slide_depth + allowance05, holder_height], center = true);
// Cut out a cylinder for the LED
translate([glass_slide_width/2 - led_pos_x, 0, 0])
//cylinder(r = led_illuminator_dia/2, h = 20, center = true);
difference()
{
cylinder(r = led_illuminator_dia/2 , h = led_illuminator_height + 1, center = true);
translate([0, led_illuminator_dia/2 + window_y - led_illuminator_thickness, 0])
cube([2*led_illuminator_dia, led_illuminator_dia, led_illuminator_height + 1], center = true);
}
// Cut out a "window" where the receiver photodiode is sitting
translate([glass_slide_width/2 - led_pos_x,6 + window_y, 2])
cube([window_x, 12, 10], center = true);
// Cut out a "window" that one can grab the glass slide more easily
translate([-glass_slide_width/2, -glass_slide_depth/2, 2])
cube([window_x, 15, 10], center = true);
// Cut out holes for screws
translate([0, 0, -holder_bottom_side_thickness + 0.5])
rotate([180, 0, 0])
screw_sinkings(glass_slide_width - 2*leg_pos_x, 0, drill_sinking_dia1_m3, drill_sinking_dia2_m3, drill_sinking_height_m3);
}
}
}

8570
cad/mechanics_rev6/pcb/glass_holder.stl

File diff suppressed because it is too large

5770
cad/mechanics_rev6/pcb/illuminator.stl

File diff suppressed because it is too large

50
cad/mechanics_rev6/pcb/led_illuminator.scad

@ -0,0 +1,50 @@
/////////////////////////////////////////////////////////////////////////////////
// Illuminator for LED to keep the UV light away from the photodiode.
//
// Author: Maximilian Stiefel
// Last modification: 28.08.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
/////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
module illuminator()
{
difference()
{
union()
{
// Main body
difference()
{
cylinder(r = led_illuminator_dia/2 + led_illuminator_thickness, h = led_illuminator_height + allowance03, center = true);
translate([0, led_illuminator_dia/2 + window_y, 0])
cube([2*led_illuminator_dia, led_illuminator_dia, led_illuminator_height + 1], center = true);
}
// The two legs
translate([led_illuminator_leg1_pos_x, 0, - (led_illuminator_height + led_illuminator_leg_height)/2 - 0.01 ])
cylinder(r = (led_illuminator_leg_dia)/2, h = led_illuminator_leg_height, center = true);
translate([led_illuminator_leg2_pos_x, led_illuminator_leg2_pos_y, - (led_illuminator_height + led_illuminator_leg_height)/2 - 0.01 ])
cylinder(r = (led_illuminator_leg_dia)/2, h = led_illuminator_leg_height, center = true);
}
difference()
{
cylinder(r = led_illuminator_dia/2 , h = led_illuminator_height + 1, center = true);
translate([0, led_illuminator_dia/2 + window_y - led_illuminator_thickness, 0])
cube([2*led_illuminator_dia, led_illuminator_dia, led_illuminator_height + 1], center = true);
}
}
}

1038
cad/mechanics_rev6/pcb/leg.stl

File diff suppressed because it is too large

43
cad/mechanics_rev6/pcb/legs.scad

@ -0,0 +1,43 @@
/////////////////////////////////////////////////////////////////////////////////
// Legs for the glass slide holder.
//
// Author: Maximilian Stiefel
// Last modification: 29.06.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
/////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
module legs()
{
difference()
{
union()
{
// Leg
translate([0, - leg_depth/2 + leg_diff1/2, leg_height/2])
cube([leg_width, leg_depth, leg_height], center = true);
}
union()
{
// Drill holes
for(y = [0, 1])
translate([0, -y*leg_distance, -0.01])
cylinder(r = leg_inner_dia/2, h = leg_drill_depth);
}
}
}

56
cad/mechanics_rev6/pcb/main.scad

@ -0,0 +1,56 @@
/////////////////////////////////////////////////////////////////////////////////
// Main file to bring everything together.
//
// Author: Maximilian Stiefel
// Last modification: 29.06.2017
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////////////
// Dimesnions
include <dimensions.scad>
use <dimensions.scad>
// Module for the glass holder
include <glass_holder.scad>
use <glass_holder.scad>
// Module for the legs
include <legs.scad>
use <legs.scad>
// Module for the legs
include <led_illuminator.scad>
use <led_illuminator.scad>
/////////////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////////////
$fa = 0.5; // minimum facet angle is now 0.5
$fs = 0.5; // minimum facet size is now 0.5 mm
/////////////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////////////
color(myColor1)
{
// Glass holder
translate([0, 0, holder_height/2 + leg_height -0.01])
//translate([0, 0, holder_height/2])
glass_holder();
// Legs
translate([glass_slide_width/2 - leg_pos_x, 0, 0])
legs();
translate([-glass_slide_width/2 + leg_pos_x, 0, 0])
rotate([0, 0, 180])
legs();
translate([glass_slide_width/2 - led_pos_x, 0, led_illuminator_height/2 + 0.01])
translate([0, 0, (led_illuminator_height + allowance03)/2])
rotate([0, 180 ,0])
illuminator();
}

BIN
cad/mechanics_rev6/pcb/screen_shot_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
cad/mechanics_rev6/pcb/screenshot_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

24
cad/mechanics_rev6/pcb/screw_holes.scad

@ -0,0 +1,24 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for four holes along a rectangle for screw threads.
//
// Author: Maximilian Stiefel
// Last modification: 09.07.2017
/////////////////////////////////////////////////////////////////////////////////
module screw_holes(xdim, ydim, dia, depth)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
union(){
for(x=[-1, +1])
for(y=[-1, +1])
translate([x*xdim/2, y*ydim/2, 0])
cylinder(r = dia/2, h = depth, center =true);
}
}

30
cad/mechanics_rev6/pcb/screw_sinkings.scad

@ -0,0 +1,30 @@
/////////////////////////////////////////////////////////////////////////////////
// Module for four sinking holes, that cone-shaped screw heads can sink in.
//
// Author: Maximilian Stiefel
// Last modification: 09.07.2017
/////////////////////////////////////////////////////////////////////////////////
module screw_sinkings(xdim, ydim, dia1, dia2, depth)
{
/////////////////////////////////////////////////////////////////////////
// Vars
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// Action
/////////////////////////////////////////////////////////////////////////
union(){
for(x=[-1, +1])
for(y=[-1, +1])
translate([x*xdim/2, y*ydim/2, 0])
union()
{
translate([0, 0, -depth + 0.1])
cylinder(r = dia1/2, h = depth, center = true);
cylinder(r1 = dia1/2, r2 = dia2/2, h = depth, center = true);
}
}
}

18
pcbs/analog_board_v0.33/analog_board_v0.33.kicad_pcb

@ -5,7 +5,7 @@
(no_connects 0)
(area 62.150001 46.15 215.357144 157.700001)
(thickness 1.6)
(drawings 48)
(drawings 49)
(tracks 257)
(zones 0)
(modules 369)
@ -32,7 +32,7 @@
(37 F.SilkS user)
(38 B.Mask user)
(39 F.Mask user hide)
(40 Dwgs.User user hide)
(40 Dwgs.User user)
(41 Cmts.User user)
(42 Eco1.User user hide)
(43 Eco2.User user hide)
@ -45,7 +45,7 @@
)
(setup
(last_trace_width 0.4)
(last_trace_width 0.25)
(user_trace_width 0.4)
(trace_clearance 0.2)
(zone_clearance 0.381)
@ -14017,6 +14017,18 @@
(net 7 Signal))
)
(dimension 10 (width 0.3) (layer Dwgs.User)
(gr_text "10,000 mm" (at 120 105.65) (layer Dwgs.User)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(feature1 (pts (xy 125 110) (xy 125 104.3)))
(feature2 (pts (xy 115 110) (xy 115 104.3)))
(crossbar (pts (xy 115 107) (xy 125 107)))
(arrow1a (pts (xy 125 107) (xy 123.873496 107.586421)))
(arrow1b (pts (xy 125 107) (xy 123.873496 106.413579)))
(arrow2a (pts (xy 115 107) (xy 116.126504 107.586421)))
(arrow2b (pts (xy 115 107) (xy 116.126504 106.413579)))
)
(gr_text V_SENS_NEG (at 155.829 122.682) (layer F.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)

2
pcbs/analog_board_v0.33/analog_board_v0.33.kicad_pcb-bak

@ -3,7 +3,7 @@
(general
(links 416)
(no_connects 0)
(area 104.949999 84.949999 185.050001 135.050001)
(area 62.150001 46.15 215.357144 157.700001)
(thickness 1.6)
(drawings 48)
(tracks 257)

Loading…
Cancel
Save