Project tutorial
Ball and Beam

Ball and Beam © GPL3+

The ball and beam system is laboratory equipment with high nonlinearity in its dynamics and PID control.

  • 2,502 views
  • 0 comments
  • 5 respects

Components and supplies

Necessary tools and machines

Apps and online services

About this project

Video

simple realisation

Introduction

This was a school project. The assignment was to construct a ball and beam control system.

A ping pong ball sits on top of the beam rolling forwards and backwards according to the pitch of the beam. The pitch is controlled by a servo that is connected to an Arduino. The position of the ball is measured by a distance sensor mounted at the end of the beam.

An PID controller is used to control the position of the ball on the beam.

Physical Setup

A ball is placed on a beam, see figure below, where it is allowed to roll with 1 degree of freedom along the length of the beam. A lever arm is attached to the beam at one end and a servo gear at the other. As the servo gear turns by an angle theta, the lever changes the angle of the beam by alpha.

When the angle is changed from the horizontal position, gravity causes the ball to roll along the beam. A controller will be designed for this system so that the ball's position can be manipulated.

So the transfer function becomes as shown in equation:

Mechanical Part

A simple card box can do the job.

  • Base support (40 cm x 20 cm)
  • 2 x Support (20 cm)
  • 2 x Beam (34 cm)
  • Servo motor horn (5 cm)
  • Lever horn (10 cm)
  • Ping pong ball

This is what it looks like:

Electrical Part

You will need:

  • Arduino (Nano)
  • Servo motor
  • Sharp sensor
  • Cables and jumper
  • Breadboard

The wiring should be the following:

LabVIEW Part

First of all, you should know how to establish correct communication between Arduino and Linux. If not, check this link.

So a basic dashboard for the control system should look like this:

You should adjust the control parameters with the correct values.

If you want to no more how to determine these coefficients, navigate to this link.

Code

LINX - BallAndBeam_v8.viLESS
No preview (download only).

Custom parts and enclosures

parts
Img 20190410 165325 mxzupyhsyf
assemby
Img 20190410 170818 efda76esaj
showcase 1
Img 20190410 180314 xpeblb3ijh
showcase 2
Img 20190410 182131 07vwxbnwfu
showcase 3
Img 20190415 153526 ppdnclog0q

Schematics

Communication
3 flex9s7od5
Why Sharp Sensor
Capture k6ar0lolwc

Comments

Similar projects you might like

Ball and Beam

Project tutorial by 3 developers

  • 1,242 views
  • 1 comment
  • 2 respects

Bright Ball IoT

Project tutorial by Tittiamo

  • 1,956 views
  • 2 comments
  • 5 respects

Arduino Marble Maze Labyrinth

Project tutorial by AhmedAzouz

  • 11,786 views
  • 24 comments
  • 44 respects

Magnetically Levitated Ball with MATLAB and Arduino

Project tutorial by Team MATLAB Makers

  • 10,686 views
  • 4 comments
  • 16 respects

Laser Beam Alarm

Project in progress by mmgamitoc and Vrcg03

  • 6,877 views
  • 6 comments
  • 17 respects

RTC Bird Feeder

Project tutorial by Kutluhan Aktar

  • 3,039 views
  • 4 comments
  • 10 respects
Add projectSign up / Login