Skip to the content
4 layers195 × 45 mmBed lift, the printed circuit board in 3D

Motorized bed lift system

Size
195 × 45 mm
Copper layers
4
Thickness
1.61 mm
Parts
154
Nets
134
Pads
591
Tracks, vias
1,149, 988
Pours
9
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 Oct 2025
Updated
11 Aug 2026

Overview

Bed lift is an open-source printed circuit board by j9brown, from the j9brown/bed-lift repository on GitHub, published under the MIT licence. It is a 4-layer board of 195 × 45 mm with 154 parts on 134 nets, routed with 1,149 tracks and 988 vias.

It is built around the STM32C051C8T6, ISO1640BD and LP2985-33DBVR, with the LP2985-50DBVR, PESD5V0L2UU and S4B-XH-A among its other parts. Its parts include 69 capacitors, 37 resistors, 15 connectors, 10 ICs and 7 diodes. It belongs with the robots and motor control boards and the STM32 boards of this library.

Main components

12

README

README.md

Bed-lift controller

Controls a motorized bed-lift with two synchronized linear actuators for vertical lifting and lowering and two pairs of synchronized stepper motors for horizontal extension and retraction. It fits in the back of a campervan.

Circuit board revisions

Refer to the following documents for design synopsis, schematics, and circuit board illustrations.

  • v1: Fixed errata, improved assignment of pin functions, added span limit hall sensors, buzzer and ESD protection
  • v0.2: First feature-complete circuit board
  • v0.1: Initial hand-assembled prototype

About the "forklift" bed

This custom motorized bed fits in the back of a small campervan to allow dual-use of the living area in a standard wheelbase vehicle. In its raised position, the bed platform is only supported from the back which gives it the appearance of a pallet on a forklift, hence the name.

To maximize space efficiency, the bed is designed for sleeping crosswise with the head and feet towards the sides of the vehicle. This choice of sleeping orientation poses unique engineering challenges; it is more common to design lifting beds for sleeping lengthwise with the head and feet towards the front and back of the vehicle.

Because the van is narrower at roof elevantion than at sleeping elevation, the bed extends and retracts to span the gap between the main body of the bed platform and the sides of the vehicle. The parts that extend and retract are called the bed wings (aka. wing spans). The bed mattress is made of three cushions: one large central cushion on the main body of the bed platform and two narrower cushions that rest on the two bed wings. The narrower cushions are removed and stowed on top of the bed before retracting the bed wings.

  • When the bed is raised, the bed wings retract into the bed platform and the platform is cantilevered from steel columns attached to the rear doorframe and floor of the vehicle.

  • When the bed is lowered, the bed wings extend from the bed platform and rest upon reinforced windowsills to transfer the load of the occupants to the vehicle walls.

The bed has limited load bearing capacity while raised so it must be lowered when occupied or while driving to prevent excess torque through the cantilever. As an advantage, there are no cables, straps, bulkheads, guides, posts, or other obstructions in the front of the living area to support the bed. As a disadvantage, the bed structure is heavy and difficult to build.

Feel free to contact me for advice if you are interested in building a bed like mine (and be prepared for a challenge)!

Video tour of the v0.2 prototype

Photos of v0.2 prototype

Bed lift in lowered position viewed from outside

Bed lift in lowered position viewed from outside

Bed lift in raised position viewed from outside

Bed lift in raised position viewed from outside

Bed lift in lowered position viewed from inside

Bed lift in lowered position viewed from inside

Bed lift in raised position viewed from inside

Bed lift in raised position viewed from inside

Bed lift controls

Bed lift controls

Bed lift driver

Bed lift driver

Bed lift position encoder

Bed lift driver

Photos of v0.1 prototype

Bed lift in lowered position

Bed lift in lowered position

Bed lift in raised position

Bed lift in raised position

CAD model

Bed lift in lowered position

Bed lift in lowered position

Bed lift in raised position

Bed lift in raised position

How to build the firmware

The firmware is based on Zephyr RTOS v4.3 and compiled with west.

  1. Install the Zephyr RTOS SDK tools. You can either follow the Zephyr Getting Started Guide or install an extension for your IDE, such as Zephyr IDE or Workbench for Zephyr, that can install the tools for you.

  2. Install the xPack OpenOCD package for your OS and add it to your system PATH. This step is needed because the version of OpenOCD that is distributed with Zephyr is too old and doesn't support the STM32C0x series of chips. We need OpenOCD v0.12.0-7 at minimum.

  3. Get the code and its dependencies. This is a little more complicated than simply cloning this git repository because the Zephyr west multi-tool assumes that all of the code resides within a top directory called a workspace. You will need to create an empty directory to be the workspace first. Here's how to do it from the command-line and the same thing can be done with IDE extensions.

