/* * LED light - 2k lumen luminaire designed around Cree XLamp 17 W modules */ $fn = 50; module xlamp(bs, led) { translate([-bs/2, -bs/2, 0]) cube([bs, bs, 1]); translate([0, 0, 1]) { color([1, 0.9, 0]) cylinder(d=led-1, h=0.4); cylinder(d=led, h=0.3); } } module xlamp_clamp() { diam = 44; height = 3.4; difference() { /* main body */ cylinder(d=diam, h=height); union() { hole_diam = 3; hole_spac = 35; /* mounting holes */ translate([-hole_spac / 2, 0, -1]) cylinder(d=hole_diam, h=height+2); translate([ hole_spac / 2, 0, -1]) cylinder(d=hole_diam, h=height+2); /* main bore for LED */ translate([0, 0, -1]) cylinder(d=16, h=height+2); /* bore taper */ translate([0, 0, pcb_dz]) cylinder(d1=16, d2=21, h=height - pcb_dz + 0.01); /* retaining well for LED board FIXME rotation not correct*/ pcb_dz = 1; pcb_dx = 18; pcb_dy = 18; rotate([0, 0, -26]) translate([-pcb_dx / 2, -pcb_dy / 2, -1]) cube([pcb_dx, pcb_dy, pcb_dz + 1]); } } } module diffuser(d, h, standoff_h, diff_col, bolt_col, standoff_col) { bolt_diam = 5; bolt_h = 2; bolt_from_edge = 4; module bolthead(con) { translate([con, 0, 0]) scale([bolt_diam, bolt_diam, bolt_h]) sphere(d=1); } module standoff(d, h, con) { translate([con, 0, 0]) cylinder(d=d, h=h); } /* diffuser hardware (standoffs, bolts) */ for (theta = [0 : 120 : 360]) { rotate([0, 0, theta]) { con = d / 2 - bolt_from_edge; color(bolt_col) translate([0, 0, standoff_h]) bolthead(con=con); color(standoff_col) standoff(d=bolt_diam, h=standoff_h, con=con); } } /* Diffuser plate. Needs to come last for correct alpha */ color(diff_col) { translate([0, 0, standoff_h - h]) { cylinder(d=d, h=h); } } } module outer_case(di, h, wt) { /* reflector thickness */ refl_t = 0.1; /* outer shell */ color([0.2, 0.2, 0.2]) { difference() { cylinder(d=di+2*wt, h=h); translate([0, 0, -1]) cylinder(d=di+2*refl_t, h=h+2); } } color([1,1,1]) { difference() { /* Basic reflective lining/insert, e.g. aluminium foil against casing. Ideally, there'd be a proper reflector, optics, but meh */ cylinder(d=di+2*refl_t, h=h); translate([0, 0, -1]) cylinder(d=di, h=h+2); } } } module heatsink_style_pins(d, h, bt) { con_factor = 7; count_factor = 7; module pin(d, h, con) { translate([con, 0, 0]) cylinder(d=d, h=h); } module pins_ring(d, h, n) { count = n * count_factor; con = n * con_factor; deg = 360/count; for (theta = [0 : deg : 360]) { rotate([0, 0, theta]) pin(d=d, h=h, con=con); } } cylinder(d=d, h=bt); translate([0, 0, bt]) { pd = 2; ph = h - bt; rows = (d / 2 - pd) / con_factor; for (i = [0 : rows]) { pins_ring(pd, ph, i); } } } /* entire luminaire */ { outer_case(di=100, h=130, wt=3); /* fan */ fan_h = 20; #cylinder(d=90, h=fan_h); /* FIXME circuit board, controls */ /* heatsink and gear mounted to it */ heatsink_h = 50; translate([0, 0, heatsink_h + fan_h]) { mirror([0, 0, 1]) { /* heatsink */ color([0.2, 0.2, 0.2]) heatsink_style_pins(d=90, h=heatsink_h, bt=10); } /* LED plus clamp */ { rotate([0, 0, -26]) xlamp(bs=18, led=16); color([0.9, 0.9, 0.9]) xlamp_clamp(); } /* diffuser */ diffuser(d=90, h=2.5, standoff_h=50, diff_col=[0.95, 0.95, 0.95, 0.7], bolt_col=[0.65, 0.67, 0.72], standoff_col=[0.88, 0.78, 0.5]); } }