← SHEET 02 · ASSEMBLIES HW-003

Wall-Fold Bed, Spring-Counterbalanced

HWMECHANISM
LIVE DRAWING — HOVER OR DRAG TO CRANK · BUILT FROM THE REAL PLANT PARAMETERS
PART NOHW-003
MATL / SYSTEMSTEEL FRAME · GAS STRUTS · PLY PANEL
TOOLSHand calc · Node glTF export
WALL-FOLD BED, SPRING-COUNTERBALANCED — murphy-bed.glb

The level-2 platform above my sunken office is still under construction, and it is small enough that a fixed bed frame would eat most of the usable floor — exactly the problem that the folding stair down to the office (HW-002) solved one level down, so the same logic applies going up: the bed only exists when it is needed. This one is a design study, not yet a build — a wall-fold (Murphy) bed panel pivoted at its foot, swinging from horizontal (deployed) to vertical, flush against the wall (stowed), with the whole engineering problem riding on one question: how do you counterbalance a weight whose moment about the pivot changes with the cosine of the swing angle, using hardware (gas struts) that only pushes with a roughly constant force?

OVERVIEW & MOTIVATION

Floor area on the level-2 platform is the scarce resource, the same constraint that drove the folding staircase design one level down. A bed panel that can swing up flush against the wall during the day gives the platform back nearly all of its floor space. The panel pivots at its foot (the end nearest the wall/floor line); the head end lifts through 90° to stow vertically. The whole design problem is sizing a counterbalance — gas struts on a moment arm — so that the bed cannot slam down when released from stowed, cannot fly up unassisted when empty, and needs only a light push or pull at any angle in between.

MECHANISM & KINEMATICS

The panel is a rigid body pivoted at one end (the foot). Let phi be the swing angle measured from horizontal: phi = 0 is deployed (panel horizontal, resting on fold-out legs at the head end), phi = 90 deg is stowed (panel vertical, flush against the wall). The panel’s centre of mass sits at L/2 along its length, so its perpendicular (horizontal) distance from the pivot at any angle is (L/2)*cos(phi) — maximum when the bed is flat and horizontal, zero when it is vertical. The weight moment about the pivot is therefore:

M_gravity(phi) = W * (L/2) * cos(phi)

That cosine curve is the entire problem: it is not linear and it is not constant, so a single constant-force spring or strut can only ever approximate it. A counterbalance sized to fully cancel the moment at phi = 0 (deployed, where the moment is largest) would badly over-power the panel near phi = 90 (stowed), and vice versa. The fix used here is a gas strut mounted on a moment arm at both ends (a fixed anchor on the cabinet frame, a moving anchor on the panel itself) — the strut’s own angle relative to the panel changes as it swings, which reshapes the strut’s moment curve enough to track the cosine reasonably well across the range, even though the strut’s own push force is close to constant.

COUNTERBALANCE SIZING

Design inputs (all assumed, none measured — this is a design study):

PARAMETERVALUEUNIT
PANEL_MASS (frame + slats + ply)28kg
MATTRESS_MASS15kg
TOTAL_MASS M43kg
WEIGHT W = M·g (g = 9.81)421.8N
PANEL_LENGTH L2000mm
PANEL_WIDTH1000mm
CoM_DISTANCE (L/2)1000mm
PIVOTat the foot (wall/floor line)-
STRUT_ARM_ON_PANEL d300mm
STRUT_FIXED_ANCHOR C (x, y from pivot)(125, 1550)mm
STRUT_FORCE (2 struts x 650 N)1300N
TARGET_RESIDUAL<= 60N·m

The pivot is the origin, +x out into the room (deployed direction), +y up (stowed direction). At swing angle phi, the panel-side strut anchor sits at D = (d*cos(phi), d*sin(phi)); the cabinet-side anchor C is fixed. The strut’s own angle at any pose is solved with Math.atan2(D.y - C.y, D.x - C.x) — never assumed — and its moment about the pivot is F_s * cross(D, C) / |D - C| (the standard force-times-moment-arm relation, evaluated from the actual anchor coordinates rather than an assumed lever length).

Arithmetic at the three angles (phi measured from horizontal):