sh
$ mkdir bed-lift-workspace
$ cd bed-lift-workspace
$ west init -m https://github.com/j9brown/bed-lift
$ west update
  1. Build and the firmware (either release or debug).
sh
$ cd bed-lift/firmware/app
$ west build -p -d build/release
$ west build -p -d build/debug -- -DFEATURE_LOG=y -DFEATURE_DEBUG=y
  1. Connect an ST-Link v3 programmer to the DEBUG port with an STDC14 cable. Flash the firmware.
sh
$ cd bed-lift/firmware/app
$ west flash

Firmware for the older prototypes is preserved in the git history.

  • The v0.2 firmware was based on Zephyr RTOS v4.2.1 and compiled with Platform IO.
  • The v0.1 firmware was based on Arduino and compiled with Platform IO.

Usage

The lift control panel has three switches:

  • Power: This on / off switch provides power to the lift driver and all actuators. It is intended to remain on indefinitely. Can be used to cut power in case of emergencies.
  • Up / Off / Down: This momentary-on / off / momentary-on switch has two positions. Toggling the switch to the Up position raises the lift to the lounge position. Toggling the switch to the Down position lowers the lift to the sleeping position. The switch must be held in the Up or Down position for 0.5 seconds to engage the actuators as a precaution against accidental triggering. The lift stops moving immediately as soon as the switch is released and returns to the Off position.
  • Mode: This momentary-on / off switch activates special modes.

By default, the lift starts on the Main Menu and the Up / Off / Down controls whether the lift moves into the lounge or sleep position.

While holding the switch Up or Down and the lift is raising or lowering, press the Mode button to activate automatic movement. Then, release all of the controls and the lift will continue moving in the requested direction until the final position is reached or an error occurs. To stop automatic movement, press any control.

Use caution when activating automatic movement and continue paying attention to the lift to avoid damage or injury!

to ensure the lift won't encounter any obstructions in this mode because it could damage itself if you aren't paying attention!

To access a different menu, press and hold the Mode button for 3 seconds until the indicator lights Amber then blinks one or more times in a different color and a tone is played. The second color indicates the menu and the number of blinks indicates the action that will be performed when the Up / Off / Down switch is activated. Press the Mode button to cycle among actions and observe the number of blinks change. Press and hold the Mode button for 0.5 seconds to access the next menu and observe the blink color change. Refer to the table below to identify the currently selected menu action.

The lift reverts to an idle state when the user does not interact with the controls for some time.

Visual feedback

An RGB color indicator shows the state of the device at the control panel. There is also a monochromatic red LED on the circuit board itself that indicators the same state as the indicator (but without color).

  • When the lift remains idle for some time, the indicator turns off.
  • When the lift is rising, the indicator shows a rainbow color wheel cycling from red to violet.
  • When the lift is lowering, the indicator shows a rainbow color wheel cycling from violet to red.
  • When the lift achieves the lounge or sleep position, the indicator lights Green.
  • When the lift movement is aborted without achieving the lounge or sleep position, the indicator lights Amber.
  • When a diagnostic menu mode is active, the indicator lights Amber then blinks one or more times in a different color depending on the menu.
  • When an error occurs, the indicator lights Red then blinks one or more times in a different color depending on the error.
Solid colorBlink colorBlinksPurposeMeaning
Rainbow upActivityLift is rising
Rainbow downActivityLift is lowering
GreenStatusLift is in lounge or sleep position, ready for use
AmberStatusLift is in an intermediate position, not ready for use
AmberCyan1MenuLift menu: Jog both lift actuators in tandem (synchronized)
AmberCyan2MenuLift menu: Jog both lift actuators indepedently (not synchronized)
AmberCyan3MenuLift menu: Jog lift actuator 1 (driver side)
AmberCyan4MenuLift menu: Jog lift actuator 2 (passenger side)
AmberBlue1MenuSpan menu: Jog all span actuators in tandem (synchronized)
AmberBlue2MenuSpan menu: Jog both span actuators 1 and 2 (driver side) in tandem (synchronized)
AmberBlue3MenuSpan menu: Jog both span actuators 3 and 4 (passenger side) in tandem (synchronized)
AmberBlue4MenuSpan menu: Jog both span actuator 1 (front driver side) independently (not synchronized)
AmberBlue5MenuSpan menu: Jog both span actuator 2 (rear driver side) independently (not synchronized)
AmberBlue6MenuSpan menu: Jog both span actuator 3 (front passenger side) independently (not synchronized)
AmberBlue7MenuSpan menu: Jog both span actuator 4 (rear passenger side) independently (not synchronized)
RedErrorError: An unspecified error occurred
RedMagenta1ErrorControl error: Movement of the bed has been remotely inhibited
RedAmber1ErrorBed error: The bed components are in an unknown or unexpected state
RedCyan1ErrorLift error: Motor driver reported a fault
RedCyan2ErrorLift error: The actuators lost synchronization
RedCyan3ErrorLift error: Lift stationary when it should be moving or the hall sensors are not working correctly
RedCyan1ErrorLift error: I/O error communicating with the motor driver
RedCyan1ErrorLift error: Operation timed out because poll wasn't called often enough
RedBlue1ErrorSpan error: Motor driver reported a fault
RedBlue2ErrorSpan error: The actuators lost synchronization
RedBlue3ErrorSpan error: The actuators did not stall at their home position as expected
RedBlue4ErrorSpan error: The actuators traveled further than the expected distance without stalling
RedBlue5ErrorSpan error: I/O error communicating with the motor driver
RedBlue6ErrorSpan error: Operation timed out because poll wasn't called often enough

