Moonbell Cottage

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

Moonbell Cottage — Raspberry Pi 4 case as a cottage

111 L × 81 W × 67 H mm (plus feet). Seven printed parts in five colours (the shutter is printed twice), none needs supports.

assembled

A white cottage on a black base, with a purple shingle roof, a blue door with a gold moon on it, and two shuttered windows. The Pi is inside the walls. The fan lies in the attic and blows out through the slots in both gables. The stars in the shutters are real holes. This case has a power button, on the end wall away from the USB sockets, and no camera. Under the button, an opening at the foot of the wall reaches the microSD card, so it comes out and goes in with the case closed.

Files

File What it is
3mf/plate_1_black.3mf the base, in print orientation
3mf/plate_2_white.3mf walls and attic block
3mf/plate_3_purple.3mf the roof
3mf/plate_4_blue.3mf the door and two shutters
3mf/plate_5_gold.3mf the moon
stl/ the same seven parts one by one
step/cottage_assembly.step assembled CAD model incl. a reference Pi, fan and button, for Fusion / FreeCAD / Onshape. The moon is not in it (see below)
cottage_case.py parametric source. uv run cottage_case.py regenerates everything above
preview/ renders: assembled, front, rear, the button's end (card), top, exploded, inside, print plates

Six parts are drawn as solids, like the other cases. The moon 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 base 39 min 22 g
2 white walls, attic block 1 h 44 min 70 g
3 purple roof 1 h 35 g
4 blue door, 2 shutters 10 min 3 g
5 gold moon 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, attic block as they stand
walls upside-down, standing on the ceiling
roof on end, standing on one gable edge with the ridge upright
door, shutters, moon on their backs

The walls have to be upside-down. Their socket openings run down to their lower edge, and so does the top of the way in to the microSD card, so as they stand they would start as separate pieces with bridges laid across them, which is how the Fossil Rib Cage's first shell failed. Upside-down they start as one flat face 100 × 69 mm and the openings are open at the top. That is also why the two gables are not part of the walls: upside-down they would be points on the bed.

The roof stands on end so that both of its sides print as upright walls, with the shingles drawn by the outline of each layer. It is the tallest, thinnest print here: 77 mm tall on a footprint of 111 × 32 mm, with 4.3 cm² of it touching the bed. If it comes loose, give it a brim.

PETG is the safer choice next to a Pi 4, at least for the white parts.

Hardware

Qty Screw Where
4 M3 × 8 pan head base → walls, from underneath
4 M3 × 8 pan head walls → attic block, up through the ceiling from inside
2 M3 × 8 pan head attic block → roof, up into the ridge from inside the block
1 M3 × 8 pan head wall → moon, through the door, from inside
4 M2.5 × 6 Pi → base posts
4 M2.5 × 6 wall → shutters, two each, 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, in the end wall
1 CanaKit Raspberry Pi Fan (RSP-FAN, 30 × 30 mm) in the attic

That is 11 M3 × 8 and 8 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 door. Seen from the front, USB and Ethernet are at the left-hand end and the power button at the right-hand end.

  1. Screw the Pi to the four posts in the base: the 40-pin header along the front (the side with the four slots), USB-C and HDMI over the dip in the back edge.
  2. Hold each shutter over its star-shaped hole in the front wall, curved edge up, and fit 2 M2.5 screws into it from inside the walls.
  3. Lay the moon in its bed on the door, sit the door inside its frame, and fit 1 M3 screw from inside through the wall and the door into the moon.
  4. Push the power button through the hole in the end wall from outside and tighten its nut inside.
  5. Turn the attic block upside-down and lay the roof under it. Fit 2 M3 screws down the two holes inside the block's passage into the roof's ridge. The roof goes on either way round.
  6. Stand the walls upright. Lay the fan on the ceiling over the round hole, label up, turned so its lead leaves beside the L-shaped slot, and feed the lead down through the slot.
  7. Lower the attic block over the fan, the vents to front and back and its cut-away corner over the lead. Two ridges pinch the fan, so press it down the last few millimetres. Holding the two together, turn them over and fit 4 M3 screws through the ceiling into the block.
  8. Hold the walls 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 walls straight down. Their socket openings are slots open at the bottom, so they pass the sockets, and the lip on the base goes inside the front wall and the button's end wall.
  10. Turn the case over, fit the 4 base screws, and stick on the feet. The screw heads sit 6.4 mm down their holes.

The microSD card goes in and comes out with the case closed: see below.

The microSD card

the button's end, with the way in to the card at its foot

