Introduction: Balancing Plate Game - Ramy Mounir - MAKE Course!

Picture of Balancing Plate Game - Ramy Mounir - MAKE Course!

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (


My name is Ramy Mounir, and I'm a student maker enrolled in the MAKE course at the University of South Florida - Fall 2015. I used an arduino as a micro-controller to make a plate that can be controlled using servos. There are 3 operational modes for 0 - 2 number of players. The operational mode for 0 players is letting the plate balance itself no matter how you move the box, the plate will always be horizontal ! The mode for 1 player is using the joystick to keep the ball on the plate. The last mode is similar to the previous one; however, two players can use flash lights to move the plate.

In this instructable I will walk you through how I build this awesome project.

Step 1: Components

Picture of Components

For this project you will need:

1x Arduino uno

1x Breadboard

1x joystick module

2x Servo motors

2x Photocells

1x 3-axis accelerometer/gyroscope (MPU 6050)

2x 330 ohm resistor

1x 9V battery pack with on/off switch

and don't forget the wire...

Step 2: 3D Printed Parts

Picture of 3D Printed Parts

I have attached the 3D parts modeled on solidworks. Tolerances are considered in all my parts. 3D print all the parts in PLA, and choose the color you want.

I used bolts and nuts to attach the servo mounts to the box, which was not necessary. Super Glue turns out to be stronger than the 3D printed parts, so use super glue to attach fixed parts.

Attach the parts using the dimensions in the assembly file.

Step 3: Control System

Picture of Control System

The arduino takes signals from the sensors in the red boxes and computes the pwm signals to actuators (servo motors in the green boxes). The servo motors control the plate orientation.

The actual signal from the accelerometer is compared against the desired value and multiplied by a constant proportional factor to move the servos.

The same proportional control system is applied for the photocells.

The joystick input signal to the arduino is mapped to output a suitable PWM signal. (no proportional control system is applied here)

Step 4: Wiring

Picture of Wiring

The wiring is exactly the same as the attached image.

The photocells are wired in a voltage divider circuit with the 330 ohm resistor. (A0 and A1)

The accelerometer is wired to A4 and A5 (SDA and SCL).

The joystick is connected to A2 and A3.

The two servos are connected to PWM digital pins 3 and 5.

Step 5: Arduino Sketch

The commented arduino sketch is attached to this step.

The sketch is split into two tabs, the main tab and the functions tab.

The main tab is basically a switch case in the loop function. It calls for the mode checking function and goes to the right case based on what it gets back from that mode checking function.

The functions tab contains 5 functions:

setplane(); // this functions sets the plane horizontal in the setup function

checkbuttons(); // this functions checks to see which mode are we in. If the joystick is not in its normal position, it returns that appropriate case number. Similarly if it detects a light value greater than the specified value, its returns back a different case number. If nothing is detected, the default case will be activated.

followlight(); // keeps a specific distance between the photocell and the flashlight using a proportional control system on the error between desired and actual light value.

balance(); // does the same as followlight() but uses the accelerometer values instead of light values.

followjoystick(); // maps the input signal from joystick to the output pwm signal to servo motors.

Step 6: Final Project

Picture of Final Project

If you follow this instructable step by step, you should end up with a project like mine (see attached picture). If you have any question, please leave a comment. Have fun and good luck!


ErickR50 (author)2017-06-29

hola amigo tampoco me aparece el archivo de la caja, me la podrías enviar esta padre tu proyecto.

SamerS15 made it! (author)2017-06-13

I was hopping to include a PID controll to it

WannaDuino (author)SamerS152017-06-24

can you send me a pm, and send the files or the box to please.

AglioOlio (author)2017-06-01

Where should I attach MPU6050?
Right under the plate?

AglioOlio (author)2017-05-17

I have problem with "box" file...

So could please send me a box file?

s121 (author)2017-05-15


When I open the solidworks files I have a problem with the box assembly...

Could you send me this complete assembly ?

Thanks for help ...

Daniyal Shamsi 154 (author)2016-10-14

What is the use of the photocell????

DidierM3 (author)2016-09-13


When I open the solidworks files I have a problem with the box assembly...

Could you send me this complete assembly ?


GuilhermeL14 (author)2016-02-24


Could you update the solidwork files? A bunch of them are missing, I want to print that model as well. I would like to use what you've done into my final project at my university, I want to study some position control techniques. So I will be glad if you can help me on that.Thank you!

ramymounir (author)GuilhermeL142016-02-25

Sure man, Sorry for the delay.

Check you inbox :) !