Audible feedback

A piezo buzzer provides audible feedback.

  • When the lift successfully raises into the lounge position, it plays a brief fanfare that ends on a rising tone.
  • When the lift successfully lowers into the sleep position, it plays a brief fanfare that ends on a falling tone.
  • When the lift encounters an error, it plays three long tones as an alert.
  • When the user attempts to perform an action that has been remotely inhibited, the lift plays three quick tones.
  • When using the diagnostic menu, the lift plays a tone as each menu or mode is entered.

I2C interface

Connect an I2C host to the lift driver's EXT I2C port using a QWIIC connector to remotely monitor the device, remotely inhibit operation of the control panel, and access low-level debug and test features. The EXT I2C port galvanically isolates the bed lift from the host's power supply for safety.

Refer to monitor.c for the I2C protocol implementation.

Notice

The bed-lift software, documentation, design, and all copyright protected artifacts are released under the terms of the MIT license.

The bed-lift hardware is released under the terms of the CERN-OHL-W license.

Parts

154
QtyValueFootprintReferences
132.2KResistor_SMD:R_0402_1005MetricR1, R2, R12, R13, R14, R15, R16, R17, R18, R19, R26, R28, R29
9100nCapacitor_SMD:C_0402_1005MetricC1, C2, C13, C14, C15, C16, C17, C23, C33
9100nCapacitor_SMD:C_0603_1608MetricC12, C20, C21, C30, C31, C45, C53, C61, C69
810nCapacitor_SMD:C_0603_1608MetricC40, C41, C48, C49, C56, C57, C64, C65
810nCapacitor_SMD:C_0402_1005MetricC5, C8, C24, C25, C27, C34, C35, C37
822KResistor_SMD:R_0402_1005MetricR6, R7, R8, R9, R10, R11, R20, R21
622nCapacitor_SMD:C_0603_1608MetricC22, C32, C43, C51, C59, C67
622uCapacitor_SMD:C_1210_3225MetricC19, C29, C39, C47, C55, C63
647uCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC18, C28, C38, C46, C54, C62
51uCapacitor_SMD:C_0603_1608MetricC4, C7, C10, C26, C36
410KResistor_SMD:R_0402_1005MetricR3, R4, R5, R27
41KResistor_SMD:R_0402_1005MetricR32, R33, R35, R36
41uCapacitor_SMD:C_0805_2012MetricC44, C52, C60, C68
4220nCapacitor_SMD:C_0603_1608MetricC42, C50, C58, C66
4DRV8434SPWPRDRV8434SPWPR:HTSSOP-28 PWP0028MU7, U8, U9, U10
4JLCPCB_PCBA_Tooling_HoleGeneric:JLCPCB_PCBA_Tooling_HoleTH1, TH1, TH1, TH1
4MountingHole_2.7mm_M2.5MountingHole:MountingHole_2.7mm_M2.5MP1, MP2, MP3, MP4
4PESD5V0L2UUPackage_TO_SOT_SMD:SOT-323_SC-70D2, D3, D6, D7
4S4B-XH-AConnector_JST:JST_XH_S4B-XH-A_1x04_P2.50mm_HorizontalJ12, J13, J14, J15
3220Resistor_SMD:R_0402_1005MetricR23, R24, R25
2100KResistor_SMD:R_0402_1005MetricR30, R31
22.2uCapacitor_SMD:C_0603_1608MetricC6, C9
2470Resistor_SMD:R_0402_1005MetricR34, R37
2DRV8874PWPRDRV8874PWPR:HTSSOP-16 PWP0016JU5, U6
2Molex Mini Fit Jr 39-30-1060Molex:MOLEX_39301060J10, J11
2S6B-XH-AConnector_JST:JST_XH_S6B-XH-A_1x06_P2.50mm_HorizontalJ5, J7
2SM04B-SRSS-TBConnector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ1, J3
13.3KResistor_SMD:R_0603_1608MetricR22
14.7uCapacitor_SMD:C_0603_1608MetricC11
1680uCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC3
1BM04B-SRSS-TBConnector_JST:JST_SH_BM04B-SRSS-TB_1x04-1MP_P1.00mm_VerticalJ8
1Conn_02x08_Odd_EvenConnector_PinSocket_2.54mm:PinSocket_2x08_P2.54mm_VerticalJ6
1Conn_ST_STDC14Samtec:SAMTEC_FTSH-107-01-L-DV-K-AJ9
1ISO1640Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1KT-0603RLED_SMD:LED_0603_1608MetricD4
1LP2985-33DBVRPackage_TO_SOT_SMD:SOT-23-5U1
1LP2985-50DBVRPackage_TO_SOT_SMD:SOT-23-5U2
1MMBT3904Package_TO_SOT_SMD:SOT-23Q1
1PESD3V3L5UYPackage_TO_SOT_SMD:SOT-363_SC-70-6D5
1PS1240P02BTBuzzer_Beeper:Buzzer_TDK_PS1240P02BT_D12.2mm_H6.5mmBZ1
1S2P-VHConnector_JST:JST_VH_S2P-VH_1x02_P3.96mm_HorizontalJ2
1S3B-XH-AConnector_JST:JST_XH_S3B-XH-A_1x03_P2.50mm_HorizontalJ4
1SMAJ16ADiode_SMD:D_SMAD1
1STM32C051C8T6Package_QFP:LQFP-48_7x7mm_P0.5mmU4
1SolderJumper_3_Bridged12Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mmJP1

