Skip to content

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).

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)

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.

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