top of page

Ball and Plate

Doing Balance the Right Way

~ Caleb Paton

Get in Touch
IMG_20190320_101215.jpg
Home: Welcome
IMG_20190320_094325.jpg

About

What is Ball and Plate?

Ball and plate is my senior project that incorporates building a robot to balance a ball on a surface without "dropping the ball."

Home: About

Background Information

This project has been achieved by others and usually have a predetermined path that the ball will follow, like for example a figure 8 or rectangle, and may use a joystick to interact with their system.

My Problem

To differentiate my project from others I will implement the use of having the user draw an input path that they would like to see the ball follow.

My Solution

Adding a display which shows the user the path that they draw will make mine stand out from the rest of the projects that are similar. Like using a drawing app on your smartphone and drawing with your finger, you can then look at the screen and see what you drew.

Home: FAQ

The Goal

Project done by Youtuber "rracnala"

A project that is similar to what I am trying to achieve and hope to accomplish.

Home: About

Importance

Some background information

Ball and plate incorporates and shows the importance of a control system. There is a micro-controller that gives commands to the motors and picks up the location of the ball from a sensor. This project demonstrates the use of Math, from basic arithmetic to algebra to calculus, Physics, electrical and electronic theories, micro-computer technologies, sensors and instrumentation's, and control systems.

PIDforDummies_pid_controller2.png

Control System

  • A control system may be a device which manages or regulates the behavior of other devices to achieve desired results.

  • Two main types of controls: open loop and closed loop. Above is closed loop, also referred to as having feedback.

PIDforDummies_pid_simplified.png

PID Controller

Above is an example of a block diagram of a PID controller

​

PID controllers are very common among systems looking for accurate results for many different process variables.​

​

  • Error seen above is the actual location, for example, subtracted from the desired location. This could be a set point of temperature or numerous other variables.

  • The error then is multiplied by gains and added together to correct for the error that was present.

  • P is proportional gain that is a tuned factor that results in a better output.

  • I is integral gain that tells the cumulative error over time.

  • D is derivative gain that tells the rate of change at which the error is occurring.

Home: Products

Diving Into My System

System diagram below

Home: Text

​How It Works

  1. Upon turning on the system the user will be prompted with instructions on the screen.

  2. After being prompted the user can then draw a path they wish the ball to follow and press start to move on to the next step or press reset to reset the screen and draw a new path.

  3. Once a desired path is drawn and the user presses start, the system then waits for the ball to be placed upon the display.

  4. The rest here is automatic. The system will display the path the ball followed in a different color as the path that was drawn.

Home: Text

Following The Diagram

  1. The display is what projects an image and text to the user, which comes from the code that I've written to the arduino.

  2. The arduino then powers the display driver which relays that info and powers the TFT Display. The user sees the prompt and follows instructions.

  3. Drawing a path upon the touchscreen, which is the sensor here, is picked up by the display controller and that info is relayed back to the arduino.

  4. Once the user has followed the instructions and places the ball upon the screen, the sensor picks up the location of the ball. The arduino then controls the two servos about the x and y axis to move the ball to follow the path that was drawn.

Home: Text
sys_dia.JPG
Home: Image

My System Continued..

The controller used in my system is a PD controller

Control block diagram below created with Simulink

Home: Text

About The Diagram

The diagram below represents my system and the output based on one of the servo motors. In this case (diagram below) this is the ​model for the X-Plane servo. The servo that moves the "plate" up or down in the x direction, which is arbitrarily assigned, but based on logical convention.


Starting with f(u) block and on to x_Ks triangle, this section models the behavior of the system due to physics and characteristics of the sensor and servo motor.

​

Coming down and back the other way we have two blocks (looking like staircase blocks) that models how the microcontroller handles this information.

​

The rest is all to do with the code written to the microcontroller. We can see labeled below the derivative part (bottom row) as well as the proportional part (top row).

​

X_Ref_count happens to be the coordinates stored in memory from when the user drew the path. Which will be compared to the X_count (current position of ball) and the error signal is determined by use of the circular block that the X_Ref_count goes into.

Home: Text
Simulink_model.PNG
Home: Image
Home: Services
matlab_script.PNG

Matlab script

Variables created here plugin into the simulink model above and make changing variables easy.

Components

Components used in my system and 3D parts below

Home: Services

Arduino Uno Microcontroller

arduino uno.jpg

3D Parts

Home: Services

Front Bezel

This piece is placed down upon the display once it is in the housing and covers the display at the edges, like most TV's.

cover_bezel.JPG
budget from slides.JPG
Home: Image

Links

Tech Topic Presentation

Final Presentation

Ghant Chart

Home: List

Get in Touch

Randolph Center, Randolph, VT 05061, USA

802-917-1005

maze.jpg
Home: Contact
bottom of page