Penguin Mug — Raspberry Pi 4 case as a penguin on a mug
148 L × 124 W × 80 H mm (plus feet). Eight printed parts in four colours (the eye is printed twice), none needs supports.

A round black mug with a penguin's white face on the front, a blue handle, and a white marshmallow on its lid. The Pi is inside. The fan lies under the lid and blows out through the ripples in it; the three wisps of steam on the side are slits that let air in. The power button is at the back, on the right. The microSD card is reached through a notch under the handle. This case has no camera.
Files
| File | What it is |
|---|---|
3mf/plate_1_black.3mf |
body, base, fan plate and two eyes, in print orientation |
3mf/plate_2_white.3mf |
the face and the marshmallow |
3mf/plate_3_blue.3mf |
the handle |
3mf/plate_4_gold.3mf |
the beak |
stl/ |
the same eight parts one by one |
step/penguin_assembly.step |
assembled CAD model incl. a reference Pi, fan and button, for Fusion / FreeCAD / Onshape. The beak is not in it (see below) |
penguin_case.py |
parametric source. uv run penguin_case.py regenerates everything above |
preview/ |
renders: assembled, front, rear, top, exploded, inside, print plates, the card's notch |
Seven parts are drawn as solids, like the other cases. The beak is not: it is a rounded shape turned into a mesh of 16,000 triangles. A mesh goes into STL and 3MF files but not into a STEP file.
Printing

One plate per filament colour.
| Plate | Colour | Parts | Time | Filament |
|---|---|---|---|---|
| 1 | black | body, base, fan plate, 2 eyes | 3 h 4 min | 115 g |
| 2 | white | face, marshmallow | 21 min | 8 g |
| 3 | blue | handle | 13 min | 8 g |
| 4 | gold | beak | 4 min | 1 g |
Times and weights are Bambu Studio's own estimates for the P2S, 0.4 mm nozzle, "0.20mm Standard" with 3 walls, Bambu PLA Basic.
In Bambu Studio, for each plate:
- File → Import → Import 3MF/STL/STEP… and pick the plate file. It will say the file was not made by Bambu Studio and only the geometry is loaded: that is expected. If it asks whether to load it as one object with multiple parts, answer no.
- Process "0.20mm Standard". Under Strength set Wall loops to 3. Leave supports off.
- Choose the filament, Slice plate, Print plate.
The parts are already turned the right way up. Don't auto-orient them:
| Part | How it lies on the bed |
|---|---|
| base, fan plate, marshmallow | as they stand |
| body | upside-down, standing on the lid |
| face | upright, standing on its lower edge |
| handle | on its flat side |
| eyes | standing on their stems |
| beak | on its back |
The body has to be upside-down. Its socket openings run down to its lower edge, so as it stands its wall would start as separate pieces with bridges laid across them, which is how the Fossil Rib Cage's first shell failed. Upside-down it starts as one flat disc 85 mm across, with the lid's slots in it. From there the lid's edge and the shoulder lean out at 45°, standing straighter as they rise.
The notch for the microSD card runs up through the base and into the body's lower edge, so nothing spans it in either part: the base prints standing, and the body upside-down with the notch open at the top.
The face is a curved shell 1.8 mm thick and 45 mm tall. It stands on 2.7 cm². If it comes loose, give it a brim.
PETG is the safer choice next to a Pi 4, at least for the body.
Hardware
| Qty | Screw | Where |
|---|---|---|
| 3 | M3 × 8 pan head | base → body, from underneath |
| 3 | M3 × 8 pan head | fan plate → body, from underneath, inside the body |
| 2 | M3 × 8 pan head | handle, up through each of its tongues, inside the body |
| 1 | M3 × 8 pan head | lid → marshmallow, from inside |
| 1 | M3 × 8 pan head | body → beak, through the face, from inside |
| 4 | M2.5 × 6 | Pi → base posts |
| 2 | M2.5 × 6 | body → eyes, from inside |
| 4 | 12 mm stick-on rubber feet | recesses under the base |
| 1 | 12 mm momentary push button, panel mount (M12 thread) | power button, back right |
| 1 | CanaKit Raspberry Pi Fan (RSP-FAN, 30 × 30 mm) | under the lid |
That is 10 M3 × 8 and 6 M2.5 × 6. All screws thread straight into the plastic (pilot holes are sized for that). The button, fan and feet are the same ones the other cases use.
Assembly

