Makerspace

ESP32 Case

A snap-together case for the 30-pin ESP32 DevKit V1 with USB-C, the common ESP-WROOM-32 board with 15 pins a side. The moulded header strips are what hold the board: they sit in a pocket in the enclosed base, and drop clean through the floor of the pins-out one. No screws, and it prints without supports. The EN and BOOT buttons press through the lid. The pins-out base takes a third piece: either a cover that snaps over the bottom and closes the case back up, or a deeper one with room for a row of jumper ends, which comes two ways: a slot down each side, or one round hole in the end for a whole bundle.

Loading model...
Drag to turn, scroll or pinch to zoom

Print it

MaterialPLA or PETG
Layer height0.2 mm
Walls3
Infill15%
SupportsNone
OrientationAs downloaded

The lid STL is already upside down, top on the bed, so the button tabs print flat. All three bottoms print the right way up, open side to the sky. The only thing over air in any of them is the roof of the side slot, a 30 mm bridge across 2 mm of wall, which needs no support; the end hole has a pointed roof instead. Every face that goes down on the bed has a 0.4 mm break on its outer edge, so the squashed first layer stays inside the part.

If you are building the pins-out one, skip the fit check frame: that base is 3.0 cm³ against the frame's 3.4, so the real part is the cheaper test.

Print the fit check frame first. It is the board seat and the rim with everything else sliced away, about twenty minutes at 0.2 mm, measured rather than guessed, and it tells you whether the board drops in before you commit to the base. Pair it with the real lid to feel the snap. That also settles the cover, which grips the bottom of the base on the same clearance and the same size bump as the lid grips the top.

Put it together

  1. Drop the board into the base with the USB-C port at the opening. On the enclosed base the black header strips settle into two pockets and the pins hang in blind trenches. On the pins-out base the strips go straight through the floor and the board comes to rest on the rails, PCB down.
  2. Press the lid straight down until the rims click together.
  3. On the pins-out base, press the bottom on until it clicks, the same press as the lid and the same click. All three bottoms snap on that way.
  4. With the wired bottom: plug the jumpers onto the pins first, feed the wires out through the slot on their side, then snap the bottom on.
  5. Press the two tabs beside the port for EN (reset) and BOOT.
  6. To open it, flex the long sides outward. The cover leaves a groove at the seam to get a nail into.

Fit

Outside56.0 x 33.3 mm
Height, closed17.8 mm
Rim and cover fit0.05 mm
Snap bump0.80 lid, 0.75 cover
Snap interference0.75, both ends
Wall2.5 mm
Air under the pin tips1.2 mm
Cavity52.0 x 29.3 mm
Header rows25.4 mm apart
Header channel0.45 to the island, 46 long
Strip offset it takes±3.9 mm
Pin left outside6.0 mm, all of it
Pin trenches1.0 mm
Lid clamp0.1 mm

The cavity is cut for the largest board of this pattern, because the header pocket, not the wall, is what holds the board. Print the fit check first: if the board will not seat, widen PL_CLR in the source; if it still shifts, narrow it.

Revised 20 September. The first version had a 0.3 mm snap bump sitting in a 0.2 mm groove. A 0.4 mm nozzle lays a bead wider than either, so both features printed away and the parts sat together without ever clicking, propped up on whatever was left of the bumps. The bump is now 0.55 mm proud with a 1.7 mm face and the groove 0.45 mm deep: 0.40 mm of interference, and both are features a nozzle can draw. Three things went with it. There is now 0.4 mm of air over the rim, where the lid's relief used to stop exactly at the rim's top face and could land on it instead of closing on the split line. The trenches went from 1.0 to 1.3 mm, and the trenches and pockets got a lead-in, because the pocket locates the board and the trench only has to swallow a pin that leans. And the enclosed base has 1.2 mm under the pin tips instead of 0.2, so a long pin cannot hold a board up; it is a millimetre taller for it.

Both seams are the same joint now, 20 September. The bottom used to work differently from the top: the base stepped inward over its last couple of millimetres and the cover wrapped that step from outside. It cost a 45 degree chamfer to climb back out of, left a reveal at the seam, thinned the base's wall to 0.95 mm exactly where the cover gripped it, and had to dodge the USB mouth on the way past.

The cover carries a rim now and the base has a socket for it, which is the lid's joint upside down: same rim height, same rim thickness, same 0.05 fit, same bump in the same groove, and 1.6 mm of wall over it at both ends. The two halves butt flush at the seam the way the lid and base do at the split, so there is no step, no chamfer and nothing for the port to avoid. The rim sits on the cover rather than the base only because of which way each part prints: it rises off the cover's top face where nothing overhangs, while a rim hanging under the base would have left the whole wall above it printing in mid-air.

Thicker, tighter, 20 September. Three fits came back loose off the printer at once: the lid held but came off too easily, the grommet fell straight out of its hole, and the cover would not click at all. Loose in the same direction three times is a printer running under size on a fit, not three separate mistakes, so the clearances came down and the interferences went up together. The rim fit is 0.05 mm now rather than 0.15, the lid's snap 0.75 mm of interference rather than 0.55, the cover's 0.70 rather than 0.50.

The wall went from 2.0 to 2.5 mm to pay for it. A deeper groove has to come out of the lid's skirt, and at a 2.0 wall that skirt was 1.0 mm with a 0.55 groove in it, which is one bead of plastic left holding the clip. It is 1.6 mm now with 0.85 behind the groove. The case is 57.0 x 34.3 mm for it, up a millimetre each way, and the USB mouth flares 1.2 mm instead of 1.0 because the socket's face now sits that much further inside the wall.

