{"id":51241422,"url":"https://github.com/magikh0e/heltec-v4-case-generator","last_synced_at":"2026-06-29T00:32:34.774Z","repository":{"id":367939285,"uuid":"1282878880","full_name":"magikh0e/heltec-v4-case-generator","owner":"magikh0e","description":"Parametric OpenSCAD case for the Heltec WiFi LoRa 32 V4: base tray plus snap or screw lid, OLED window, SMA antenna option. Ships print-ready STLs.","archived":false,"fork":false,"pushed_at":"2026-06-28T11:04:19.000Z","size":946,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-28T12:06:06.892Z","etag":null,"topics":["3d-printable","3d-printing","enclosure","esp32","heltec","lora","meshtastic","openscad","parametric","sx1262"],"latest_commit_sha":null,"homepage":null,"language":"OpenSCAD","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magikh0e.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-28T09:50:54.000Z","updated_at":"2026-06-28T11:04:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/magikh0e/heltec-v4-case-generator","commit_stats":null,"previous_names":["magikh0e/heltec-v4-case-generator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/magikh0e/heltec-v4-case-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magikh0e%2Fheltec-v4-case-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magikh0e%2Fheltec-v4-case-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magikh0e%2Fheltec-v4-case-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magikh0e%2Fheltec-v4-case-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magikh0e","download_url":"https://codeload.github.com/magikh0e/heltec-v4-case-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magikh0e%2Fheltec-v4-case-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34909137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-printable","3d-printing","enclosure","esp32","heltec","lora","meshtastic","openscad","parametric","sx1262"],"created_at":"2026-06-29T00:32:32.160Z","updated_at":"2026-06-29T00:32:34.767Z","avatar_url":"https://github.com/magikh0e.png","language":"OpenSCAD","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heltec WiFi LoRa 32 (V4) Case Generator\n\nA parametric OpenSCAD enclosure for the **Heltec WiFi LoRa 32 V4** (ESP32-S3 + SX1262, with an on-board OLED). Same two-part snap+screw architecture as the [WisBlock case](https://github.com/magikh0e/wisblock-case-generator), but laid out for the V4's board size and its connector row.\n\n![The default Heltec V4 case in OpenSCAD: base tray and lid with the OLED window, in the exploded \"both\" preview, with the Customizer panel exposing every adjustable group](Overview.png)\n\n\u003cimg src=\"HeltecBoard.jpg\" width=\"320\" alt=\"A Heltec WiFi LoRa 32 V4 board — the hardware this case is built for\"\u003e\n\n*The board it's built for: a Heltec WiFi LoRa 32 V4 (ESP32-S3 + SX1262).*\n\n**Source / latest version:** https://github.com/magikh0e/heltec-v4-case-generator\n\n**Also on Cults3D:** https://cults3d.com/en/users/magikh0e/3d-models\n\n\u003e Dimensions come from the published V4 product manual and the geometry is verified manifold, but port offsets vary and tolerances differ by printer. The connector row is the high-risk area, so always run the fit-checker (section 5) before a full print.\n\n---\n\n## How the V4 differs from the WisBlock case\n\nIf you've used the WisBlock generator, the structure is identical. Only the board-specific bits changed:\n\n- **Smaller board:** 51.7 x 25.4 mm (vs 60 x 30).\n- **Connector row on one LONG edge:** the V4 puts the USER button, USB-C, and RST button in a row along the same long side. The generator cuts them at individual X positions on that edge (`front_edge`, default `y0`).\n- **OLED window:** the V4 has a 0.96\" display on top. The lid has an optional cutout (`oled_window`) with a recessed ledge for a clear cover.\n- **LoRa antenna:** IPEX1.0 on board. Default is an **SMA bulkhead hole** (`ant_mode=\"sma\"`) so you run a u.FL to SMA pigtail out to a real antenna for best range. Switch to `ant_mode=\"internal\"` for no hole (keep the antenna inside).\n- **M2 mounting** (the V4 uses M2, vs M2.5 on the WisBlock).\n\n---\n\n## 1. What you need\n\n- **OpenSCAD**: https://openscad.org\n- The file **`Heltecv4_Case_Generator.scad`**.\n- A slicer (PrusaSlicer, Orca, Cura, Bambu Studio...).\n- **Calipers**: more important here than on the WisBlock, because the connector X positions are the make-or-break dimension (see section 5).\n\nThis repo ships the generator plus pre-exported, ready-to-slice STLs: `heltec_v4_base.stl`, `heltec_v4_lid_snap.stl`, `heltec_v4_lid_screw.stl`, `heltec_v4_both_lids.stl`, and the clear `heltec_v4_oled_cover.stl` (print that one in transparent filament). The STLs are built from the default variables; if you change board-specific dimensions, re-export from the `.scad` (section 4) so the parts match.\n\n---\n\n## 2. Opening and previewing\n\n1. Open `Heltecv4_Case_Generator.scad` in OpenSCAD.\n2. **F5** = fast preview, **F6** = full render.\n3. Enable the **Customizer** (Window menu) for labelled sliders and toggles grouped under `[Board]`, `[Connector row]`, `[OLED window]`, etc.\n4. Export with **File -\u003e Export -\u003e Export as STL** (`F7`).\n\n---\n\n## 3. Choosing what to render\n\n```\npart = \"both\";\n```\n\n| Value | Renders |\n|---|---|\n| `\"base\"` | Base tray only |\n| `\"lid\"` | Lid following `use_snaps` / `use_screws` |\n| `\"lid_snap\"` | Lid, snaps only |\n| `\"lid_screw\"` | Lid, screw holes only |\n| `\"all_lids\"` | Both lids side by side on one plate |\n| `\"oled_cover\"` | Printable clear window cover (print in transparent filament) |\n| `\"both\"` | Base + lid exploded. **Preview only, don't print this** |\n\nThe **base is shared** by both lids (it has snap recesses *and* screw posts). Print one base, then whichever lid you want.\n\n---\n\n## 4. Print workflow\n\n1. `part = \"base\";` -\u003e F6 -\u003e export base.\n2. `part = \"lid_snap\";` (or `lid_screw`) -\u003e F6 -\u003e export lid.\n3. Slice both. Base flat / open side up, lid lip-up, no supports needed (the snap chamfers stay under ~45 degrees). The OLED window prints fine face-up.\n4. Assemble (section 8).\n\n---\n\n## 5. Verify before printing — the connector row\n\nThis is the critical step for the V4. The board size is exact, but the **X positions of the USB-C and buttons along the front edge** must match your board or the ports won't line up. Measure from the left end of the PCB to the center of each feature and set:\n\n```\nusbc_x    = 14;   // USB-C center\nusrbtn_x  = 6;    // USER button center (0 disables)\nrstbtn_x  = 22;   // RST button center  (0 disables)\n```\n\nAlso confirm:\n- `front_edge` (`y0` or `y1`): which long side the row faces. If your board sits flipped, set `y1`.\n- `oled_cx` / `oled_cy`: the OLED window center, if you've enabled it.\n- `usbc_w` / `usbc_h`: widen for a chunky cable overmold.\n\n**Fit-checker trick:** set `comp_clear = 1;` and print just the base. You get a shallow tray that confirms the board footprint, USB-C, and button alignment in about 15 minutes of filament. Adjust the X values, reprint if needed, then set `comp_clear` back to 12 for the real thing.\n\n---\n\n## 6. Variable reference\n\n### `[Board]`\n| Variable | Default | Meaning |\n|---|---|---|\n| `board_x`, `board_y` | 51.7, 25.4 | V4 PCB footprint (mm). |\n| `standoff_h` | 4 | PCB lift off the floor. |\n| `screw_hole_d` | 1.8 | M2 self-tap pilot. |\n| `post_d` | 4.5 | Standoff post OD. |\n| `hole_inset_x/y` | 2.5 | Mounting-hole inset. Verify. |\n\n### `[Clearances]`\n| Variable | Default | Meaning |\n|---|---|---|\n| `wall`, `floor_t`, `lid_t` | 2.0 | Thicknesses. |\n| `clr` | 0.4 | Gap around PCB. |\n| `comp_clear` | 12 | Headroom above PCB (the OLED bracket is the tall part). |\n\n### `[Connector row]`\n| Variable | Default | Meaning |\n|---|---|---|\n| `front_edge` | `\"y0\"` | Which long edge the row faces. |\n| `usbc_x` | 14 | USB-C center X. **Verify**. |\n| `usbc_w`, `usbc_h` | 9.5, 4.0 | USB-C opening size. |\n| `usbc_z` | 1.0 | Port bottom above PCB surface. |\n| `usrbtn_x` | 6 | USER button X (0 = off). |\n| `rstbtn_x` | 22 | RST button X (0 = off). |\n| `btn_d` | 3.5 | Button pin-poke hole diameter. |\n\n### `[LoRa antenna]`\n| Variable | Default | Meaning |\n|---|---|---|\n| `ant_mode` | `\"sma\"` | `\"sma\"` = bulkhead hole; `\"internal\"` = no hole. |\n| `ant_d` | 6.5 | SMA nut hole diameter. |\n| `ant_edge` | `\"x1\"` | Which short wall the SMA exits. |\n| `ant_pos` | board_y/2 | Position along that wall. |\n| `ant_z` | 3 | Hole-center height above PCB. |\n\n\u003e Note: for the SMA pigtail to work you may need to move the V4's RF-path resistor to the IPEX side per Heltec's hardware notes. Check the board docs before relying on the external antenna.\n\n### `[OLED window]`\n| Variable | Default | Meaning |\n|---|---|---|\n| `oled_window` | true | true = cutout; false = solid lid. |\n| `oled_w`, `oled_h` | 26, 15 | Window size. Verify against your screen. |\n| `oled_cx`, `oled_cy` | 33, center | Window center on the board. |\n| `oled_recess` | true | Recessed ledge for a clear cover. |\n| `oled_ledge` | 1.5 | Ledge width the cover rests on. |\n| `oled_cover_t` | 1.0 | Recess depth (match your acrylic thickness). |\n| `oled_cover_gap` | 0.3 | Fit clearance for the printed cover to drop in. |\n\nA clear cover is optional. Two ways to make one:\n- **Print it:** set `part = \"oled_cover\";` and print in transparent PETG or clear PLA (or use the bundled `heltec_v4_oled_cover.stl`). It's sized to drop straight into the recess (footprint minus `oled_cover_gap`).\n- **Cut it:** a 1 mm acrylic / polycarbonate rectangle at `oled_w + 2*oled_ledge` x `oled_h + 2*oled_ledge` (about 28.7 x 17.7 mm at defaults).\n\nOr just leave the window open for a bare cutout.\n\n### `[Lid fit]`\n| Variable | Default | Meaning |\n|---|---|---|\n| `use_screws` | true | M2 holes into the corner posts. |\n| `use_snaps` | true | Cantilever snaps on the long walls. |\n\nBoth on by default (snaps hold it shut, screws clamp for weather sealing).\n\n### `[Snap-fit]`\nSame as the WisBlock: `snap_depth` (0.9) is the click strength. Lower for easier opening, higher for a firmer lock. Keep `snap_relief = true` for PLA/PETG.\n\n### `[Lanyard]`, `[Battery shelf]`, `[JST pigtail exit]`\n- Lanyard tab defaults to the `x1` short end. **If your SMA is also on `x1`, move one of them** (`lanyard_edge` or `ant_edge`) so they don't overlap.\n- Battery shelf off by default; enable and size it for your LiPo.\n- Pigtail slot (`pigtail_slot`) lets the SH1.25 battery / solar leads exit; set `pigtail_x` along the front edge.\n\n---\n\n## 7. Quick recipes\n\n**Headless node, no screen:** `oled_window = false;`\n\n**Keep antenna internal:** `ant_mode = \"internal\";`\n\n**Board mounted the other way round:** `front_edge = \"y1\";` (and move the OLED / pigtail edges to match).\n\n**Tighter fit:** `clr = 0.3;`. Won't seat: `clr = 0.5;`.\n\n**Big battery in the lid space:** enable `battery`, set `bat_x` / `bat_y`, and raise `comp_clear` if it's thick.\n\n---\n\n## 8. Assembly\n\n1. Seat the V4 on the four standoffs (M2 corners).\n2. **SMA build:** mount the u.FL to SMA pigtail's bulkhead through the antenna hole, tighten the nut, then clip the u.FL onto the board's IPEX1.0 connector. **Internal build:** just leave the IPEX antenna inside.\n3. If using a battery, route its SH1.25 lead out through the pigtail slot.\n4. Optional: drop a clear cover into the OLED recess (print `part=\"oled_cover\"` in transparent filament, use the bundled STL, or cut acrylic to size). A dab of clear glue holds it.\n5. Close the lid: snap it shut, then drive four **M2 x 6 to 8 mm** self-tapping screws into the posts (or use M2 heat-set inserts + machine screws if you'll open it often).\n\n---\n\n## 9. Material notes (outdoor / hot climates)\n\n- **PLA**: easiest, but softens in heat and sun, so the snaps relax over time. Indoor / bench only.\n- **PETG**: best all-round here; flexes for repeated snaps, better heat and UV tolerance.\n- **ASA**: best for sustained outdoor sun.\n\nFor a sealed outdoor node, use the screw lid (optionally with a gasket) and PETG or ASA.\n\n---\n\n## 10. Disclaimer\n\nDimensions come from the published V4 product manual and the geometry is verified manifold, but **port offsets vary and tolerances differ by printer**. The connector row is the high-risk area: always run the fit-checker (section 5) before a full print.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagikh0e%2Fheltec-v4-case-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagikh0e%2Fheltec-v4-case-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagikh0e%2Fheltec-v4-case-generator/lists"}