Open Source RoboticsRobots, software & learning

Rotary Inverted Pendulum

Robot / hardware build

Printed rotary pendulum with Arduino Nano control and a MuJoCo-to-hardware learning pipeline; preserved sources include rig-specific distilled policy weights and differing bring-up microstep guidance. [1] [6] [9] [10] [11]

Build & first use →Official website

For
Developers able to build and calibrate a physical control rig and distinguish simulated from measured results [1]
Cost
No current cost or bill of materials established yet.
Source rights
Named licenses are documented by part. Review licenses
Unknowns
host computer, tools, operating system not fully established. Review gaps

Source researched · Not tested by us
Sources checked · Research details

Licenses & related hardware

Requirements · Research details and dates

On this page

Overview

This project combines printed mechanics, an Arduino Nano and a stepper-driven rotary arm with a learned balancing controller. The repository includes MuJoCo training, hardware fine-tuning, distillation and standalone firmware. The selected commit is 230bdcc9c4f1751a2bfb2447b52fb349296ed31c; this catalog reviewed the sources without building or operating a pendulum. [1] [2]

Is this for you?

Known limitations
  • Approximate £20 upstream parts estimate excludes tools and is not a verified delivered budget
  • Bring-up microstep guidance differs from standalone sketch
  • Policy headers are tied to rig, driver and microsteps
  • No physical build, training reproduction or timing test performed

[5] [6] [9] [10]

3D preview

Rotary inverted pendulum assembly. Source URDF and its referenced printable geometry at zero joint positions. Motor, wiring and control behavior have not been physically verified.

The 3D preview loads after the page.

Drag to orbit · Scroll or pinch to zoom · Right-drag to pan. Use the view buttons for front, side and top views. The tree shows names supplied by the source; unnamed bodies remain labeled as such.

Download original URDF source bundle (ZIP) · File checksums and provenance

Separate bodies can be inspected in the model tree. Explode is a viewing aid, not an assembly sequence.

Source, license and scale

Source: Henrique Ferrolho, revision 230bdcc9c4f1751a2bfb2447b52fb349296ed31c. Original and preview: MIT. Preview conversion by Open Source Robotics; source files unchanged inside the downloadable bundle. Preview coordinates are centered and rounded to six decimal places. URDF visual origins, mesh scales and joint transforms applied at zero joint positions, then metres converted to millimetres. No physical part tested.

Viewer: three-cad-viewer 5.0.7 (MIT license). Confirm scale and manufacturing settings before printing.

What you need

Dependencies
  • Arduino AVR toolchain, AS5600 and FastAccelStepper libraries
  • MuJoCo training/distillation environment
  • Printed geometry and embedded UK 2p coin
  • Measured rig configuration and matching policy operating point

[1] [5] [7] [8] [10]

Hardware & parts

Hardware configuration

Actuated rotary arm with passive pendulum link for control experiments.

[1] [5]

Actuators
  • NEMA17 17HS4023 stepper
  • TMC2209 recommended driver; DRV8825 alternative requires different wiring and configuration

[5] [10]

Controller

Arduino Nano ATmega328P; standalone policy sketch defaults to rig1 TMC2209 32-microstep weight header.

[5] [10]

Sensors
  • AS5600 magnetic angle encoder with diametric magnet

[5] [6]

Assembly & first use

Project documentation [1]

Calibration

Match driver wiring, microsteps, rig dynamics and selected policy. Standalone sketch defines 32 microsteps; first-power-on guide still describes 16/8 settings.

[6] [9] [10]

Cost

No current, complete configuration-specific build cost has been established for this profile.

Project notes

The parts estimate belongs to a particular small rig

The BOM, dated May 25, 2026, estimates approximately £20 in parts and lists an ATmega328P Nano, short-body NEMA17 motor, AS5600 encoder and driver alternatives. Tools are listed separately. That estimate is not a verified current delivered budget and should not be treated as a like-for-like commercial laboratory-system comparison. [5]

The printed pendulum incorporates a UK two-pence coin as its tip mass. The print guide explains that omitting it changes the mass and inertia assumed by the model. Source geometry, physical assembly and learned dynamics therefore need to remain consistent. The archive contains STL and URDF files; the external Onshape document was not independently exported in this review. [5] [7] [12]

Reconcile the driver configuration before using the examples

