DIY Ball Balancing Game Using Arduino at Home

by CrazyScience in Circuits > Arduino

1367 Views, 11 Favorites, 0 Comments

DIY Ball Balancing Game Using Arduino at Home

Arduino balance game.JPG
balance game arduino.gif
balance ball.JPG

Hey guys in this project i will show you how i made this ball balancing game using arduino that comes with lot of advantages.

Each game that we play has one or the other form of advantage, It can be helping you to grow physically or some mentally, There are games that will help you improvise or develop both.

Keeping this in mind(mental well being) i have made this Arduino ball balance game that is not only a fun entertainer but also a educational gadjet.

Building this project will give you hands on experience with electronics and after the build you can expect the below things from this project.

You may ask why build or play this game! Well the answer for this question cant be given in a single word, read the below advantages.

Playing this game can be a form of relaxation and stress relief, providing a break from more mentally demanding activities, Also this game helps to improve their ability to synchronize their hand movements with eyes as they try to balance the ball thus helping hand and eye coordination

If you have less patience then playing this game helps you because successfully balancing the ball requires patience and perseverance, teaching players to keep trying despite challenges

Lastly, you can also improve reflexes and reaction times, This is the takeaway from this game.

In simple words let me tell you how you can play this game, There is a gyro sensor that controls the balance stick and makes it more challenging i have swapped the controls

Meaning when you turn the sensor to the right the balance stick moves to the left and vice versa this makes the game more challenging.

Supplies

7b.png
6b.png
9b.png
5b.png
8b.png

All the materials required for this project is available online and you can also get from local hobby electronic shops too

Arduino Uno

Gyro sensor (mpu6050)

Jumper wires

Micro servo plastic geared

Empty piece of board

Double sided adhesive

3D printer best value

PLA filament with the color of your choice

Hot glue

Slicing software

Beads

Player!

Design and 3d Printing

2b.png
3b.png
balance sti.jpg
case gyro.jpg
1b.png
4b.png

There are many other ways to make the similar parts since i have a 3d printer i chose to design and print the parts.

Alternatively you can make the same parts using cardboard or foam, you can simply use my exact dimensions.

If you have a 3d printer just copy the designs into your slicing software and follow the settings which i used.

The choice of color in PLA filament is left to you, i chose yellow and red since i thought that would be the best match for this project.

After the parts are printed there is no need of any post processing since we are not using any supports at the time of printing.

Tip: You can design the parts with ease using the tinkercad application

Circuit and Program

balance game circuit.jpg
10b.png
arduino program.jpg
12b.png
11b.png

The circuit is really easy for this project since we have only 2 parts here

Micro servo and MPU 6050 let me explain the connections one after the other

MPU6050

The MPU6050 sensor is connected to the Arduino using I2C communication

VCC of the sensor to 5V or 3.3V on the Arduino

GND to GND on the Arduino

SCL to A5 on the Arduino and SDA to A4 on the Arduino

Servo Motor

Signal pin to digital pin 2

VCC to 5V on the Arduino whereas GND to GND on the Arduino

I have made the connections using jumper cables, you can also simplify using PCB

After you have built the circuit you can simply connect the uno board to computer using programming cable and open IDE

Paste the code and click on upload without any hassle the code should be uploaded and now we can proceed to test the circuit.

Testing the Circuit

arduino balance ga.gif
15b.png
anni.jpg
flexxible pcbs.png
rigid flex pcb.png
rigid flex pcbs.png
rigid pcb.jpg
13b.png

After the code is done uploading technically what happens when you power on this circuit

When the Arduino is powered on, it initializes the servo and the MPU6050 sensor and the MPU6050 sensor continuously sends orientation data to the Arduino.

The Arduino processes this data to determine the current angle and movement based on the processed data, the arduino sends a signal to the servo to adjust its position.

As you tilt the gyro sensor to the right or left, the servo motor adjusts the stick to maintain balance and we are using this factors to balance the ball

I have made a small case for this sensor and you can use other options too.

Place all the components on a piece of board and glue it with adhesives and hot glue if necessary, You might be thinking of that white gear attached to the horn of the servo, that is just an optional part, you can simply glue the stick to the servo.

You also can simplify this circuit with a Simple small PCBComplete your electronic projects in the best way from PCBWay

They are raining great offers since their 10th anniversary is live enter now

Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market, They also have Color PCB printing Try it out.

Don't have a 3d printer? You can get the best 3d printing service here

Check Here for Rigid-flex Pcbs with this your circuit becomes flexible! I have added the images to this step kindly check.

A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.

With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits.

Finishing

19b.png
18b.png
20b.png
16b.png

Now the biggest question that most of you are asking behind the screen is how does this project work.

Most of you who already are aware of the electronics might have an idea on the working well let me explain to those who are less aware.

After you power on the circuit hold the gyro sensor(we can call this as controller in our project) the sensor is very sensitive to movements so a small deviation would move the servo/balance stick

Place the bead/small ball on this stick and turn on the stopwatch the ball continuously moves left and right now the challenge is how long you balance the ball to the center.

It took me around 20 seconds and as you practice more and more you can do it in less time, This is a great way to have lots of fun at the parties.

This was all about this project, if you have any suggestions or questions ask in the comments. Thank you for your interest.

Working Video

DIY Arduino ball balance game | Crazy Arduino Project ideas

Here is a gameplay video of this entire project and also the step by step build tutorial on how I made this.

You can also customize many things here, Let's say you want to make it on a bigger scale then you can replace all these smaller components with large size electronics.

Only do this if you have real experience on this part, If not you can simply enjoy this gadget.

This is all for this project, If you have any questions ask me in the comments, have a great build thanks.