"Front" is the side with the face. Seen from the front, USB and Ethernet are on the left and the handle on the right.
- Screw the Pi to the four posts in the base: USB and Ethernet over the flat part of the base's rim, USB-C and HDMI over the lowered part. The microSD card's end is then over the notch in the base.
- Fit the marshmallow with 1 M3 screw up through the middle of the lid from inside the body. Do this before the fan goes in.
- Put the face on. Hold it with its top tilted out, hook its lower edge under the body's lower edge, lift it about 2 mm so the hook goes up behind the wall, then swing its top in until it lies in its bed.
- Push each eye through its hole in the face from the front and fit 1 M2.5 screw into it from inside the body. Lay the beak in its bed on the face and fit 1 M3 screw into it from inside, through the wall and the face.
- Push the handle's two tongues into the two slots in the side opposite the USB sockets, the handle's flat side toward the back. Turn the body upside-down and fit 1 M3 screw up through each tongue into the block above it.
- With the body still upside-down, lay the fan in the round chamber under the lid, label toward the lid, its lead out through the notch in the chamber's wall. Put the plate on, its four corner pieces round the fan, and fit 3 M3 screws.
- Push the power button through its hole from outside and tighten its nut inside.
- Hold the body over the base. Plug the button onto pins 5 and 6 and the fan's two wires onto pins 4 and 9 (see "Wiring" below).
- Lower the body straight down. Its socket openings are slots open at the bottom, so they pass the sockets, and the two lips on the base go inside the wall either side of the handle.
- Turn the case over, fit the 3 base screws, and stick on the feet. The screw heads sit 6.4 mm down their holes.
The card can go in before the body goes on or after: see "The microSD card" below. The handle is for looks and for turning the case round. I would not carry it by the handle: see "What has been checked".
The microSD card

The card (red in the picture) is under the handle. Its end is 8 to 9 mm inside the mug's side, so a notch 24 mm wide runs up through the base and into the body's lower edge to reach it. The notch is 13 mm tall from the underside of the base and reaches 4 mm in under the card, through the base's floor. The handle's lower arm comes down to 1 mm under the notch's top, just outside it.
- Out: put a fingernail on the card's end, on its underside or its top, and draw it straight out. The Pi 4's slot holds the card by friction; it does not spring out. Tweezers or a plastic pick do it if a nail will not.
- In: label down, contacts toward the board. Hold the card by its long edges, slide it straight in through the notch, and push its end with a fingertip or a nail until it stops.
Standing on its feet, the mug leaves a finger the 15.5 mm between the table and the handle's lower arm. Lay the fingertip almost flat on the table and slide it straight in, and the top of the fingertip, where the nail is, meets the card's end. It is easier with the handle's side of the mug lifted a few centimetres off the table: then the notch is open from below as well. "What has been checked" has how far this was tried.
Wiring
With the base in front of you and USB and Ethernet on your left, the 40-pin header runs along the near edge of the Pi and pin 1 is at its right-hand end (the microSD end). The row nearer you holds the even pins, the row nearer the middle of the board the odd ones.
- Button → pins 5 and 6: the third pair from the right, one behind the other. Either wire on either pin.
- Fan red → pin 4 (5 V): near row, second from the right.
- Fan black → pin 9 (ground): far row, fifth from the right.
Count carefully: the first two pins of the near row (pins 2 and 4) carry 5 V. Bridging
5 V to a GPIO pin can damage the Pi. The fan runs whenever the Pi has power.
The Arcade Wedge's README has the dtoverlay=gpio-shutdown line
the button needs and what to expect from it.
Fan

The fan lies flat under the lid in a round chamber 50 mm across. A plate screwed up under the chamber carries it, with a 28 mm hole under the fan and a corner piece at each of its corners. Four small posts on the lid stop the fan 3 mm short of the lid, so its air spreads to every slot. Nothing clips, and nothing pinches: the fan lies on the plate by its own weight, with 0.2 to 0.8 mm above it.
With its label toward the lid the fan draws air up off the Pi and blows it out through the two inner rings of ripples in the lid, 4.8 cm² in all. The two outer rings are grooves only. Air comes in through the three wisps of steam (1.2 cm²), the card's notch under the handle (3 cm²) and round the sockets. Turned over, the fan blows down onto the Pi instead.
Check before printing
- Fan: the chamber takes a fan 30 × 30 mm square and up to 7.6 mm thick.
CanaKit publishes 30 × 30 mm but not the thickness; 7 mm is the figure usually
quoted. If yours is thicker, set
FAN_T_MAXto its thickness and re-run the script. - Plugs: the back sockets are at the back of a recess under the mug's side, 58 mm wide and 21 mm tall. It is 13 to 18 mm deep at the USB-C socket and 21 to 27 mm at the HDMI and audio sockets. A straight plug goes in. One that turns a corner at the plug may not. The USB and Ethernet sockets are in a recess up to 12 mm deep.
- Button: a 12 mm panel button with a rim up to 17 mm across and a nut up to
16.2 mm across its corners. Set
SWITCH_HOLE_Dto 0 for no hole.
What differs from the concept picture
- It is not a mirror image this time. With the face at the front, USB and Ethernet are on its left and the handle on its right, as pictured, and the power and TV cables leave from the back. But the USB sockets are a quarter turn from the face, further round than pictured.
- The sockets are in recesses. A Pi is a rectangle and the mug is round, so the board's two socket edges are well inside the wall: up to 12 mm at the USB end and up to 27 mm at the back. The picture shows the USB sockets almost flush.
- It is squatter: 68 mm tall and 116 mm across.
- The lid is part of the body. It overhangs the shoulder by 1 mm so that it reads as a lid.
- The marshmallow is not a button. It is screwed down. The power button is a plain 12 mm one at the back, on the right, which the picture does not show.
- The steam is beside the USB recess, not above it, and is three slits right through the wall.
- The face stands 0.6 mm out of the body with a square edge, and the belly's sides run straight down to the base. The eyes are separate black beads, and the beak is a rounded cone.
- The handle is flat on the side that faces the back, where it lay on the bed.
- The feet are stick-on rubber ones in recesses, not printed.
- A fan, which the picture does not show.
What has been checked
- Nothing here has been printed.
- Both checks of
../print_check.py(uv run ../print_check.py stl/*.stl), which the Fossil Rib Cage's two failed prints were missing: - Every part starts on the bed as one piece, and no piece starts apart from the rest higher up. An earlier drawing of the body failed this: the sloped ends of the two strips between the USB and Ethernet openings stood 1.4 mm clear of the wall they should have run into (two specks of 0.3 mm²). They now run into it.
- No piece leans far while it stands alone. The pieces that do stand alone are in the body: the two strips of wall between the wisps of steam (the longer 2.8 × 4.8 mm, 20 mm tall, following the wall's lean of up to 31°), the two strips between the USB and Ethernet openings (3 × 4.2 mm, 19 mm tall) and a post between the back openings (1.9 × 2.4 mm, 8 mm tall). Worked out as beams, the longer steam strip moves 0.14 mm at the top for each newton pushed sideways and sinks 0.009 mm for each newton pressed down. The grille bars of the Arcade Wedge's shell, which printed, move 0.47 and sink 0.03; the rib cage's legs that failed sank 0.09.
- Undersides, by scanning the print-orientation STL files for faces that lean more than 45°. What it finds are bridges and the tops of holes:
- body: the roofs of the lid's grooves (2.6 mm wide, 0.8 mm off the bed), the tops of the handle's two slots (8 mm bridges), and the tops of the button's hole (12.4 mm round) and of the screw holes. The shoulder, the slopes above the two recesses, the screw blocks and the thicker patches behind the eyes, beak and button all lean 45° or less.
- base: the roofs of the feet's recesses (12 mm) and the screw heads' (7 mm), as the other cases' bases have.
- handle: only its two screw holes, which lie sideways (3.4 mm). Its flat is as wide as it needs to be for the tube's side to start at 45°.
- face, eyes, marshmallow, plate: nothing over 4 mm². Beak: its screw hole ends in a blunt point.
- In CAD: no part overlaps another, or the reference Pi, a fan 7 or 7.6 mm thick, the button, any screw head, or jumper plugs standing on header pins 4, 5, 6 and 9. These moves were stepped through with nothing touching: each eye out along its stem, the handle straight out, the plate with the thickest fan on it down out of the body past the handle's screws and the button, and the body with everything fixed to it up off the base over the Pi.
- The face going on: it cannot slide straight up, because the mug is wider in the middle than at its lower edge. Fifteen positions along the tilt-and-hook path in "Assembly" were tried. None overlaps the body; at one the hook just touches it.
- The beak: its mesh is a closed surface. It lies inside its bed in the face. Its screw hole has 1.9 mm of plastic round it for its whole depth and 3 mm above its point.
- In the slicer: the four plates slice in Bambu Studio with the P2S profile, no supports, no warnings. Both of the Rib Cage's failed plates passed this too, so it says little.
- What to look at on the first print of the body:
- Next to the lid, the shoulder leans out at 45° from the first few millimetres. It is the part most looked at from above and may come out rough there.
- The skin behind the face is 1.2 mm thick, three walls with nothing between them.
- The two inner rings of the lid are slots. What joins the middle of the lid to the rest is three strips between the slots of the innermost ring, each 5 mm wide and 2.6 mm thick.
- What depends on the printer and has no check here: the face in its bed and its hook
under the body's edge, the eyes in their holes, the handle's tongues in their slots
(
FIT), and the screws biting. The weakest is the M2.5 into each eye, with 2.8 mm of thread. - The microSD card's notch was added after everything above was checked, and checked again on its own. Nothing with the notch has been printed, and no card or finger has been tried in it.
print_check.py: the base and the body each still start on the bed as one piece, the body's list of pieces standing alone is the same five as before, and nothing is marked.- Undersides: the notch adds nothing that faces the bed to either part. (The base's 45° chamfer round its lower edge now shows in places as leaning 45.2°: those are the triangles of the same chamfer, cut into differently.)
- In CAD: the card's straight way in, 14 mm wide from 1 mm under the card up to the board, is clear of every part. The notch stays 5 mm below the slot for the handle's lower tongue, 3.1 mm from that tongue's screw head, 10 mm from the nearest Pi post, 15.7 mm from the nearest foot and 24 mm from the nearest base screw's block. No part overlaps another, and the body with the handle on it lowers onto the base over the Pi with nothing touching. The lip on the base is now two pieces of about 14 mm, one each side of the notch, where it was one of about 35 mm; to keep that much it runs 30° either side of the handle instead of 20°.
- A finger, as a model: a rod of oval section with a rounded end, slid in along its own length until it touched the card, with the case on its feet 3.5 mm above the table, tried at heights 0.5 mm apart, from 10° down to 60° up and turned up to 30° to either side. Before the notch, no fingertip reached the card. Now one 16 mm wide and 13 mm thick reaches the card's end lying on the table or within 2.5 mm of it, level or pointing a little down, straight in or turned up to 15°. One 14 × 11 mm does it turned up to 30°; one 18 × 15 mm only level and turned no more than 15°. What limits it is the handle's lower arm above and the table below. With the table taken away, as with the mug lifted, the 16 × 13 fingertip reaches the card from level up to 60° from below. A notch 20 mm wide reaching 2 mm under the card let the 16 × 13 finger in only straight and level; 28 mm wide let it turn 30°; a top at 14 mm instead of 13 made no difference.
- Not checked: whether a fingernail gets a real card out of a real slot through it, or how a real finger, which is softer and less regular than the model, fits.
- Slicer: plate 1 slices with no warnings, in 3 h 4 min with 115 g (it was 3 h 5 min with 116 g).
- What I have not worked out: how much the handle carries. Each arm is held by a tongue 3.4 × 7.7 mm with one M3 screw through it, and the case weighs about 200 g with the Pi in it. That is why I would not carry it by the handle.
- What depends on parts I have not measured: the button's rim on the flat cut for it, where the fan's lead leaves it, and whether the fan rattles on its plate.
Parameters worth knowing (top of penguin_case.py)
| Name | Default | Effect |
|---|---|---|
RB, R_MAX, RL |
54 / 58 / 44 | radius of the body at its lower edge, where it is widest, and of the lid |
ZT, LID_H, LID_LIP |
68 / 5 / 1 | top of the lid, how tall the lid stands above the shoulder, how far it overhangs it |
Z_RIM |
9 | height of the base. The Pi's board is PI_LIFT (1 mm) above it |
XU, YB |
46.2 / 30.8 | where the two flat walls are that the sockets look out of. They place the Pi |
ZA, Z_DIP |
28 / 7.2 | roof and floor of the recess at the back |
FIT |
0.25 | clearance between printed parts; raise it if your printer runs tight |
FAN_T_MAX, PLENUM |
7.6 / 3 | thickest fan the chamber takes, and the space left between it and the lid |
CH_R |
25.2 | inside radius of the fan's chamber. Its plate has to pass the flat back wall on the way in, so it cannot be much bigger |
RIPPLES, GROOVES, RIPPLE_W |
see file | the lid's slots and grooves: radius and the angles each runs between, and their width |
STEAM_AZ, WISPS, WISP_W |
43 / three / 2.6 | where the steam is round the mug, each wisp's place, height and sway, and its width |
SWITCH_HOLE_D, BTN_AZ, BTN_Z |
12.4 / 314 / 40 | the button's hole (0 for none) and where it is |
SD_NOTCH_W, SD_NOTCH_TOP, SD_NOTCH_IN, SD_NOTCH_R |
24 / 13 / 4 / 3 | the notch the microSD card is reached through (SD_NOTCH_W 0 for none): its width, its top above the underside of the base, how far it reaches in under the card's end, the radius of its corners |
LIP_AZ |
30 | how far round the mug, either side of the handle, the lip on the base runs |
HANDLE_Z0, HANDLE_Z1, HANDLE_R, HANDLE_XC |
20 / 54 / 8 / 65 | heights of the handle's two arms, the radius of its tube, how far out its bend is |
TONGUE_T, TONGUE_IN |
3.4 / 11 | thickness of the handle's tongues, and how far they reach inside |
FACE_W, FACE_Z1, LOBE_X, LOBE_Z, LOBE_R |
31 / 26 / 11 / 41 / 13 | the face: half-width of the belly, how high its sides stay upright, and the two round brows |
POCKET, PROUD |
1.2 / 0.6 | depth of the face's bed, and how far the face stands out of it |
HOOK_H, FOOT_GAP |
1.8 / 1.2 | height of the hook along the face's lower edge, and the gap under the body's edge that lets it in |
EYE_X, EYE_Z, EYE_D, EYE_DOME |
12 / 42 / 8.4 / 2 | where the eyes are, how big, how far they stand out |
BEAK_Z, BEAK_W, BEAK_H, BEAK_OUT, BEAK_PUFF |
33.5 / 16 / 11 / 8 / 2.5 | the beak: height of its screw, its size, how far it stands out, how full it is |
MALLOW, MALLOW_TURN |
18 × 18 × 12 / 18 | the marshmallow's size and how far it is turned |
M3_PILOT, PI_SCREW_PILOT |
2.8 / 2.15 | self-tapping hole sizes |
Angles round the mug are in degrees from the USB side toward the face: the face is at
90 and the handle at 180. A thinner beak leaves less plastic round its screw. Run
uv run ../print_check.py stl/*.stl after any change.
Redrawing the previews
uv run penguin_case.py --assembled /tmp/penguin_assembled
/Applications/Blender.app/Contents/MacOS/Blender -b -P render_previews.py -- \
/tmp/penguin_assembled stl preview
The pictures are drawn from a coarser mesh than the print files, which is why the mug's side shows flats in them.
Where the dimensions come from
- Raspberry Pi 4 Model B: official mechanical drawing (https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-mechanical-drawing.pdf). The display and camera connectors are drawn 5.5 mm tall, the usual figure for that kind of connector, not one taken from the drawing.
- Fan: CanaKit Raspberry Pi Fan product page (https://www.canakit.com/raspberry-pi-fan.html): 30 × 30 mm. The thickness is the usual value for 30 mm fans, not a CanaKit figure.
- Push button: a 15 mm rim, a 14 mm nut and 27 mm behind the rim are the usual values for 12 mm panel buttons, not a measurement of yours.
- Jumper plugs are drawn 14 mm tall on a header 2.5 mm above the board.