summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2019-11-04 20:58:04 +1300
committerDavid Phillips <david@yeah.nah.nz>2019-11-04 20:58:04 +1300
commit721b1a77dd7d9870827226a1db7307e4eca2634d (patch)
tree2fcde5094ef7d6cca68d059740d45ec22a7efbb8
downloadled-lamp-721b1a77dd7d9870827226a1db7307e4eca2634d.tar.xz
Initial rough working of light
This initial patch adds a draft of the light with a version of the 133mm diameter pin-based heatsink available from China, cut down to 90mm. This is just a placeholder for now. No fan has been modelled either, just a simple placeholder cylinder. No placeholder has been inserted for wiring, circuit board, sockets, controls and so on.
-rw-r--r--led-light.scad160
1 files changed, 160 insertions, 0 deletions
diff --git a/led-light.scad b/led-light.scad
new file mode 100644
index 0000000..e641401
--- /dev/null
+++ b/led-light.scad
@@ -0,0 +1,160 @@
+/*
+ * 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) {
+ difference() {
+ cylinder(d=di+2*wt, 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 */
+{
+ color([0.2, 0.2, 0.2])
+ 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=3, standoff_h=50,
+ diff_col=[0.8, 0.8, 0.8, 0.7], /* temporarily set opacity down */
+ bolt_col=[0.6, 0.6, 0.6],
+ standoff_col=[0.6, 0.6, 0.3]);
+ }
+}
+