| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- // License: CC0
- //
- // units in mm
- $fn = 50;
- M3_H3_DRILL_R = 4.3127/2;
- RFID_screw_diam = 3;
- RFID_screw_dw = 103.5;
- RFID_access_diam = 15.5;
- MAG_PCB_screw_dw = 81.5;
- MAG_PCB_screw_diam = 2;
- MAG_READER_screw_dw = 93.75;
- MAG_READER_screw_diam = 3;
- MAG_ACCESS_total_width = 25;
- MAG_ACCESS_small_width = 10;
- MAG_ACCESS_total_height = 95;
- MAG_ACCESS_section = [17,16,29,16,17];
- SCREEN_screw_diam = 3;
- SCREEN_dw = 186;
- SCREEN_dh = 54;
- SCREEN_WINDOW_h = 46;
- SCREEN_WINDOW_w = 160;
- BOARD_screw_diam = 3;
- BOARD_screw_dw = 76.25;
- BOARD_screw_dh = 101.5;
- PIU_width = 200;
- PIU_height = 160;
- PIU_side = 50;
- module PIU_face() {
- difference() {
- // central face
- //
- square([PIU_width, PIU_height], center=true);
- // screen
- //
- translate([0, PIU_height/2 - SCREEN_WINDOW_h/2 - 10])
- union() {
- square([SCREEN_WINDOW_w, SCREEN_WINDOW_h], center=true);
- translate([-SCREEN_dw/2, SCREEN_dh/2]) circle(SCREEN_screw_diam/2);
- translate([ SCREEN_dw/2, SCREEN_dh/2]) circle(SCREEN_screw_diam/2);
- translate([ SCREEN_dw/2,-SCREEN_dh/2]) circle(SCREEN_screw_diam/2);
- translate([-SCREEN_dw/2,-SCREEN_dh/2]) circle(SCREEN_screw_diam/2);
- }
- // mag
- //
- translate([0, -5])
- union() {
- square([MAG_ACCESS_total_height, MAG_ACCESS_small_width], center=true);
- translate([-MAG_ACCESS_section[1]/2 - MAG_ACCESS_section[2]/2, 0])
- square([MAG_ACCESS_section[1], MAG_ACCESS_total_width], center=true);
- translate([ MAG_ACCESS_section[3]/2 + MAG_ACCESS_section[2]/2, 0])
- square([MAG_ACCESS_section[3], MAG_ACCESS_total_width], center=true);
- rotate( 15, [0,0,1]) translate([-MAG_PCB_screw_dw/2, 0]) circle(MAG_PCB_screw_diam/2);
- rotate( 15, [0,0,1]) translate([ MAG_PCB_screw_dw/2, 0]) circle(MAG_PCB_screw_diam/2);
- rotate(-15, [0,0,1]) translate([-MAG_PCB_screw_dw/2, 0]) circle(MAG_PCB_screw_diam/2);
- rotate(-15, [0,0,1]) translate([ MAG_PCB_screw_dw/2, 0]) circle(MAG_PCB_screw_diam/2);
- rotate( 15, [0,0,1]) translate([-MAG_READER_screw_dw/2, 0]) circle(MAG_READER_screw_diam/2);
- rotate( 15, [0,0,1]) translate([ MAG_READER_screw_dw/2, 0]) circle(MAG_READER_screw_diam/2);
- rotate(-15, [0,0,1]) translate([-MAG_READER_screw_dw/2, 0]) circle(MAG_READER_screw_diam/2);
- rotate(-15, [0,0,1]) translate([ MAG_READER_screw_dw/2, 0]) circle(MAG_READER_screw_diam/2);
- }
- // RFID
- //
- translate([0,-55])
- union() {
- translate([-RFID_screw_dw/2,0]) circle(RFID_screw_diam/2);
- translate([ RFID_screw_dw/2,0]) circle(RFID_screw_diam/2);
- circle(RFID_access_diam/2);
- }
-
- }
- }
- module PIU() {
- _c = 1;
- union() {
- PIU_face();
- // side left and right
- //
- translate([_c + PIU_width/2 + PIU_side/2, 0])
- square([PIU_side, PIU_height], center=true);
- translate([-(_c + PIU_width/2 + PIU_side/2), 0])
- square([PIU_side, PIU_height], center=true);
- // top and bottom
- //
- translate([0, _c + PIU_height/2 + PIU_side/2])
- square([PIU_width, PIU_side], center=true);
- translate([0, -(_c + PIU_height/2 + PIU_side/2)])
- square([PIU_width, PIU_side], center=true);
- // connecting strips
- //
- translate([-PIU_width/2 - _c/2, 0]) square([_c+0.25, PIU_height], center=true);
- translate([ PIU_width/2 + _c/2, 0]) square([_c+0.25, PIU_height], center=true);
- translate([ 0, PIU_height/2 + _c/2]) square([PIU_width, _c+0.25], center=true);
- translate([ 0, -(PIU_height/2 + _c/2)]) square([PIU_width, _c+0.25], center=true);
- }
- }
- module PIU_back_bracket() {
- _w = 20;
- _dx = PIU_width/2 - _w/2;
- _dy = PIU_height/2 - _w/2;
- _drill_r = M3_H3_DRILL_R;
- difference() {
- square([PIU_width, PIU_height], center=true);
- square([PIU_width - 2*_w, PIU_height - 2*_w], center=true);
- translate([ -_dx, -_dy]) circle(_drill_r);
- translate([ _dx, -_dy]) circle(_drill_r);
- translate([ _dx, _dy]) circle(_drill_r);
- translate([ -_dx, _dy]) circle(_drill_r);
- }
- }
- PIU();
- translate([0,240]) PIU_back_bracket();
|