by adom
2020 Addressable RGB LED · 800 Kbps single-line cascade · 16 mA per channel (V1.0 sheet), 12 mA from V1.2
← Commit history
Hero note: no fill in the dashed boxes, text upright in the viewer's Bottom view, wording says the datasheet gives no reason
2 files changed
+14−14
provenance/tools/hero_post_callout.py+14−14@@ -31,9 +31,10 @@ if any(n.get("name") == NODE for n in js["nodes"]): sys.exit(json.dumps(dict(glb MM = 0.001 Z = -0.006 * MM # just under the chip's seat (z = 0), above the copper fill (-0.018 mm) AMBER = [1.0, 0.55, 0.05]-TIP = ("No copper under this strip, by design. Worldsemi's PCB Solder Pad drawing (WS2812B-2020 datasheet p.2) "- "puts 0.7 x 0.7 mm pads 0.40 mm apart, while the terminals are 0.78 mm long on a 1.00 mm pitch, so the "- "inner 0.09 mm of each terminal sits off the pad. The 0.40 mm gap keeps neighbouring pins from bridging.")+TIP = ("No copper under this strip. Worldsemi's PCB Solder Pad drawing (WS2812B-2020 datasheet p.2) puts 0.7 x 0.7 mm "+ "pads 0.40 mm apart, while the terminals are 0.78 mm long on a 1.00 mm pitch, so the inner 0.09 mm of each "+ "terminal is off the pad. The datasheet gives no reason; a 0.40 mm gap is the usual guard against solder "+ "bridges between neighbouring pins.") def buf(data, target=None):@@ -102,23 +103,23 @@ centres = [] for sx in (-1, 1): for sy in (-1, 1): xa, xb = sorted((sx * 0.565, sx * 1.10)); ya, yb = sorted((sy * 0.11, sy * 0.20))- kids.append(mesh("note_strip_fill_%+d%+d" % (sx, sy), rect(xa, ya, xb, yb), m_fill, tooltip=TIP)) kids.append(mesh("note_strip_dash_%+d%+d" % (sx, sy), dashed_rect(xa - 0.008, ya - 0.008, xb + 0.008, yb + 0.008), m_line, tooltip=TIP)) centres.append((sx * 0.83, sy * 0.155)) # text panel on the underside, between the pad columns (x -0.53..0.53), drawn to read correctly from BELOW-PW, PH = 1.0, 0.62 # mm-img = Image.new("RGBA", (2000, 1240), (18, 22, 28, 215)); dr = ImageDraw.Draw(img)+PW, PH = 1.0, 0.70 # mm+img = Image.new("RGBA", (2000, 1400), (18, 22, 28, 215)); dr = ImageDraw.Draw(img) fb = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 92) fr = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 74)-dr.rectangle([6, 6, 1993, 1233], outline=(255, 150, 20, 255), width=10)+dr.rectangle([6, 6, 1993, 1393], outline=(255, 150, 20, 255), width=10) lines = [("No copper under the amber strips", fb, (255, 170, 40)), ("Worldsemi's PCB Solder Pad drawing puts", fr, (235, 238, 242)),- ("0.7 x 0.7 mm pads 0.40 mm apart. The", fr, (235, 238, 242)),+ ("0.7 x 0.7 mm pads 0.40 mm apart, while the", fr, (235, 238, 242)), ("terminals are 0.78 mm long on a 1.00 mm", fr, (235, 238, 242)),- ("pitch, so the inner 0.09 mm of each one", fr, (235, 238, 242)),- ("sits off the pad. The 0.40 mm gap keeps", fr, (235, 238, 242)),- ("neighbouring pins from bridging.", fr, (235, 238, 242)),+ ("pitch, so the inner 0.09 mm of each one is", fr, (235, 238, 242)),+ ("off the pad. The datasheet gives no reason;", fr, (235, 238, 242)),+ ("a 0.40 mm gap is the usual guard against", fr, (235, 238, 242)),+ ("solder bridges between neighbouring pins.", fr, (235, 238, 242)), ("WS2812B-2020 datasheet p.2", fr, (150, 200, 210))] y = 60 for t, f, c in lines:@@ -130,8 +131,7 @@ js.setdefault("textures", []).append(dict(source=len(js["images"]) - 1, sampler= m_text = mat("Datasheet note - text", [1, 1, 1, 1], tex=len(js["textures"]) - 1) x0, x1, y0, y1 = -PW / 2, PW / 2, -PH / 2, PH / 2 tri = [((x0, y0), (x1, y0), (x1, y1)), ((x0, y0), (x1, y1), (x0, y1))]-# seen from below, +X appears on the LEFT: the image's left edge (u = 0) goes at +X so the text reads correctly-uvx = lambda x: (x1 - x) / PW; uvy = lambda yv: (y1 - yv) / PH+uvx = lambda x: (x - x0) / PW; uvy = lambda yv: (yv - y0) / PH # reads upright in the Adom viewer's Bottom view uv = [(uvx(x), uvy(yv)) for t in tri for x, yv in t] kids.append(mesh("note_text_panel", tri, m_text, uv=uv, tooltip=TIP)) # leader lines from the panel's corners to the strips@@ -163,7 +163,7 @@ for sx in (-1, 1): # label beside the arrow, horizontal, readable from below lx0, lx1 = sorted((sx * 0.74, sx * 1.18)); ly0, ly1 = -0.065, 0.065 tri2 = [((lx0, ly0), (lx1, ly0), (lx1, ly1)), ((lx0, ly0), (lx1, ly1), (lx0, ly1))]- uv2 = [((lx1 - x) / (lx1 - lx0), (ly1 - yv) / (ly1 - ly0)) for t in tri2 for x, yv in t]+ uv2 = [((x - lx0) / (lx1 - lx0), (yv - ly0) / (ly1 - ly0)) for t in tri2 for x, yv in t] kids.append(mesh("note_dim_label_%+d" % sx, tri2, m_dim, uv=uv2, tooltip="0.40 mm between the pads (Worldsemi PCB Solder Pad drawing)")) js["nodes"].append(dict(name=NODE, children=kids,
ws2812b-2020-hero.glb⋯ 1 unchanged line ⋯