The 149 most common of 154 parts.

More from j9brown/bed-lift

1
  • 4 layers175 × 40 mmBed lift, the printed circuit board in 3D

    Bed lift

    j9brown/bed-lift

    Motorized bed lift system

    117 parts2MIT

Similar boards

  • 4 layers85 × 50 mmPdlc, the printed circuit board in 3D

    Pdlc

    brown-studios/pdlc

    A circuit board for driving PDLC film from 12 V DC

    127 parts7MIT
  • 2 layers100 × 100 mmLEOS flight computer, the printed circuit board in 3D

    LEOS flight computer

    VIP-LES/flight-computer-pcb

    The flight computer PCB stack design. Started Fall '25

    38 parts
  • 4 layers66 × 71.5 mmEeg ads1299, the printed circuit board in 3D

    Eeg ads1299

    kaanpars/16_channels_eeg_card

    I designed cards both in INA333 + TLV4333 and ADS1299. It is up to you which analog or digital output you should want to get. Importing restrictions in Turkey dragged me to designing my own sensor cards. ENJOY!

    103 partsGPL-3.0
  • 4 layers30.3 × 90.5 mmBase station, the printed circuit board in 3D

    Base station

    Tinkerbug-Robotics/TinkerRocket

    Model rocket flight computer, ground station, iOS app, and simulation

    115 parts1GPL-3.0
  • 6 layers70 × 45 mmComputing power hub, the printed circuit board in 3D

    Computing power hub

    bluesatunsw/owr

    This repo includes all software necessary to operate the Test Rover Platform that is being designed and developed in the 502 project.

    184 parts5Apache-2.0
  • 2 layers45 × 45 mmZappy, the printed circuit board in 3D

    Zappy

    USSTRocketry/hardware

    15 parts1MIT
  • 2 layers17.7 × 12.1 mmMicrobit 0.6, the printed circuit board in 3D

    Microbit 0.6

    StuckAtPrototype/MicroBit328

    The MicroBit328 is an ultra-compact Arduino-compatible development board measuring just 11mm × 16mm - small enough to fit on your fingertip.

    23 parts75
  • 2 layers30 × 30 mmLight, the printed circuit board in 3D

    Light

    brown-studios/minuet

    Minuet upgrades your MAXXAIR Maxxfan with a brushless DC motor, home automation features, and accessories.

    21 parts67MIT

Questions

How big is the Bed lift PCB?

It measures 195 × 45 mm and has 4 copper layers, 1.61 mm thick.

What parts does the Bed lift use?

154 parts, built around the STM32C051C8T6, ISO1640BD, LP2985-33DBVR and LP2985-50DBVR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Bed lift KiCad files?

From the j9brown/bed-lift repository on GitHub, at the commit this page was made from: the board is hardware/v1/bed-lift.kicad_pcb and its schematic hardware/v0.1/bed-lift.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Bed lift design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).