Main Content

Mini Self-balancing Robot

Made a simple Self Balancing Robot using XIAO ESP32 C3, Arduino Nano and Custom PCBs

So here’s an interesting little project: a Mini Self-Balancing Bot made from three layers of custom PCB, each containing a specialized circuit for this robot’s operation.

The ground layer includes a motor driver constructed by combining N-channel Mosfets to form an H-bridge motor driver for controlling two DC motors.

The second layer is made up of a lithium cell and its charging and boost IC, which raises the 3.7V of the lithium-ion cell to a stable 5V so that electronics can function.

The third and topmost layer is the microcontroller layer, which is made up of a Seeed XIAO ESP32 C3 MCU connected to an MPU6050 Module; later in this project, the XIAO was replaced with an Arduino Nano.

The MPU6050 is used as the main gyro accelerometer sensor in this project, which handles real-time reading of the robot’s position and orientation, which is then read by the XIAO DEV Board, which causes the motor to move forward and backward to balance the robot.

I’ve made a similar robot in the past; it was massive and featured a large 12V DC motor. This version employs a smaller 3V gear DC motor that is powered by a 3.7V 2200mAh lithium cell linked to an IP5306 Boost Module configuration.

This project is still in its early stages. The code must be edited, and the motor driver must be tweaked slightly.

For the time being, this project works, but the self-balancing portion has not been completed. This article covers all of the steps involved in the construction of this project, as well as what will happen next and what changes are required.

Let’s get started.

Material Required
These are the materials used in this built-

- Custom PCBs
- Seeed XIAO ESP32 C3
- AO3400 N channel Mosfet SOT23 Package
- Custom PCB
- 10K resistors 0603 Package
- 2R 1206 package
- JST connectors
- Vertical Header pin male connector
- Micro gear motor
- 3D printed Motor Holder
- MPU6050
- Lithium Cell
- IP5306
- 1uF 0805 Capacitors
- SMD Switch
- 1uH SMD Inductor
- Arduino Nano”

Link to article