Skip to content

Photo and 3D model

DengFOC Inverted Pendulum, photo from its repository
Photo@ToanTech (opens in a new tab)GPL-3.0-onlysource file (opens in a new tab)

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)

Open source · free filesRobot ID

DengFOC Inverted Pendulum

Other

A low-cost, small inverted pendulum robot using DengFOC motor driver and SimpleFOC for balance control.

Before you build

Tools
3D printer, soldering iron, Arduino IDE
Level
Intermediate
Licence
GPL-3.0-only (opens in a new tab), hardware and softwareCommercial use: Allowed

Not stated in the creator's files: total cost, shop links, time.

Read from the repository at commit 2d61e88. Something out of date? Tell us

Project information

Buildability
75/100Buildable with some effort
Parts
A spreadsheet
Works with
Arduino
Weight
16.8 V

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). You buy the parts yourself; Robotheca doesn't sell robots. Last checked on GitHub on 30 November 2026; its last change there was on 17 May 2022.

Build it

The creator's 7 steps, each linked to its instructions
  1. Watch assembly tutorial videos
  2. Prepare DengFOC V3 controller
  3. 3D print all parts at 100% infill
  4. Assemble mechanical components
  5. Connect electronics (DengFOC, AS5600 encoders, 2204 motor)
  6. Upload and calibrate the program
  7. Tune 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.

What to buy

The parts list is a spreadsheet in the repository. Robotheca can't read this file, so its quantities and prices are not checked here.

Open BOM表.xlsx (opens in a new tab)

Why it scores 75

It measures the published files, not the robot · How we score

75/100

Buildable with some effort

How complete the published files are for rebuilding this robot, measured by Robotheca at commit 2d61e88. It isn't a rating of the robot. Counted out of 80 points and scaled to 100: the parts that don't apply to this robot are left out.

  1. 13D and CAD files4 printable parts (STL, 3MF).Most points to gain: Add the CAD source (STEP, or the CAD program's own files) so people can change the design.10/20
  2. 2Parts listA parts list in the repository as a spreadsheet (BOM表.xlsx): Robotheca can't read its quantities, prices or shop links.Add the parts list as a CSV or a Markdown table too, so its prices and shop links can be checked.10/20
Full points: Software, Documentation, Licenses; not counted: Robot description, Simulation
  1. 3SoftwareCode in this repository, instructions to install or run it, built on Arduino.15/15
  2. 4DocumentationREADME of 1,669 characters with 3 pictures; 7 build steps.15/15
  3. 5LicensesHardware: GPL-3.0-only; software: GPL-3.0-only.10/10
  4. –Robot descriptionNo URDF. Not counted: the score is made of the parts that apply.Optional: add a URDF, and the robot can be seen in 3D and tried in the browser.Not counted
  5. –SimulationNo simulation files. Not counted: the score is made of the parts that apply.Optional: add a simulation model (MuJoCo, Gazebo, Webots or Isaac).Not counted

Wiring and electronics

Notes written by Robotheca from the project's documents, not by its creator

Main parts: Robotheca's summary

  • 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: Robotheca's summary

  • 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

What it can do: Robotheca's summary

Written by Robotheca from the project's documents, not by its creator
  • 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

Software

Framework
Arduino
Languages
Arduino
License
GPL-3.0-only

Robotheca doesn't review code. Read it before running it.

How to run it: Robotheca's summary

Written by Robotheca from the project's documents, not by its creator.

  1. 1Open DengFOC_Inverted_Pendulum.ino in Arduino IDE
  2. 2Connect DengFOC via serial port
  3. 3Upload the sketch to the controller
  4. 4Comment out motor.move(target_voltage) to calibrate initial angle
  5. 5Press reset on DengFOC to read initial angle from serial monitor
  6. 6Replace the hardcoded angle in the code with the recorded value
  7. 7Uncomment motor.move(target_voltage)
  8. 8Re-upload the sketch and reset the controller to start balancing

Software that runs on this robot

No software from Robotheca's catalogue found in this robot's files yet. Links come from its robotheca.yaml, its dependency files read as text, or Robotheca's editors.

The code

Free files

Every file of the project, at commit 2d61e88.

Community

Questions and improvements go to the creator's repository.

Add a badge to your README

For the creator: two badges that link back here. The second always shows this page's current label and score.

Listed on RobothecaRobotheca buildability

Markdown (one click selects it)

[![Listed on Robotheca](https://robotheca.org/robots/dengfoc-inverted-pendulum/badge.svg)](https://robotheca.org/robots/dengfoc-inverted-pendulum)
[![Robotheca buildability](https://robotheca.org/robots/dengfoc-inverted-pendulum/score.svg)](https://robotheca.org/robots/dengfoc-inverted-pendulum)

Licence and credits

Robot ID

Robotheca

DengFOC Inverted Pendulum

A low-cost, small inverted pendulum robot using DengFOC motor driver and SimpleFOC for balance control.

Type
Other
Level
Intermediate

Licence: GPL-3.0-only, hardware and softwareCommercial use: Allowed

Buildability: 75/100, Buildable with some effort

Licences read from the files at commit 2d61e88

robotheca.org/robots/dengfoc-inverted-pendulum

Licenses
GPL-3.0-only (opens in a new tab), hardware and software
Commercial use
Allowed

Other other robots

All 98 other robots
  • Ready to build

    Open source · free files

    Koriobots

    Other · Intermediate

    Score
    Buildability 98 out of 100
    Cost
    $972.06≈ €887
  • Ready to build

    Open source · free files

    AmazingHand

    Other · Intermediate

    Score
    Buildability 88 out of 100
    Cost
    under €200
  • Ready to build

    Open source · free files

    DigiArm Prosthetic Hand

    Other · Advanced

    Score
    Buildability 85 out of 100
    Cost
    $250≈ €228
  • 3D render

    Open source · free files

    FloatingFace

    Other · Advanced

    Score
    Buildability 100 out of 100
    Cost
    $328.47≈ €300

≈ € values are approximate, converted at the ECB euro reference rate of 27 Nov 2026. The creator's original price always comes first.