wiring/src/w202.py
11 KB · 147 lines · python · Download from the repository page
from sheet import Sheet, LW, STYLEimport model def draw(): s = Sheet("202", model.SHEETS[6][1]) x0,y0,x1,y1 = s.frame s.heading(x0+20, y0+30, "BATTERY PACK SUB-ASSEMBLY WIRING — 2S2P 21700 pack, pack PCB (PB), harness W-02 to main board J12", 14) s.label(x0+20, y0+46, "Logical wiring, NTS. Sources: docs/05 §2.5, §8, §9, §12; docs/09 §1, §2.3, §9.3; docs/08 §11. FET placement, sense-resistor position and balance network per the TI BQ40Z50-R2 reference design — verify at schematic capture.", 8.5, fill="#333") # ---------------- pack boundary ---------------- s.rect("REFERENCE", 60, 100, 850, 600, "none", "#555", LW["primary"], 6, 'stroke-dasharray="10 5"') s.label(70, 116, "BATTERY PACK SUB-ASSEMBLY (PACK) — built and tested by the pack vendor; certified as a unit: UN 38.3 + IEC 62133-2 (05 §2.5, 11)", 8.5, bold=True, fill="#333") s.label(70, 128, "Service-replaceable behind the screw-down door: 4 screws, one connector (08 §11). Holder PC + 30 % GF, 1.0 mm between cells, 2 mm to enclosure; 2 mm PORON; fish paper / Kapton over the strips (05 §2.5).", 7.8, fill="#555") # cells def cell(x, y, name, grp): s.rect("EQUIPMENT", x, y, 50, 110, "#f4f4f4", "#222", LW["primary"], 12) s.rect("EQUIPMENT", x+17, y-6, 16, 6, "#ddd", "#222", LW["fine"]) s.text("EQUIPMENT", x+25, y+50, name, 9, "middle", bold=True) s.text("EQUIPMENT", x+25, y+63, f"group {grp}", 8, "middle", "#333") s.text("EQUIPMENT", x+25, y+76, "21700", 8, "middle", "#333") s.text("EQUIPMENT", x+25, y+88, "3.6 V 5 Ah", 8, "middle", "#333") s.line("CONN-POWER", x+25, y-6, x+25, y-20, "#111", STYLE["POWER"]["sw"]) # + to top bar s.line("CONN-POWER", x+25, y+110, x+25, y+124, "#111", STYLE["POWER"]["sw"]) # − to bottom bar CY = 246 for x,n in ((110,"Cell 1"),(190,"Cell 2")): cell(x, CY, n, "A") for x,n in ((300,"Cell 3"),(380,"Cell 4")): cell(x, CY, n, "B") TB, BB = CY-20, CY+124 s.wire("POWER", [(100,TB),(250,TB)]); s.wire("POWER", [(100,BB),(250,BB)]) s.wire("POWER", [(290,TB),(440,TB)]); s.wire("POWER", [(290,BB),(440,BB)]) for x in (135,215,325,405): s.junction("POWER", x, TB); s.junction("POWER", x, BB) s.label(100, TB-8, "A+ (nickel strip bus, 0.15 × 8 mm, spot-welded)", 8, fill="#111") s.label(290, TB-8, "B+ = PACK+ node (7.2 V nom., 8.4 V max)", 8, fill="#111") s.label(100, BB+16, "A− = PACK− node", 8, fill="#111") s.label(290, BB+16, "B− = mid-tap (A+ = B−, 3.6 V)", 8, fill="#111") # series link A+ → B− s.wire("POWER", [(250,TB),(270,TB),(270,BB),(290,BB)], "series link", seg=1, fs=8) s.label(70, 146, "2S2P: two parallel pairs in series · INR21700-50E / M50LT / P45B class · 7.2 V 10 Ah 72 Wh (05 §2.2, §2.4)", 8, fill="#333") # ---------------- pack PCB ---------------- s.rect("EQUIPMENT", 520, 140, 360, 520, "#f2f5fa", "#222", LW["primary"], 4) s.text("EQUIPMENT", 700, 158, "PB — Battery pack PCB", 12, "middle", bold=True) s.text("EQUIPMENT", 700, 170, "2L, 2 oz Cu, 60 × 25 mm · path sized 2× fuse rating · IEC 62133-2 creepage (09 §1, §2.3)", 7.6, "middle", "#333") s.block("FET", 600,180,120,50, "CHG / DSG FETs", ["driven by BQ40Z50-R2", "placement per TI ref. (verify)"], [("L",0.5,"IN",""),("R",0.5,"OUT",""),("B",0.35,"G1",""),("B",0.65,"G2","")], title_fs=10, port_fs=8) s.block("FUSE", 740,180,120,50, "Chemical fuse", ["10 A / 32 V, SEFUSE/SFJ class", "heater: BQ294xx"], [("L",0.5,"IN",""),("R",0.5,"OUT",""),("B",0.5,"BLOW","")], title_fs=10, port_fs=8) s.block("SEC", 740,262,120,64, "BQ294xx", ["secondary OV protector", "trip 4.35 V/cell → fuse", "sense: B+ / mid / A− taps", "(same nodes as gauge)"], [("T",0.5,"OUT","")], title_fs=10, port_fs=8) s.block("GAUGE", 580,262,140,200, "BQ40Z50-R2", ["gauge + protector, SBS 1.1", "Impedance Track · balancing", "OV 4.25 / UV 2.8 V/cell · OCD 15 A", "SC 40 A · temp · SHA-1 auth"], [("L",0.45,"VC2","VC2 B+"),("L",0.55,"VC1","VC1 mid"),("L",0.65,"VC0","VC0 A−"),("L",0.8,"TS1","TS1"),("L",0.9,"TS2","TS2"),("T",0.3,"G1",""),("T",0.6,"G2",""),("B",0.55,"SMBC",""),("B",0.75,"SMBD","")], title_fs=10.5, port_fs=8) # NTCs for i,(yy,lab) in enumerate(((s.A("GAUGE","TS1")[1], "NTC 1 · group A cans"), (s.A("GAUGE","TS2")[1], "NTC 2 · group B cans"))): s.rect("EQUIPMENT", 528, yy-8, 46, 16, "#fff", "#222", LW["secondary"], 2) s.text("EQUIPMENT", 551, yy+3, "NTC %d 10 k" % (i+1), 7.5, "middle") s.wire("CTRL", [(574,yy),(580,yy)]) s.label(320, 442, "2× 10 k NTC glued to the cell cans, one per parallel group;", 7.5, fill="#333") s.label(320, 452, "leads to PB → BQ40Z50 TS1 / TS2 (05 §2.5)", 7.5, fill="#333") # gates for g in ("G1","G2"): (gx,gy) = s.A("GAUGE",g); (fx,fy) = s.A("FET",g) s.wire("CTRL", [(gx,gy),(gx,fy)]) s.label(s.A("GAUGE","G1")[0]-2, 250, "CHG", 7.5, anchor="end", fill=STYLE["CTRL"]["stroke"]); s.label(s.A("GAUGE","G2")[0]+3, 250, "DSG", 7.5, fill=STYLE["CTRL"]["stroke"]) # blow (bx,by) = s.A("SEC","OUT"); (ux,uy) = s.A("FUSE","BLOW") s.wire("CTRL", [(bx,by),(ux,uy)], "blow", fs=7.5, dx=14) # ---------------- tap buses ---------------- BP, MID, AM = 470, 490, 510 fin = s.A("FET","IN"); vc2 = s.A("GAUGE","VC2"); vc1 = s.A("GAUGE","VC1"); vc0 = s.A("GAUGE","VC0") # B+ : top bar B → x 470 → FET input and VC2 s.wire("POWER", [(440,TB),(BP,TB),(BP,fin[1]),(fin[0],fin[1])]) s.label(464, fin[1]-4, "B+ → FETs → fuse → PACK+", 8, anchor="end") s.wire("POWER", [(BP,vc2[1]),(vc2[0],vc2[1])]); s.junction("POWER", BP, vc2[1]) s.wire("POWER", [(BP,TB),(BP,vc2[1])]) # mid: bottom bar B → x 490 → VC1 s.wire("POWER", [(440,BB),(MID,BB),(MID,vc1[1]),(vc1[0],vc1[1])]) s.label(MID+4, BB-6, "mid", 7.5, fill="#111") # A− : bottom bar A → under group B → x 510 → VC0 ; PACK− branch at x 300 AY = BB+50 s.wire("POWER", [(100,BB),(90,BB),(90,AY),(AM,AY),(AM,vc0[1]),(vc0[0],vc0[1])], "A− → VC0 · PACK−", seg=2, fs=8, dy=-4) # ---------------- J1 connector ---------------- JX, JY, JW = 580, 610, 280 pins = [(0.1,"P6","6 PRES#"),(0.26,"P5","5 NTC"),(0.42,"P2","2 PACK−"),(0.58,"P3","3 SMB_CLK"),(0.74,"P4","4 SMB_DAT"),(0.9,"P1","1 PACK+")] s.block("J1", JX,JY,JW,44, "", None, [("T",f,pid,lab) for f,pid,lab in pins] + [("B",f,pid+"b","") for f,pid,lab in pins], port_fs=7.5, fill="#fff") s.text("EQUIPMENT", JX+JW/2, JY+36, "J1 pack output — 6 pos., locking · pin order PROPOSED · PRES# tied to PACK− on PB · mates MB J12 (09 §9.3)", 8.5, "middle", bold=True) # PACK+ : fuse out → right margin → pin 1 fo = s.A("FUSE","OUT"); p1 = s.A("J1","P1") s.wire("POWER", [fo,(870,fo[1]),(870,p1[1]-20),(p1[0],p1[1]-20),p1], "PACK+", seg=1, fs=8, dx=8) # PACK− : branch at (300, AY) → y 580 → pin 2 ; PRES# tied to PACK− p2 = s.A("J1","P2"); p6 = s.A("J1","P6") s.wire("POWER", [(300,AY),(300,582),(p2[0],582),p2], "PACK−", seg=1, fs=8, dy=-4, dx=-140) s.junction("POWER", 300, AY) s.wire("CTRL", [(p6[0],582),p6]); s.junction("POWER", p6[0], 582) # NTC 2 → pin 5 (to BQ25792 TS, secondary) p5 = s.A("J1","P5"); ts2 = s.A("GAUGE","TS2") s.wire("CTRL", [(551, ts2[1]+8),(551,560),(p5[0],560),p5], "NTC → J1-5 (BQ25792 TS, secondary — 05 §8)", seg=1, fs=7.5, dx=-2) # SMBus p3 = s.A("J1","P3"); p4 = s.A("J1","P4"); sc = s.A("GAUGE","SMBC"); sd = s.A("GAUGE","SMBD") s.wire("BUS", [sc,(sc[0],478),(p3[0],478),p3], "SMBus CLK / DAT (100 kHz)", seg=1, fs=7.5, dy=-4) s.wire("BUS", [sd,(sd[0],492),(p4[0],492),p4]) s.label(735, 512, "pull-ups on the main board (3.3 V AON)", 7.5, anchor="end", fill=STYLE["BUS"]["stroke"]) # ---------------- harness W-02 → MB J12 ---------------- MY = 760 s.block("J12", JX, MY, JW, 60, "MB J12 — Battery pack connector (main board)", ["PACK+ → BQ25792 BAT (P-04) · PACK− → one-point GND bond (W-20) · SMBus → EC PACK_SMBUS", "NTC → BQ25792 TS · PRES# → EC (pull-up) — see PU-W-102 / PU-W-204"], [("T",f,pid,"") for f,pid,lab in pins], port_fs=7.5) for f,pid,lab in pins: a = s.A("J1",pid+"b"); b = s.A("J12",pid) cls = "POWER" if pid in ("P1","P2") else ("BUS" if pid in ("P3","P4") else "CTRL") s.wire(cls, [a,b]) s.label(JX+JW+14, 722, "W-02 6-way discrete-wire pack harness, locking connector", 8.5, bold=True) s.label(JX+JW+14, 734, "length TBD (~60 mm est. from the docs/08 layout); connector family open — OI-3", 8) s.label(JX+JW+14, 746, "(JST GH/XA class per 09 vs Molex Micro-Fit / JST GH per 05 vs Nano-Fit for 10 A per 09)", 8) s.label(JX+JW+14, 758, "PACK+ / PACK− one pin each → ≥ 5 A/pin needed (5 A charge, 7 A system peak)", 8) # W-20 bond pm = s.A("J12","P2") s.wire("POWER", [(pm[0],MY+60),(pm[0],MY+76)]); s.gnd(pm[0], MY+76, chassis=False) s.label(pm[0]+16, MY+92, "W-20 battery negative bonded to MB GND at one point near the charger (09 §6)", 8, fill=STYLE["BOND"]["stroke"]) s.label(70, 690, "pack boundary", 8, italic=True, fill="#555") # ---------------- right column: pinout, protection, notes ---------------- RX = 940 s.subheading(RX, 116, "J1 (PB) / J12 (MB) PIN ALLOCATION — signal list Verified (05 §2.5); pin order PROPOSED (Assumed)", 9.5) po = model.PINOUTS["J12 Battery pack (MB) / J1 (PB)"] rows = [[str(n), nm, note] for n,nm,note in po["pins"]] yb = s.table(RX, 122, [34, 80, 486], rows, ["Pin", "Signal", "Notes"], 7.8, pad=3) s.subheading(RX, yb+22, "PROTECTION LAYERS AND PACK RULES (05 §8, §9, §12)", 9.5) prot = [ ["Primary", "BQ40Z50-R2 FETs: OV 4.25 V/cell, UV 2.8 V/cell, OCD 15 A, SC 40 A, temperature; cell balancing (bleed); Impedance Track SOH / cycle count; SHA-1 authentication"], ["Secondary", "BQ294xx opens the chemical fuse at 4.35 V/cell (independent of the gauge)"], ["Charger", "BQ25792 own OVP / OCP; charge 8.40 V (option 8.30 V longevity), 5.0 A fast charge (verify vs cell spec), pre-charge 500 mA < 6.0 V, termination 250 mA; JEITA 0–45 °C via BQ40Z50 NTCs (primary) and TS pin (secondary)"], ["Cell temperature", "2 NTCs; charge window 0–45 °C; discharge cut-off −20 / +60 °C by the protector; skin-temperature throttling acts first (06)"], ["Fuse / path", "10 A / 32 V chemical fuse (05 §2.5) — 09 §2.3 states '10 A continuous, 20 A fuse'; PCB traces sized for 2× fuse rating — reconcile (OI-3)"], ["Mechanical", "PC+GF holder, 2 mm PORON drop isolation, fish paper / Kapton; UN 38.3 T3/T4/T6 on the sub-assembly"], ["Low battery", "5 % graceful pause, 3 % EC hard cut, cell UVLO 2.8 V (pack 5.6 V); RTC kept by MS621 coin cell on the MB (05 §10.1)"], ["Transport", "≤ 100 Wh (72 Wh); ≤ 30 % SoC for air freight of finished goods, IATA PI 967 Section II label; Wh statement etched on the bottom face"], ] yb2 = s.table(RX, yb+28, [90, 510], prot, ["Layer", "Rule / rating"], 7.8, pad=3) notes = [ "The pack is permanently in circuit (NVDC): it is the hold-up for PD unplug and for the Pro Port A / Port C mux hand-over; no supercapacitor (05 §10.2).", "Only PACK+, PACK−, SMBus, one NTC and PRES# leave the pack. The gauge reads the two cell-group NTCs; the MB reads one of them on the charger TS pin as a secondary check (05 §8).", "OI-3: connector family and per-pin current, fuse rating (10 A vs 20 A) and pack-path continuous rating (10 A per 09 §2.3) are inconsistent between 05 and 09 — fix before the pack RFQ.", "Cell make/model is a class choice (05 §2.4); the golden-image learning cycle and chemistry ID are set per cell type at PVT (05 §9).", ] s.notes(RX, yb2+12, 600, "Notes", notes, 7.8) s.titleblock() return s.write()