Rotary Inverted Pendulum
Robot / hardware buildPrinted 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
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
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.
Model sources
The preview uses the linked original design. Source grouping is retained where present; the caption identifies whether this is an assembly or one component.
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
Hardware & parts
- Hardware configuration
Actuated rotary arm with passive pendulum link for control experiments.
- Actuators
- NEMA17 17HS4023 stepper
- TMC2209 recommended driver; DRV8825 alternative requires different wiring and configuration
- Controller
Arduino Nano ATmega328P; standalone policy sketch defaults to rig1 TMC2209 32-microstep weight header.
Assembly & first use
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.
| Layer | Availability / license |
|---|---|
| mechanical design | available · 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] |
| electronics | available · 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] |
| firmware | available · 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] |
| software | available · 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 weights | available · 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] |
| datasets | not 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] |
| documentation | available · 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
- S001 ferrolho/rotary-inverted-pendulum: README.md
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: Overview, What you need, Hardware & parts, Assembly & first use and 1 more - S002 ferrolho/rotary-inverted-pendulum: commit 230bdcc
- S003 ferrolho/rotary-inverted-pendulum: LICENSE
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: A weight file name describes hardware, not network width, Source files and licenses - S004 ferrolho/rotary-inverted-pendulum: files
Revision, date & where cited
github.com · revision
230bdcc· archive file inventory · Accessed Oct 1, 2026 - S005 Rotary pendulum website/src/content/docs/build/bom.md
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: Is this for you?, What you need, Hardware & parts, The parts estimate belongs to a particular small rig and 2 more - S006 Rotary pendulum website/src/content/docs/build/first-power-on.md
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: Is this for you?, Hardware & parts, Assembly & first use, Reconcile the driver configuration before using the examples - S007 Rotary pendulum website/src/content/docs/build/printing.md
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: What you need, The parts estimate belongs to a particular small rig - S008 Rotary pendulum website/src/content/docs/train/distill.md
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: What you need, A weight file name describes hardware, not network width, Source files and licenses - S009 Rotary pendulum website/src/content/docs/train/flash.mdx
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: Is this for you?, Assembly & first use, A weight file name describes hardware, not network width, Source files and licenses - S010 Rotary pendulum firmware/RLControl/RLControl.ino
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: Is this for you?, What you need, Hardware & parts, Assembly & first use and 2 more - S011 Rotary pendulum firmware/RLControl/policy_weights_rig2_tmc2209_32.h
Revision, date & where cited
github.com · revision
230bdcc· Accessed Oct 1, 2026
Used for: A weight file name describes hardware, not network width - S012 Complete preserved file inventory
Revision, date & where cited
github.com · revision
230bdcc· complete archive inventory · Accessed Oct 1, 2026
Used for: The parts estimate belongs to a particular small rig, A weight file name describes hardware, not network width, Source files and licenses
Videos
- S013 I built this £4,500 pendulum for £20 (YouTube video)
Video from the project’s own channel (Henrique Ferrolho), linked from the project’s own documentation. Not reviewed by us for accuracy.Revision, date & where cited
YouTube video Henrique Ferrolho · youtube.com · Accessed Oct 4, 2026
- S014 Rotary Inverted Pendulum (PID) - Design, Build, Model, Swing Up and Stabilisation (YouTube video)
Video uploaded by Cillk 11, linked from the project’s own documentation. Not reviewed by us for accuracy.Revision, date & where cited
YouTube video Cillk 11 · youtube.com · Accessed Oct 4, 2026
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.