Print file

Vented sensor enclosure for the ESP32-C5-DevKitC-1

A parametric two-part enclosure for the ESP32-C5-DevKitC-1 v1.2 with a separate vented sensor bay and 15 mm of clear space around the PCB antenna.

Rendered, not yet printed

FitsESP32-C5-DevKitC-1 (v1.2 (Espressif dimension drawing v1.2, 9 May 2025))
MaterialPETG recommended (our choice, untested). Not nylon (polyamide) for the sensor bay. No carbon- or metal-filled filament near the antenna.
Printer settingsRecommended, not yet tested: 0.4 mm nozzle, 0.2 mm layers, 3 walls, 20% infill, base floor down, lid top face down, no supports
LicenceCC BY 4.0 (design), source under MIT
Downloadsc5-devkit-vented-enclosure.scad (Source) · c5-devkit-vented-enclosure.stl · c5-devkit-vented-enclosure.3mf
Updated28 November 2026
Render of Vented sensor enclosure for the ESP32-C5-DevKitC-1
Render from the OpenSCAD source. Not yet printed.

This is a two-part printed enclosure for Espressif’s ESP32-C5-DevKitC-1, board revision v1.2, with a separate vented bay for a temperature and relative humidity (RH) sensor. It is for anyone building the battery environment sensor or a similar indoor sensor on this kit. Every board dimension comes from Espressif’s own drawing and printed circuit board (PCB) design files. Every value that does not is a parameter labelled as an assumption in the source. The design is rendered and checked, not yet printed.

What it is for

The enclosure has to do three jobs that pull against each other. The radio needs plastic kept away from the antenna. The sensor needs fresh air and no heat from the board. The board needs to be held without screws, because the drawing shows no mounting holes (F-B-012). The layout below is the compromise, with each choice traced to a source.

PCB 53.6 x 25.415 mm antenna clearance (Espressif)Antenna area, 6.5 mm past the PCBLid hold-down posts on the module shieldUSB-C plug opening in the end wall2 mm air gap, open top and bottomSensor bay, slots on four faces
Top view of the base, to scale at 3 px per mm. The board chamber keeps 15 mm of clear space around the antenna area. The sensor bay sits behind a double wall with an air gap. Our drawing from the OpenSCAD parameters. Board outline from Espressif's dimension drawing v1.2.

The IoT design reasons

Material near the antenna

The board carries an ESP32-C5-WROOM-1 module whose PCB antenna area, 6.5 mm deep, overhangs the end of the devkit PCB by exactly that amount (F-B-003, F-B-014). Espressif’s hardware design guidelines recommend at least 15 mm of clearance in all directions around the PCB antenna inside a product housing (F-B-015). They also ask for the finished product to be tested for throughput and range (F-B-016).

The enclosure applies that rule literally. The side walls, the end wall, the lid underside and the lid’s locating lip all sit at least 15 mm from the antenna area. The floor sits 23.6 mm below it. No boss, screw, rib or post enters that zone. Everything that holds the board stops 38.6 mm from the USB end, 15 mm short of the antenna area. The cost is size: the board chamber is 51.7 mm wide for a 25.4 mm board.

We have not measured how much signal a PETG wall costs at 2.4 or 5 GHz. That is what the Lab’s RF loss method and the RF test jig are for.

Venting versus sealing, and board heat

A temperature sensor in the same air as the board reads the board, not the room. The v1.2 schematic shows the parts Sensirion’s design guide lists as typical heat sources: a switching regulator (U2, SY8088AAC, with a 2.2 µH inductor), a processor module and a USB-to-UART (serial port) bridge (U3, CP2102N by default) (F-B-017). Sensirion’s guide asks for four things (F-B-025):

  • the sensor has good access to the outside air
  • the sensor compartment is sealed from air trapped in the rest of the housing
  • the dead volume around the sensor is small
  • the sensor is decoupled from heat sources and shielded from heated air

The same guide gives the scale of the problem: at 90 %RH, a 1 °C error in temperature becomes a 5 %RH error in humidity (F-B-027).

So the sensor sits in its own bay, 22 mm by 40 mm inside. The bay has vent slots on its outer wall, both end walls, its floor and the lid above it. Sensirion prefers several openings that allow air to flow over the sensor to a single aperture (F-B-025). Between the bay and the board chamber are two 2 mm walls with a 2 mm air gap that is open at the top and bottom. The only path between the two is a 6 × 5 mm sleeve for the sensor wires. Seal it around the cable with a dab of putty or tape so warm board air cannot follow the wires in. The board chamber has its own slots low and high on the wall away from the bay and in the lid, so its heat leaves the box instead of warming the whole housing. Sensirion’s guide makes the same point about getting heat out of the housing (F-B-025).

None of this makes the box waterproof or dustproof. We make no ingress-protection claim. This is an indoor enclosure.

Holding a board with no mounting holes

The v1.2 drawing and PCB layout show no mounting holes (F-B-012). The design holds the board by its pin headers instead. Four narrow teeth rise from the floor and fit between two pairs of header pins in each row, carrying the plastic header strip on top. Side guides beside the PCB edges stop it moving sideways. The teeth fix the board along its length to within about 0.3 mm each way. Two posts on the lid stop 0.3 mm above the module’s metal shield, between the module end and the 15 mm line, so the board cannot lift.