The card comes out and goes in with the case closed and standing on its feet, through the opening at the foot of the power button's end wall. The card's end is 9 mm in from the wall's face, under the end of the board, too deep for a slot and a nail. So the opening runs from the bottom of the base up to 14 mm, 24 mm wide, and the base's floor is cut away for 13 mm behind it. A fingertip slides in along the table to the card's underside, and nothing else is in its way.

Wiring

With the base in front of you and its slotted front edge toward you, 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 on the walls' ceiling, over a 28 mm hole above the middle of the Pi, in a pocket in the underside of the attic block. Nothing clips. The pocket's sides hold it and two ridges pinch it, a low wall at each end of the pocket stops it sliding along the attic, and the pocket's sloping sides stop it rising.

With its label up the fan draws air up off the Pi and blows it along a passage under the ridge and out through the three slots in each gable, 3 cm² in all. Air comes in through the four slots in the base, the stars in the shutters, the way in to the microSD card and round the sockets. Turned over, it blows down onto the Pi instead.

Check before printing

What differs from the concept picture

What has been checked

Parameters worth knowing (top of cottage_case.py)

Name Default Effect
HL, WS, R0 50.2 / 34.5 / 3 half-length, half-depth and corner radius of the walls. The Pi sits against the back wall and the USB end; the front and the other end have the room for the screw blocks and the button
Z_RIM 9 height of the black base. The Pi's board is PI_LIFT (1 mm) above it
Z_DIP 7.2 top of the base under the back sockets
Z_CEIL, CEIL_T 33 / 2.6 underside and thickness of the ceiling
BASE_IN 1 how far the base stands inside the walls
SLOT_X, SLOT_L four / 9 the air slots in the front of the base
PITCH_T 0.48 rise of the roof per mm across
EAVE_OUT, GABLE_OUT 5.3 / 3.2 how far the roof overhangs the side walls and the gables
JETTY 0.8 how far the gables stand proud of the walls
ROOF_T, ROOF_CL 2.2 / 0.25 the roof's thickness under its shingles, and its gap to the attic block
COURSES, TABS, SH_TIP 5 / 5 / 2 rows of shingles a side, shingles in a row, thickness at their round ends
RIDGE_R 3.6 the roll along the ridge. The two ridge screws end inside it
VENTS, VENT_H three / 2.6 the slots in each gable: height above the walls and width, and how tall each is
FIT 0.25 clearance between printed parts; raise it if your printer runs tight
FAN_T_MAX, FAN_FIT 7.6 / 0.2 thickest fan the pocket takes, and the clearance at its sides
FAN_GRIP 0.25 height of the two ridges that pinch the fan (less = looser)
WIRE_W, WIRE_L 3.5 / 12 the room for the fan's lead round one corner of the pocket
SWITCH_HOLE_D, BTN_Y, BTN_Z 12.4 / 0 / 24 the button's hole (0 for none) and where it is on the end wall
SD_HOLE_W, SD_HOLE_Y, SD_HOLE_TOP, SD_HOLE_R 24 / 0 / 14 / 4 the way in to the microSD card, at the foot of the button's end wall: its width (0 for none), its middle, its top above the base's underside and the radius of its top corners. The card's middle is at y = -3.7
SD_FLOOR_IN 13 how far in from the wall's face the base's floor is cut away behind it (0 for not at all). The card's end is 9 mm in
DOOR_W, DOOR_STRAIGHT, DOOR_T 24 / 9 / 2 the door: width, height below its round top, thickness
FRAME_W, FRAME_H 3.6 / 2.6 the frame round the door: width at the wall, how far it stands out
SHUT_X, SHUT_Z, SHUT_W, SHUT_H, SHUT_T 30 / 22.6 / 16 / 17.6 / 4 where the windows are, and the shutters' size
WIN_R, WIN_RI 4.2 / 1.8 the star in each shutter: tips and notches
MOON_R, MOON_RI, MOON_OFF, MOON_TURN 7 / 5.2 / 4.4 / 20 the moon: its outer circle, the circle bitten out of it, how far over the bite is, and which way it faces
MOON_H, MOON_PUFF, MOON_SINK 6.4 / 3 / 0.4 how far the moon stands up, how full it is, how deep it sits in the door
M3_PILOT, PI_SCREW_PILOT 2.8 / 2.15 self-tapping hole sizes

A thinner moon leaves less plastic round its screw. Run uv run ../print_check.py stl/*.stl after any change.

Redrawing the previews

uv run cottage_case.py --assembled /tmp/cottage_assembled
/Applications/Blender.app/Contents/MacOS/Blender -b -P render_previews.py -- \
    /tmp/cottage_assembled stl preview

Where the dimensions come from