Control & robotics

Inverted Pendulum

The classic unstable system, kicked upright and held there at 1 kHz

A didactic inverted pendulum on a 1 m rail, built to learn feedback control. The cart is designed to kick the pendulum up from its stop and balance it with a cascaded PID or LQR, while a Windows app plots every signal and lets you change every gain live.

  • In development
  • Level: Intermediate
  • Version: 0.1.0

Design v0.1.0: simulated and checked in CAD; the first unit is not built yet

The experience

Start in the simulator: PendulumStudio runs the same controller as the firmware, so you can press START, push the pendulum and switch PID ↔ LQR before printing anything. Then print the carriage, pivot, towers and armor plates, bolt them to a 1000 mm V-slot rail and stack the M5Stack CoreS3 on its stepper driver. On START the cart is designed to home, move to the side opposite the lean, kick the pendulum up from its ±15° stop and hold it upright, also when you push it. From there every gain, filter and limit is yours to change while it balances, with the charts showing each controller term and a seven-chapter theory course explaining why.

What makes it special

Kick-up from rest

From its ±15° stop the cart kicks the pendulum up with an energy-based burst, then balances it. Stops for ±12° and ±18° are included.

Two controllers, live

Cascaded PID and LQR state feedback, switchable on the fly. The default PID gains are the LQR law rewritten in cascade form.

1 kHz control loop

The loop runs at 1 kHz on the CoreS3 and commands the cart acceleration, so the motor and cart masses drop out of the model.

Simulator inside

PendulumStudio runs a line-by-line port of the firmware's supervisor and controllers on a cart-pole model with sensor noise and quantisation.

Every parameter live

Gains, filters, limits, the kick-up strategy and the setpoint can be changed while the pendulum balances, with the effect on the charts.

Safety built in

A mushroom E-stop cuts the 24 V motor power, NC endstops sit at both ends, soft limits act first and the feet clamp the rail to the table.

What you will learn

  • Cart-pole dynamics and linearisation
  • PID in depth: P, I, D, derivative filter, anti-windup
  • Cascade control and bandwidth separation
  • State space, pole placement and LQR
  • The kick-up: energy strategy and state machine
  • Sensing and filtering noisy signals
  • Stepper drives, microstepping and torque-speed
  • Step-by-step tuning, in the simulator and on the machine

Three ways to get it

Be the first to build the Inverted Pendulum

This kit is still in development. Leave your contact and we will write to you when it is released.

DIY: files and software

The whole build is yours: print the parts, buy the components, build the electronics and assemble the machine.

You do
Print, source the components, build the boards, assemble
  • Print files of every part (STL, STEP and 3MF)
  • Electronics design: wiring, schematics and the list of components
  • Firmware and software, including the app when the kit has one
  • Assembly manual
Notify me

Kit: electronics ready

The hard part comes done: every component, with the electronics assembled and tested. You print the parts and put the machine together.

You do
Print the parts and assemble
  • Everything in the DIY option
  • Every component on the bill of materials: electronics, cables and hardware
  • Electronics assembled and tested, ready to connect
  • Filament not included: you print the parts
Notify me

Ready to use

Printed, assembled and tested by us. Install the software and start using it.

You do
Install the software and use it
  • The complete machine, printed and assembled
  • Tested before it leaves the workshop
  • Firmware installed; app, manual and files included
Notify me

Price on request: it depends on the option. In the DIY option the filament, the electronics and the hardware are yours to source (this page lists them); in the kit option, only the filament.

Included with every option

The files, the manual and the software come with every option, the ready-to-use machine too.

Print files

  • STL files for every printed part
  • Two-colour 3MF armor plates with the yellow mech livery
  • STEP files of the assembly and of each part
  • Interchangeable stops for ±12°, ±15° and ±18°
  • Firmware for the M5Stack CoreS3

Assembly manual

  • Build guide with every part, fastener and step
  • Bill of materials and wiring diagram
  • Tuning guide and lab experiments
  • Theory course in 7 chapters
  • Safety notes and first power-up checklist

App

PendulumStudio Windows

  • Live pendulum view and rolling charts of angle, position, command and controller terms
  • Parameter editor: change every gain, filter and limit while it runs
  • LQR designer: from Q and R to the gains, the closed-loop poles and the equivalent PID
  • Simulator that runs a port of the firmware's controller, with sensor noise
  • CSV recording and an event log