crestr25 (author)ramymounir2016-03-13

could you send me the files please i really want to base a design on this model for my university. thanks a lot!!

Could you also send me the files i am trying to build your model as well

Unsafe At Any Speed (author)2016-01-11

This would make a great car cup holder.

Just mount it on the dash and have it sense the car's motion.

It should hold the cup perfectly steady!

yea that would work but it wont take any vertical acceleration unless you make it with 4 servos! The Accelerometer is 3-axes so you can still use the same accelerometer.

Downunder35m (author)2015-12-09

Would it be possible to see a video of the action?

ramymounir (author)Downunder35m2015-12-09

I added a video on the last step. let me know if it's not working. :)

Downunder35m (author)ramymounir2015-12-09

I see an image and an attached file but no video in the last step - another bug in the system?

ramymounir (author)Downunder35m2015-12-09

The attached file is an MTS video file.. I havent uploaded it to youtube yet. I can change the format of the video though if you cant run it.

Downunder35m (author)ramymounir2015-12-09

Why would I want to download over 300mb if we can embed videos here, or just upload them to Youtube and other hosting sites?
Not the best way of promotion ;)

ramymounir (author)Downunder35m2016-01-05

Video uploaded :)

ramymounir (author)Downunder35m2015-12-09

Understandable.. I'll let you know when I upload it to youtube and embed it here. Thanks for your input though :)

JaydenLawson (author)2015-12-10

Thanks for the video! The 2-player light mode would be crazy hard :D They have a challenge like this on Survivor, and the people that make it past like 30 minutes of balancing one ball get a second ball added. Try that out ;)

ramymounir (author)JaydenLawson2015-12-10

haha, I cant get past 2 mins but its really fun playing with the joystick.. the 2-player light mode was kind of trying something new, I don't really play it.. Its HARD ! I tried proximity sensors in an effort to make it move with my hand but they're really noisy.

JaydenLawson (author)ramymounir2015-12-10

haha well on Survivor they just use their hands, so it's a lot easier than what you're doing! Check it out - (blocked by CBS for me in Australia) - fast forward to about the 25 - 30 minute mark.

Love what you did though - it's great :D

ramymounir (author)JaydenLawson2015-12-11

oh wow thats neat! i think what i'm gonna do next is a wireless controller like the wii controller and move the accelerometer to it. inspired by your video! Thanks man..

JaydenLawson (author)ramymounir2015-12-11

yeah that'd be awesome - precise movement. Will you need to upgrade your servos for finer movement or will these be ok?

ramymounir (author)JaydenLawson2015-12-12

These are okay, i'll update the instructable and let you know if I ever do it :D really a nice idea though..

JaydenLawson (author)ramymounir2015-12-11

yeah that'd be awesome - precise movement. Will you need to upgrade your servos for finer movement or will these be ok?

ErinyR (author)2015-12-09

Amazing:) Very Smart idea:)

ramymounir (author)ErinyR2015-12-09

Thank you ErinyR :D !!

DIY Hacks and How Tos (author)2015-12-08

Fun game. You should enter this in the Tech Contest:

Thanks, I just did!

About This Instructable




More by ramymounir:Balancing Plate Game - Ramy Mounir - MAKE Course!
Add instructable to: