Penguin Mug

This is the README that comes in the download. The files it names are in the zip.

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.

assembled

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

print plates

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:

  1. 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.
  2. Process "0.20mm Standard". Under Strength set Wall loops to 3. Leave supports off.
  3. 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

exploded

"Front" is the side with the face. Seen from the front, USB and Ethernet are on the left and the handle on the right.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. Push the power button through its hole from outside and tighten its nut inside.
  8. 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).
  9. 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.
  10. 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's notch

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.

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.

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

inside

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

What differs from the concept picture

What has been checked

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