DengFOC Inverted Pendulum
A low-cost, small inverted pendulum robot using DengFOC motor driver and SimpleFOC for balance control.
- Other
- Open source
- arduino
- 3D printable
Suggested by Robotheca, created by @ToanTech (opens in a new tab), from github.com/ToanTech/Inverted_Pendulum_DengFOC (opens in a new tab). Pinned to commit 2d61e88 (opens in a new tab).
- Hardware license
- GPL-3.0-only (opens in a new tab)
- Software license
- GPL-3.0-only (opens in a new tab)
- Commercial use
- Allowed
Photo and 3D model

3D preview converted from github.com/ToanTech/Inverted_Pendulum_DengFOC at 2d61e88, under GPL-3.0-only. View the original files from GitHub (792 KB) (opens in a new tab)
- Weight
- 16.8 V
What it can do
Written by Robotheca from the project's documents.
- Balances an inverted pendulum using a momentum wheel
- Uses LQR control for stabilization
- Adjusts control parameters via serial commands
- Calibrates initial pendulum angle at startup
Bill of materials
This repository has no parts list Robotheca can read yet.
Build guide
The creator's steps, each with its instructions.
- 1Watch assembly tutorial videos
- 2Prepare DengFOC V3 controller
- 33D print all parts at 100% infill
- 4Assemble mechanical components
- 5Connect electronics (DengFOC, AS5600 encoders, 2204 motor)
- 6Upload and calibrate the program
- 7Tune LQR parameters if necessary
The guide appears here as you scroll.
Guide by @ToanTech (README.md), under GPL-3.0-only. The English translation is by Robotheca, shared under the same license.
Wiring and electronics
Notes written by Robotheca from the project's documents.
Main parts
- DengFOC V3 motor controller
- 2204 brushless motor for momentum wheel
- Two AS5600 magnetic encoders (one on motor, one on pendulum)
- 16.8V power supply
Connections
- 2204 motor connected to DengFOC M0 port
- Motor-side AS5600 connected to SDA0, SCL0, 3V3, GND
- Pendulum-side AS5600 connected to SDA1, SCL1, 3V3, GND