PCB enclosures for Arduino, ESP32, Raspberry Pi and custom boards

ESP8266 case, 3D printed: NodeMCU V2 and V3 and Wemos D1 mini enclosures

NodeMCU boards come in two widths and the D1 mini stacks shields. Dimensions for each, how to size a case for a shield stack, and a prompt for a vented sensor box.
8 September 2026 · 2 min readelectronicsenclosuresesp8266

Two NodeMCUs, one D1 mini

BoardOutlinePin rowsUSBHoles
NodeMCU V2 (Amica, narrow)48.5 x 26 mm22.9 mm apartMicro-B4 x 2.5 mm near corners
NodeMCU V3 (Lolin, wide)58 x 31 mm27.9 mm apartMicro-B4 x 2.5 mm near corners
Wemos D1 mini34.2 x 25.6 mm22.9 mm apartMicro-B or USB-C on newer clones2 x 3 mm on one short edge

The V2 fits a breadboard; the V3 does not. They are not the same case, and most "NodeMCU case" downloads are for one without saying which.

D1 mini shield stacks

The D1 mini's real advantage is shields: relay, DHT, OLED, battery, prototyping. Each shield adds about 10 mm with stacking headers. A D1 mini plus two shields is roughly 34 x 26 x 30 mm. Tell the generator the stack height and it sizes the internal cavity; ask for a slot on the shield's edge if the shield has a connector (the relay shield's screw terminals, for example).

The prompt

Prompt
A vented enclosure for a Wemos D1 mini (34.2 x 25.6 mm) with a DHT22 shield stacked on top, total stack height 24 mm. Two 3 mm standoffs at the D1 mini holes on one short edge and edge rails on the long sides, 1.8 mm walls, 0.5 mm clearance. A 9 x 4 mm micro USB cutout 3 mm above the floor, a 3 x 4 grid of 2 x 8 mm vent slots on each long side, snap-fit lid with a 16 x 8 mm slot above the DHT22 sensor.

Variations

  • NodeMCU V3 with a relay. Add the relay module's dimensions as a second board next to the NodeMCU and ask for a terminal slot: "a 25 x 8 mm slot on the long side for the relay terminals".
  • Outdoor. Swap the vents for a gasket groove and a PG7 gland; see the outdoor sensor guide.
  • Wall-mounted. "Two keyhole slots on the back, 40 mm apart".
  • Display. "A 27 x 12 mm window in the lid for the 0.66 inch OLED shield".

Sensor airflow

A temperature sensor in a sealed box reads the ESP8266's heat, not the room. Put the sensor behind vents, or better, in a separate well with slots on three sides, and keep the radio module on the other end of the case. Ask for "a separate vented compartment for the sensor" and the AI adds an internal wall.

Library parts

The Wemos D1 mini enclosure with a DHT22 slot and the vented temperature sensor housing open pre-filled in the builder.

Prompts to start from

Open one in the builder, change the numbers to yours, and the model renders in seconds. Keep adjusting in the chat before you print.

A vented enclosure for a Wemos D1 mini (34.2 x 25.6 mm) with a DHT22 shield stacked on top, total stack height 24 mm. Two 3 mm standoffs at the D1 mini holes on one short edge and edge rails on the long sides, 1.8 mm walls, 0.5 mm clearance. A 9 x 4 mm micro USB cutout 3 mm above the floor, a 3 x 4 grid of 2 x 8 mm vent slots on each long side, snap-fit lid with a 16 x 8 mm slot above the DHT22 sensor.

Open in the builderPre-filled after sign-in. Preview is free.

A case for a NodeMCU V3 (58 x 31 mm, four 2.5 mm holes 2 mm from each corner, tallest component 12 mm): 4 mm standoffs, 2 mm walls, 16 mm internal height, micro USB cutout on one short side, hex vents in the lid, screwed lid with M2.5 pillars.

Open in the builderPre-filled after sign-in. Preview is free.

A narrow NodeMCU V2 case (48.5 x 26 mm, 2.5 mm holes near the corners) with a 30 x 8 mm slot on each long side so jumper wires reach the pins, micro USB cutout, 14 mm internal height, friction lid.

Open in the builderPre-filled after sign-in. Preview is free.

Questions

Measure the width. 26 mm is the narrow V2 (Amica), 31 mm is the wide V3 (Lolin). The cases are not interchangeable.

Yes. Give the total stack height (about 10 mm per shield with stacking headers) and name any shield with an external connector so a slot is added for it.

The ESP8266 heats the air inside a sealed box by several degrees. Vent the sensor's end of the case, or ask for a separate vented compartment for the sensor with an internal wall.

Generate the enclosure for your board

Describe the board, the ports and how the lid closes. The case renders in your browser in seconds and every cutout is a sentence away from moving. Preview is free.