Mechatronics Exercises

Workspace Navigation

Self-balancing reaction wheel toy





Santeri Hurnanen, Eero Moisio, Oskari Koskinen


The goal of this project is to build a device that can balance itself using reaction wheels. The device will look like a miniature bicycle and it will keep itself actively balanced.

An additional goal is to incorporate a motor driving one of the wheels and a servo motor that can steer the bicycle. The steering and drive of the bicycle are intended to be remotely controlled.


Update 14/3/2023

The idea of the project is to utilize Newton's second law to balance the object. When our object starts to tilt away from its equilibrium point, a flywheel perpendicular to that axis is accelerated in the so-called tipping direction. As the engine accelerates the flywheel, it generates a counter-torque in the opposite direction of the tilt. Since the engine is attached to the object, with properly adjusted counter-torque, the object can maintain stability.



First step was to get data from sensor, which will be used to control the motor




To demonstrate and practice the principle of balancing the object, we have designed and 3D-printed a prototype.



The counter-torque created by the motor is demonstrated in the video. We are using a DC motor and an H-bridge for this purpose.

telegram-cloud-document-4-6039879609191763734.mp4





Final project

List of components:

  • esp32 development board
  • 12V DC-motor
  • Adafruit LSM6DSOX + LIS3MDL - Precision 9 DoF IMU.

  • SparkFun Motor Driver - Dual TB6612FNG (1A)
  • 12V powersupply
  • Breadboard and cables


Circuit

In short, microcontroller reads data from the IMU and then gives pwm signal to h-bridge and that controls the motors (white and yellow cable from red board).


Code

mekatroniikan_projekti.zip

In the code there is PID-controller whose values can be changed to suit your setup.


Footage of the project

video_1.mp4video_2.mp4video_3.mp4


Mechanical design

Reaction wheel is 3D printed and M3 bolts are threaded in to the wheel to give it more torque. Reaction wheel is attached to the DC-motor with glue and heat. Body is made from thin plywood and bolt and nuts acts as bearing.


Challenges and outcome

As you can see the project didn't work as it should have. Reaction wheel didn't have enough torque to pull the body to the center. With correct mechanical design project could have been a major success. Code of the project worked well and motor reacted to angular changes, but not with enough force.

  • No labels
  File Modified
JPEG File circuit.jpeg Jun 21, 2023 by Oskari Koskinen
PNG File image2023-3-14_10-5-27.png Mar 14, 2023 by Eero Moisio
PNG File image2023-3-14_10-6-33.png Mar 14, 2023 by Eero Moisio
PNG File image2023-3-14_9-45-22.png Mar 14, 2023 by Eero Moisio
PNG File image2023-3-14_9-47-35.png Mar 14, 2023 by Eero Moisio
PNG File image2023-3-14_9-55-46.png Mar 14, 2023 by Eero Moisio
File LSM6DSOX.cpp Jun 21, 2023 by Oskari Koskinen
File LSM6DSOX.h Jun 21, 2023 by Oskari Koskinen
File mekatroniikan_projekti.ino Jun 21, 2023 by Oskari Koskinen
ZIP Archive mekatroniikan_projekti.zip Jun 21, 2023 by Oskari Koskinen
File PID.cpp Jun 21, 2023 by Oskari Koskinen
File PID.h Jun 21, 2023 by Oskari Koskinen
File SparkFun_TB6612.cpp Jun 21, 2023 by Oskari Koskinen
File SparkFun_TB6612.h Jun 21, 2023 by Oskari Koskinen
Multimedia File telegram-cloud-document-4-6039879609191763734.mp4 Mar 14, 2023 by Eero Moisio
Multimedia File video_1.mp4 Jun 21, 2023 by Oskari Koskinen
Multimedia File video_2.mp4 Jun 21, 2023 by Oskari Koskinen
Multimedia File video_3.mp4 Jun 21, 2023 by Oskari Koskinen
Multimedia File video3.mp4 Jun 21, 2023 by Oskari Koskinen