A Raspberry Pi inside a closed plastic case raises four questions a bare board on a desk never does: where its heat goes, how tall the stack is, how cables leave without straining the board’s connectors, and whether the onboard radio still works. This post gives the rules we apply to each in a custom Raspberry Pi case, for products built on the Pi 4 and Pi 5.
Heat: design for sustained load, not idle
On the Pi 4 and Pi 5 the firmware starts throttling the CPU clock when the processor reaches about 80 °C and throttles harder as it approaches 85 °C. At idle a Pi barely warms its case. Under sustained load (video, image processing, long compiles) a sealed box with no air path will reach the throttle point, and the symptom is a product that slows down in the field rather than one that fails a bench test.
Test the way the product is used: case closed, at your highest expected ambient temperature, running the real workload for an hour or more. On the Pi, vcgencmd measure_temp reads the processor temperature and vcgencmd get_throttled reports whether throttling has occurred since boot.
ABS and the other enclosure plastics are thermal insulators. An aluminum case can work as a heatsink by touching the processor through a thermal pad; a plastic case cannot, so in plastic the heat has to leave by air. That makes the vent and fan layout the thermal design.
| Approach | When it fits | What the case needs |
|---|---|---|
| Vents only | Light or intermittent load | Inlet slots low on one wall, outlet slots high on the opposite wall or in the lid |
| Heatsink and vents | Moderate sustained load | Clearance above the fins and an air path that crosses them |
| Case fan and vents | Heavy sustained load or a warm location | Fan on bosses or through-holes, inlet area matched to outlet area |
| Pi 5 Active Cooler | Pi 5 products under sustained load | Headroom above the cooler and an inlet it can draw from; it plugs into the Pi 5’s own fan connector |
Vents and fans that actually move air
A machined vent pattern is a feature in the CNC program, so it can be tuned between prototypes for little cost. Start from the rules in our functional features guide:
- Use slots, not round holes. Slots cost less to machine, and long slots keep cross supports so the wall stays stiff. Minimum slot width is 2 mm.
- Match the fan’s inlet area to the outlet area, and keep the pattern as open as the wall allows to reduce back pressure. A fan pushing into a small exhaust grille moves far less air than its rating.
- Mount the fan so cool air blows over its motor, which in practice means the fan pulls air in rather than exhausting hot air through itself.
- Put the inlet and outlet on opposite sides of the processor, so the air crosses the hot parts on its way through. A fan blowing at the top of a HAT does little for the processor underneath.
Slots and fans also pull in dust. In a dusty location, either add a filter behind the inlet and size the fan for the extra resistance, or design for a lower sustained load.

HAT stacks and internal height
A HAT plugs into the 40-pin header and fastens through the same four mounting holes as the Pi, so the stack reads: boss, Pi, standoffs, HAT, the tallest part on the HAT, clearance, lid. The standoff length is set by the header pair you use, and standard and extended stacking headers give different heights. Model the actual header and standoff part numbers rather than a generic HAT outline, and the lid height falls out of the model.
Three consequences are easy to miss:
- Every board added above the Pi blocks air over the processor. Run the air path between the boards, not over the top one.
- Connectors on the HAT (terminal blocks, an antenna jack, buttons) need openings at a second height, dimensioned from the same mounting-hole datum.
- A display mounted above the stack shows through an acrylic window bonded into the lid from the rear, or through an open bezel if the user has to touch it.
Our bosses stay under 9 mm tall. Taller supports become sidewall tabs or a frame, and a male-female hex standoff stack threads into a brass insert in the boss rather than into the plastic.

Cable exits and strain relief
Every connector on a Pi is soldered to the board, so a sideways pull on a plug levers on the solder joints. Make the case take that load. Size each opening close to the plug shell, so the wall stops a plug moving sideways before the connector does, and recess the outside face where needed so the plug seats fully.
Cables that stay connected (the power lead, a sensor cable, Ethernet in a fixed installation) should be anchored inside the case. A cable tie through two machined slots, or a clamp on a threaded insert, stops a pull at the anchor before it reaches the board. Round cables pass through a grommet in a machined hole; where water matters, a cable gland on a flat wall. Inside the case, leave room for ribbon and flat-flex cables to bend without creasing, and draw the fold in the model.
Wireless: what plastic does for the onboard radio
Every full-size Pi since the 3B carries Wi-Fi and Bluetooth with an antenna on the board. A metal case surrounds that antenna with a conductor and cuts its range sharply. ABS, polycarbonate and acrylic walls at enclosure thickness let 2.4 GHz and 5 GHz signals through with little loss.
A plastic case can still block the radio from the inside:
- Conductive EMI coating, if the product needs shielding. Mask it away from the antenna end of the board.
- Metal parts placed over the antenna: heatsinks, brackets, a display, a battery.
- Installation: the product mounted flat against a metal surface or inside a steel cabinet.
Identify where the antenna sits on your board model and keep that end of the board clear. If the product must live inside metal, plan for an external antenna: wireless versions of the Compute Module 4 have a connector for one, and on a standard Pi one option is a USB Wi-Fi adapter with its own antenna. Check range with the case closed and installed as the customer will install it.
Status LEDs and light pipes
The Pi’s power and activity LEDs are small surface-mount parts on top of the board, rarely where the product’s front panel is. There are three ways to show them:
- A small hole in the lid directly above each LED. Cheapest, readable only from above.
- A light pipe bonded into the case that carries the light to the face the user looks at.
- Your own LEDs on a HAT or front board, driven from GPIO and placed at the panel. You choose the color, the meaning and the position, and the case does not depend on where a given Pi model puts its LEDs.
For a product that may change boards, the third option keeps the case stable. Whichever you choose, print the legend next to the light so its meaning is on the case, not in the manual.
Send your board, HAT and cooling plan through our request-for-quote form, and an engineer will check the air path, stack height and antenna zone in the 3D model before anything is cut.