The grommet's crush ribs stood 0.4 mm proud for 0.1 mm of grip, which is both too little to hold and, at about one bead wide, too small to print properly: the same thing that happened to the first snap bumps. They are 0.7 mm proud now on a 1.0 mm radius, 0.4 mm of interference and a rib face nearly 2 mm wide, with the last 1.5 mm of barrel left bare so it finds the hole before the ribs start biting. Expect to push it home.

The one that actually mattered, 20 September. The strips on this board are not centred on it. They sit about 2.3 mm toward the far end, measured off a photo against the 2.54 mm pad pitch: 5.6 mm from the far end to the first pad, 10.3 mm from the USB end to the last. Every pocket up to now was cut to the size of a strip and centred on the board, so it bound by more than a millimetre at one end no matter how much clearance went round it. That is what kept the board from dropping in, and no amount of widening was ever going to fix it.

There is no pocket now. Each strip drops into a channel that runs out to the wall and most of the length of the board, and the only thing locating the board across the rows is the island left between them. One island does the whole job, because the strips sit outside it: push the board one way and the far strip comes up against it. The channel takes a strip ±3.9 mm off centre, so the 2.3 does not have to be right, and it no longer cares how wide a strip is or how ragged its ends are. Cutting a pocket wall outside the strips was never on anyway: their outer face is only 0.68 mm from the cavity wall.

Also revised 20 September. The strips still would not reach the pockets, and Ryan's read of it was the right one: the pins-out base was burying 1.2 mm of pin for no reason. Its floor now stops level with the bottom of the header. The strips drop clean through it, the board comes to rest on its own PCB sitting on the rails, and the whole 6 mm of every pin is outside the case for a jumper to grip instead of 4.8. It is also a better stop than the pocket floor was, because it does not depend on the header plastic being exactly 2.5 mm tall. The pins-out case is 10.0 mm closed now, down from 11.2, and the base is 3.0 cm³ against 4.3.

The lid snapped on after the last revision but came off too easily, so the bump went from 0.55 mm proud to 0.70, which is 0.55 mm of interference. That is the ceiling: the lid's wall over the groove is 1.0 mm thick and the groove is as deep as the interference, so any more and there is not enough wall left to push back. The cover's bump went to 0.65, a shade less, because it has to fit inside a 2.1 mm wrap.

Then the board would not drop in either: the header strips were not reaching the pockets. The pocket was 0.2 mm a side all round, which is not much to give a snapped-off strip with ragged ends, and an internal slot prints narrower than it is drawn. It is 0.35 mm across the strip now and 0.8 mm along it. Only the across matters for holding the board straight; along the strip the cavity ends are the closer stop anyway, 0.15 to 0.32 mm an end, so the pocket can be generous there for nothing.

The USB-C opening is 10.6 x 5.0 mm now, sized to the socket rather than to a cable's moulding, with a 1 mm chamfered mouth outside it. The socket's face sits 0.65 mm inside the wall, so a cable still has to get that far in; the mouth is what gives it the room the old 12.5 x 7.0 slot gave it, without the slot.

The bottom of the pins-out base is set back by exactly the cover's wall, so the cover finishes flush and the case is one clean block whichever way you build it. The wall flares back out on a 45 degree chamfer, which prints in mid-air without drooping and leaves the groove you lift the cover off by.

The wired bottom is 25.4 mm deep because that is what a 15 mm Dupont shell needs once it hangs off a pin that only sticks out five, with the slot starting below it. Shorter jumper shells, shorter box: change SHELL in the source.

The slot is 34 x 5 mm, roughly the length of a header strip and about 165 mm² a side, and its bottom edge is the floor, so a wire can lie flat and slide straight out. A hole per pin would have looked tidier and been useless: 2.2 mm holes on the 2.54 mm pin pitch leave a third of a millimetre of wall between them, and a handful of jumpers does not arrive one wire at a time.

The end-hole version puts a single 12 mm exit in the far end instead. Nothing hangs off the pins out at the ends of the box, so that hole does not have to wait until it is below the jumper shells, and the part comes out 2.8 mm shorter: 30.8 mm closed against 33.6. Its roof is pointed rather than round, because a 12 mm hole printed on its side droops at the crown.

That hole is cut for a whole bundle, and most of the time you have three wires in it, so there is a press-fit grommet to neck it down: 4, 6 or 8 mm bore, a couple of minutes each to print. Six crush ribs do the gripping rather than the whole barrel, because a rib 0.1 mm oversize squashes where a barrel 0.1 mm oversize simply will not go in, and a printed hole is never quite the size it was drawn. Its barrel is the same teardrop as the hole, so it fills the point instead of leaving it open and it only goes in one way up. The flange is a rounded rectangle, though, 15.6 x 16.9 mm: the teardrop is only there because a 12 mm hole printed on its side droops at the crown, and the flange prints flat on the bed where nothing droops, so there is no reason for the part you can see to be shaped like the part you cannot. A teardrop reaches 1.24 mm higher above its centre than below, so the flange is nudged up by exactly that and made tall enough to cover the point outright. From the outside there is no teardrop anywhere. The flange stands 1.2 mm proud of the end; it is what you pull on to get it back out.

Pick the bore for the connector, not the wire. A jumper's shell is about 2.6 x 4.5 mm and has to pass through: 4 mm takes bare wire, 6 mm takes one shell at a time, 8 mm is comfortable. Thread the wires first, then press the grommet home.

Spare boards

The bays in the storage tray are this same seat, repeated: pins in blind trenches, the header strips in the pocket, and a spring tab at each end holding the board down.