ANGLE (from horizontal)GRAVITY MOMENTSTRUT MOMENTRESIDUALSTRUT LENGTH
0 deg (deployed)421.8 N·m-387.5 N·m34.3 N·m1560 mm
45 deg298.3 N·m-293.1 N·m5.2 N·m1341 mm
90 deg (stowed)0.0 N·m+38.8 N·m38.8 N·m1256 mm

Residual is what a person still has to supply by hand: 34.3 N·m lifting off from deployed, dipping to a near-perfect 5.2 N·m balance around 45°, and 38.8 N·m holding the panel the last few degrees into (and against) the wall at stowed — all comfortably under the 60 N·m target, roughly the effort of lifting a 6 kg mass at arm’s length, a one-hand push. The positive residual at 90° is deliberate, not a flaw: the strut is slightly over-centre there, so it preloads the panel against the wall stop rather than letting it drift open, which is exactly why a mechanical safety latch at the stowed position is required — it holds that preload long-term so the struts (not the latch) never see sustained load, and it is the only thing that should be trusted to keep the panel shut when the room is unattended.

Empty vs. occupied, stated honestly: every number above is sized for the empty panel (43 kg design mass, no occupant). A person must never be on the bed while it is being folded or deployed — the struts are not sized to counterbalance an occupant’s weight, and doing so would require either a much larger strut force (dangerous when the bed is later folded empty) or a separate locking mechanism. This is a fold-when-empty design, same as any domestic wall bed.

PARAMETRIC MODEL

build-glb.mjs rebuilds the whole assembly from the same parameter block above: L, D_ARM, C, FS_TOTAL, and a plinth height offset for the cabinet base. Every part is an oriented box (wall backing, pivot cabinet sides and top, hinge blocks, bed panel, five slats, mattress, pillow, two fold-out legs, two strut anchor blocks, and two gas struts) assembled in the deployed pose (phi = 0). The gas-strut boxes are the one part whose orientation is actually solved rather than placed by hand: for each strut, the script computes len = Math.hypot(Dx-Cx, Dy-Cy) and ang = Math.atan2(Dy-Cy, Dx-Cx) from the real anchor coordinates, then sizes the box [len, 26, 26] and rotates it by ang about Z — the same relation used for the moment-arm arithmetic above, so the model and the hand-calc cannot drift apart. Running node build-glb.mjs from its own folder prints the solved strut length and angle, writes murphy-bed.glb, and calls validateGLB() on the result: 29 parts, 348 triangles, structurally valid GLB confirmed.

STATUS & NEXT STEPS

This is a design study — calculated and modelled, not built. The level-2 platform itself is still under construction, so there is no physical bed panel or cabinet to test against yet. Before cutting steel: confirm the 650 N-per-strut spec (and its extended/compressed lengths, 1256-1560 mm travel here) against an actual supplier catalogue rather than the round number assumed above, and re-run the moment table once the real panel, slats, and mattress are weighed rather than estimated at 28 kg + 15 kg.

USE CASES & APPLICATIONS

Wall-fold beds for small apartments, dorm rooms, and studio conversions where floor area during the day matters more than a permanent bed frame. The same sizing problem shows up in guest rooms and in hospital or care-facility furniture where a bed section must fold clear for cleaning or transfer. More generally, any counterbalanced pivoting panel faces the identical cosine moment problem: hatchback and tailgate struts, machine access covers, and adjustable hospital-bed sections all size their gas struts against the same W*(L/2)*cos(phi) relation used here.

FILES

  • murphybed.js — live animated side-elevation drawing (swing, gas-strut extension, moment-vs-angle indicator), builder registered as murphybed.
  • build-glb.mjs — parametric box-model generator; run with node build-glb.mjs to regenerate the GLB from the parameter block above.
  • murphy-bed.glb — deployed-pose 3D model, 29 parts / 348 triangles, served at /models/murphy-bed.glb.

← BACK TO ASSEMBLIES

NAME ODILBEK MARIMOV
DWG NO. PF-2026
SHEET 01 / 07
DISCIPLINE ROBOTICS / MECHATRONICS
SCALE 1:1
REV A
THIRD-ANGLE PROJECTION
DATE 2026-07-11
UNITS mm