The TMC2209 and DRV8825 options are not interchangeable pin-for-pin, and their current-setting conventions differ. The first-power-on guide also describes 16 microsteps for TMC2209 and 8 for DRV8825, whereas the selected standalone sketch explicitly sets MICROSTEPS = 32 and documents the corresponding driver pin settings. This discrepancy is preserved as a build check rather than silently presenting the pages as one consistent procedure. [5] [6] [10]

The standalone sketch assigns the step signal to the Nano's Timer1-compatible pin and waits for magnet detection before engagement. Its settling pose becomes the encoder reference. These details make wiring and initialization part of the controller configuration, not incidental setup. No current setting, motion envelope or protective behavior was tested here. [10]

A weight file name describes hardware, not network width

Committed policy headers are named by rig, driver and microstep ratio. The default sketch selects the rig1 TMC2209 32-microstep header; another preserved header for rig2 declares a 24–16–16–1 network. The final 32 in its filename is the microstep ratio, not a 32-unit hidden layer. The source includes the numerical weights, but that does not establish the complete original teacher checkpoints, replay buffers or measured training logs. [9] [10] [11] [12]

The distillation guide describes behavior cloning followed by DAgger under the intended deployment transport. It reports that the larger floating-point student missed the Nano's timing budget. The selected sketch sets 50 Hz control, a four-action smoothing window, four observation frames and a maximum velocity of 3.5 rad/s. These must agree with the policy's configuration; the weight header alone does not encode the operating point. The standalone procedure measures actual loop rate, because a nominal setting alone is not proof that inference meets it. Upstream balancing results remain reported results, not catalog reproductions. [8] [9]

The repository's MIT license accompanies the preserved source package. External CAD, toolchains and dependencies still need their own checks. Reproduction remains contingent on a matched physical rig, policy, measured timing and source dependencies; none was installed, trained or flashed during this review. [3] [5] [9]

What we checked

Source research only; no installation, physical build or performance test performed. No affiliate links added.

Not yet established

  • Requirements: operating system, host computer, tools
  • A step-by-step setup summary

Updates

Upstream last updated
Sep 15, 2026 [2]
Latest release
Not established
Profile updated
Oct 4, 2026
Sources last checked
Oct 1, 2026
Next review
Oct 31, 2026
Reviewed revision
230bdcc9c4f1751a2bfb2447b52fb349296ed31c (commit snapshot; no published stable release found) · combined hardware and software repository

Source files and licenses

Available project sources support research coverage; complete build and commercial qualification remain separate.

LayerAvailability / license
mechanical designavailable · MIT
Selected repository artifact scope. Electronics are wiring references and component modules, not a complete custom PCB package; model weights are rig-specific committed C headers. External Onshape source and dependencies are separate. [1] [3] [12]
electronicsavailable · MIT
Selected repository artifact scope. Electronics are wiring references and component modules, not a complete custom PCB package; model weights are rig-specific committed C headers. External Onshape source and dependencies are separate. [1] [3] [12]
firmwareavailable · MIT
Selected repository artifact scope. Electronics are wiring references and component modules, not a complete custom PCB package; model weights are rig-specific committed C headers. External Onshape source and dependencies are separate. [1] [3] [12]
softwareavailable · MIT
Selected repository artifact scope. Electronics are wiring references and component modules, not a complete custom PCB package; model weights are rig-specific committed C headers. External Onshape source and dependencies are separate. [1] [3] [12]
model weightsavailable · MIT
Selected repository artifact scope. Electronics are wiring references and component modules, not a complete custom PCB package; model weights are rig-specific committed C headers. External Onshape source and dependencies are separate. [1] [3] [12]
datasetsnot found · License not fully assessed
Training and distillation procedures are present, but complete teacher checkpoints, replay buffers and original physical recordings are not established in the preserved archive. Generated policy headers are not the complete training dataset. [8] [9] [12]
documentationavailable · MIT
Selected repository artifact scope. Electronics are wiring references and component modules, not a complete custom PCB package; model weights are rig-specific committed C headers. External Onshape source and dependencies are separate. [1] [3] [12]

References

Each source links to the exact revision we read. “Used for” shows where this page relies on it.

Project sources

Videos

Correction guidance · Discussion is not enabled · Profile format 0.6.0-draft.1

Change history

2026-10-04 — Added 2 YouTube reference(s) (S013, S014): official channel or videos linked from the pinned upstream sources. Existing claims, source-check dates and evidence are unchanged.