With the default tooth_gaps = [0, 7] the teeth block jumper housings on four pins per row. By the v1.2 silkscreen these are NC (not connected), G (ground), 8 and 7 on J1, and NC, G, 5 and 4 on J3 (F-B-028). Move the teeth with tooth_gaps if you need those pins. The 3V3 pin is at the antenna end of J1, so run that wire down past the module, not out over the antenna area.

The user guide does not say whether the headers come soldered (F-B-020). The header height and pin length used here are generic assumptions. Measure yours.

Mounting and cables

Two 4.5 mm holes in the floor of the board chamber take wall screws. They sit well outside the antenna clearance. We suggest mounting the box with the USB end down. The bay’s end-wall slots are then at its bottom and top, which gives air a path up past the sensor. One end wall has an opening for the USB-C plug of either port. A 5 mm hole beside it (parameter cable_d, 0 removes it) takes a lead from the battery pack.

Dimensions and where they come from

Dimension Value Source
PCB width × length 25.40 × 53.60 mm Espressif dimension drawing v1.2 (F-B-001, F-B-002)
Antenna overhang past the PCB 6.50 mm Same drawing (F-B-003)
Module width, centred 18.00 mm Same drawing, DXF coordinates (F-B-004)
Header rows, centre to centre 22.86 mm, 1.27 mm from each edge Same drawing (F-B-005)
Header pitch and count 2.54 mm, 16 per row Drawing and PCB layout V1.2 (F-B-006, F-B-008)
USB edge to the nearest pin 13.925 mm Same drawing (F-B-007)
USB-C outlines 8.65 × 7.3 mm, centres ±7.2 mm, 0.4 mm past the edge DXF silkscreen layer (F-B-010)
Module size 18.0 × 27.5 × 3.3 mm (height ±0.15) ESP32-C5-WROOM-1 datasheet v1.3, Figure 10-1 (F-B-013)
Antenna clearance 15 mm, all directions Espressif hardware design guidelines (F-B-015)

These values are not in an official drawing. Each is a parameter marked ASSUMPTION in the source:

Parameter Default What to check
pcb_t 1.6 mm PCB thickness
hdr_body_h, hdr_tail 2.5 mm, 6.0 mm Header plastic height and pin length below it (set hdr_body_h = 0 for a board without headers)
usb_zc 1.6 mm Height of the USB-C receptacle centre above the PCB
plug_w, plug_h 13.0 × 7.5 mm Your USB-C cable’s plug body, plus clearance
screw_pilot, screw_clear 2.5 mm, 3.4 mm M3 self-tapping screws for the lid

Tolerances and parameters you can change

The board sits 0.25 mm (fit) from every locating feature. The lid lip has the same clearance inside the walls. The render check confirms the print plate (base and lid side by side) is 177.4 × 81.6 × 41.4 mm within ±0.2 mm, and that the mesh is closed and manifold. The dimensions above are checked against the ledger by cad/c5-devkit-vented-enclosure/dims.yaml.

Parameters at the top of the .scad file:

  • under_board (22 mm): space under the PCB for jumper housings. The source refuses values that would bring the floor within 15 mm of the antenna.
  • bay_w, bay_l (22 × 40 mm): size of the sensor bay. Smaller is better for response time if your sensor board fits.
  • gap_w (2 mm): width of the air gap between the chambers.
  • vent_w, vent_pitch (2 mm, 4.5 mm): vent slot size and spacing.
  • tooth_gaps ([0, 7]): which header pin gaps carry the board.
  • hold_gap (0.3 mm): gap between the lid posts and the module shield.
  • ant_clear (15 mm): the antenna clearance. Reducing it goes against Espressif’s guidance.
  • part: plate, base or lid.
  • Print the base floor down and the lid top face down, as laid out in the STL and 3MF. The USB opening in the end wall is a 27.4 mm bridge. If your printer sags on bridges that long, add a support there.
  • PETG (glycol-modified polyethylene terephthalate) is our recommendation, not a tested result. Do not print the sensor bay in nylon: Sensirion’s guide says to avoid humidity-absorbing casing materials, polyamide in particular (F-B-026). We have not measured filled filaments (carbon fibre, metal) near the antenna, so do not use them here.
  • Fit the board with the antenna end away from the USB wall: lower its header pins over the teeth, then press it down until the header plastic rests on them.
  • Before closing the lid, check that the two lid posts clear the module shield. Change hold_gap if your module measures differently.

Status

Rendered, not yet printed. The source renders in the pinned OpenSCAD build (openscad/openscad:bookworm.2026-11-25), the mesh is manifold and the bounding box matches dims.yaml. Nobody has printed it or fitted a board yet. This page will say “Printed and fitted” only after a print with the stated printer, material, nozzle, layer height and orientation, and a photo of a v1.2 board inside it.

For makers

Print it in PETG, fit the board on its headers, wire the sensor through the sleeve and seal the sleeve. Mount it USB end down on an inside wall away from radiators and sunlit windows. If the reading still runs warm, increase gap_w, or move the sensor further down the bay by extending its wires.

For product teams

Treat this as a prototype housing. Espressif’s guidance asks for 15 mm of antenna clearance and for throughput and range tests on the finished product (F-B-015, F-B-016). Repeat those tests whenever the material, wall thickness or board position changes. A production design would replace the devkit with a module on your own PCB, placed with its antenna outside the base board as Espressif recommends. It would also measure sensor self-heating at the duty cycle you ship.