Arduino 3D Printed Self Balancing Cube

by mircemk in Circuits > Arduino

7408 Views, 126 Favorites, 0 Comments

Arduino 3D Printed Self Balancing Cube

APH2.jpg

An interesting open source Arduino + 3D Print project uses gyroscopic sensors and accelerometers to detect the movement of the balanced object and adjust the speed and direction of the wheels accordingly, allowing to control the device through shifts in their weight.

Supplies

control electronic.jpg
  1. Arduino Nano R3
  2. MPU6050 module
  3. Nidec 24H type motor x 3
  4. Buzzer
  5. General Purpose Transistor NPN
  6. Li-Ion Battery 1000mAh x 3
  7. resistors
  8. HC-05 Bluetooth Module

Description

Arduino 3D Printed self Balancing Cube

Self-balancing devices are electronic devices that use sensors and motors to keep themselves balanced while in use. They uses gyroscopic sensors and accelerometers to detect the movement of the balanced object and adjust the speed and direction of the wheels accordingly, allowing to control the device through shifts in their weight.

This time I will present you a project in which the balanced object is a 3D printed plastic cube, inside which the reaction wheels and control electronics are located.

Control Electronic, and 3D Printed Parts

Picture.jpg
3Dparts 1.jpg
3D parts.jpg
motors.jpg
wheel nuts and bolts.jpg
wheel nats and bolts 1.jpg

This project is sponsored by PCBWay. This year, PCBWay organizes the Seventh Project Design Contest where, in addition to Electronic and Mechanical Project, also has been added a new category: STM32 Project. For the best selected projects are provided rich prizes in cash, coupons and special gifts. Submit your project for participation in this Contest from 2nd, Sep, 2024 to 19th, Jan, 2025. For more details and instructions visit the given page. Let PCBway always be your first choice.

Nuts and bolts are added to the wheel in order to increase its weight, thus increasing the impact of the rotation on the whole device.

Otherwise, this is an open source project and the original code and .STL parts for 3D printing can be downloaded from ReM-RC GitHub (https://github.com/remrc/). After a long search for such similar projects on the Internet, I can confidently say that this is the best-made project in this area in every way, such as simplicity, easy setup, and stable operation.

The control part of the device consists of several components:

- Arduino Nano microcontroler board

- MPU6050 Gyroscope and Accelerometer module

- NPN Transistor

- Buzzer

- three resistors

- Battery

- and optionally Bluetooth module for easier tuning

3D printed part consist also several components. Each large part takes more than 2-3 hours to print, so it took me a few days to print all the parts.

- reaction wheel sides and we need three such part

- other three sides of the cube

- reaction wheels that serve to balance the cube

- mount plate for the batteries and the controller, on which there is a mounting surface for the mpu6050 sensor board.

- Battery holders

- and controller mount plate, and mount plate holders

Otherwise, an ESP32 microcontroller can be used instead of an Arduino, and in that case Bluetooth is built into the microcontroller.

The three motors are "Nidec 24H" type:

In Real Conditions

Calibrating.jpg

First let's see how the device works in real conditions. Before putting it into operation, it should be calibrated. Setting procedure is very simple. Setting procedure is very simple. First connect to controller over bluetooth. You will see a message that you need to calibrate the balancing points. Send c+ from serial monitor. This activates the calibrating procedure. Set the cube to one of the balancing points (edge or vertex). Hold still when the cube does not fall to either side. Send c- from serial monitor. This will write the offsets to the EEPROM.

Repeat this procedure four times (3 edges and vertex). After calibrating all offsets, the cube will begin to balance.

Conclusion ,schematic, and Code

schematic.jpg

And finally a short conclusion. This is a really interesting Arduino project to make, of course if you own a 3D Printer. It is perfectly conceived and executed by ReM-RC and I will mention again, all credits go to him.

3D parts at: https://www.thingiverse.com/thing:5380306

code at : https://github.com/remrc/Self-Balancing-Cube