{user_name}
Project ball balance control engineering

Ball balance
Experimental setup for control engineering lab

Project Ball Balance PIDT1 Controller Icon

Teaching model for control engineering

The ball balance is a fascinating teaching model that clearly demonstrates the principles of control engineering. With a function block editor developed specifically for this purpose, students can independently design and optimize control loops. The aim is to control the tilt of the seesaw via a propeller drive so precisely that a metal ball is stably balanced in the center.

Show video info

Ball balance as a teaching model for control engineering - THWS Schweinfurt - Engineer Glaser

🎱 The ball balance is a fascinating teaching model that clearly demonstrates the principles of control engineering. With a function block editor developed specifically for this purpose, students can independently design and optimize control loops. The aim is to control the tilt of the seesaw via a propeller drive so precisely that a metal ball is stably balanced in the center.
https://ingenieur-glaser.de/kugelwaage/ – Behind the scenes

#ControlEngineering #THWS #ElectricalEngineering #Prototyping #HardwareDevelopment #Microelectronics #Engineer #Matlab #Simulink #ATMEGA32 #Cplusplus #Cnc

💡️ Development & Manufacturing – Engineering firm Glaser
https://ingenieur-glaser.de/ – Electronics・Software・Hardware

🔔 Subscribe now! – Don't miss any development!
https://ingenieur-glaser.de/Instagram/ – Instagram
https://ingenieur-glaser.de/Facebook/ – Facebook
https://ingenieur-glaser.de/YouTube/ – YouTube
https://ingenieur-glaser.de/LinkedIn/ – LinkedIn
https://ingenieur-glaser.de/Twitter/ – Twitter
https://ingenieur-glaser.de/TikTok/ – TikTok
https://ingenieur-glaser.de/Xing/ – Xing

🥇 References – How visions became successes.
https://ingenieur-glaser.de/Projekte/ – References

📞 Contact – Has the spark been lit?
https://ingenieur-glaser.de/Kontakt/ – Contact

#ControlEngineering #THWS #ElectricalEngineering #Prototyping #HardwareDevelopment #Microelectronics #Engineer #Matlab #Simulink #ATMEGA32 #Cplusplus #Cnc #TeachingModel

To the YouTube channel

A challenging control process

At the center of the control process is a propeller drive connected to a pivot-mounted V-profile. A ball can roll freely on this. A servo motor changes the blade pitch to generate targeted thrust to the left or right and thus change the tilt of the seesaw.

Project Ball Balance control engineering isolated

The challenge is to develop a control loop that controls the highly dynamic and unstable system so that the rolling ball comes to rest in the middle of the V-profile. Even the smallest changes in tilt set the ball in motion. The ball's own weight acts as a disturbance as do varying propeller speeds and airflow turbulence. These factors significantly increase the complexity of stable control.

Project Ball Balance control engineering mechanics and microcontroller

For control, the ball position and the tilt angle of the seesaw are available as measured variables. As the only actuator, a pitch-adjustable propeller must suffice to keep the ball in balance.

Unobtrusive sensor with impressive precision

The ball position is measured using two carbon fiber rods in the transparent acrylic. One of the rods is connected to GND and 5V, creating a linearly falling voltage. The metal ball acts quasi as a sliding contact by transferring this position-dependent voltage to the second rod. This allows the ball position to be determined with millimeter accuracy.

Project Ball Balance V-profile ball acrylic carbon fiber rod voltage dividerProject Ball Balance acrylic carbon fiber rod voltage divider connection

Angle determination via an accelerometer

The tilt angle of the seesaw is measured with an accelerometer mounted on the pivot-mounted axis. The sensor uses the constant gravity vector as a reference to precisely determine the tilt angle of the seesaw.
Project Ball Balance BMA280 accelerometer LGA-14 package mountedProject Ball Balance BMA280 accelerometer LGA-14 package

Thrust reversal thanks to pitch-adjustable rotor blades

A model hobby servo changes the pitch angle of the rotor blades, so the propeller produces thrust in both directions without having to reverse rotation. This rapid thrust reversal is crucial to stabilize the complex system.
Ball and Beam Project Servo Propeller Drive Adjustable Propeller Pitch ControlBall and Beam Project Motor Propeller Drive Adjustable Propeller Pitch Control

Signal and control interface with ATMEGA32 microcontroller

A C++ programmed microcontroller collects the sensor data and controls the propeller's motor controller as well as the servo for blade pitch adjustment. Communication with the notebook running the control loop is done via the serial RS232 interface.

Ball and Beam Project PCB ATMEGA32 isolated

Control design with function block editor in VB.NET

For creating a controller, a function block editor specifically developed for this setup is available. The editor, written in VB.NET, includes all common control elements such as PIDT1 controllers and can be flexibly extended with user-defined function blocks. A special feature is the ability to edit the entire signal flow during runtime. Changes take effect immediately without requiring recompilation as is the case with e.g. MATLAB Simulink.

Ball and Beam Project Function Block Editor Software Screenshot

Controller design for a nonlinear, highly dynamic system

The ball and beam represents a complex, nonlinear control system. The developed control loop comprises a total of four cascades with five PIDT1 controllers, which act on the state variables of velocity and position of both the ball and the beam. Each cascade stage is finely tuned to reliably keep the ball centered despite the unstable conditions.

Ball and Beam Project Control Loop Regulation PIDT1 Controller Signal Diagram

The inertia dynamics of the propeller drive were reproduced using a model simulation and integrated into the control loop as feedforward. To create the motor characteristic, the thrust or the torque acting on the beam was measured with a kitchen scale.

Ball and Beam Project Torque Characteristic Thrust Propeller Pitch Control Drive

The dynamics of the propeller's rpm collapse under load were determined by recording the motor noise with a notebook microphone and analyzing the pitch or frequency.

Ball and Beam Project Motor Noise Audio Recording Frequency

Manual control to illustrate the complexity

For a better understanding of the complexity, the experimental setup can optionally be controlled manually via a joystick. This quickly makes clear how demanding or nearly impossible it is to keep the ball balanced without an elaborate controller.

Ball and Beam Project Joystick Manual ControlBall and Beam Project Power Connection Main Switch Emergency Stop

Manufacture of the wood, acrylic, and aluminum parts by CNC milling

All mechanical components were designed in AutoCAD and manufactured on a CNC milling machine. This enabled high precision fit and reliability in implementation.

Ball and Beam Project Design AutoCAD Drawing CADBall and Beam Project CNC Milling Acrylic
Ball and Beam Project CNC Milling WoodProject Ball Scale CNC Milling Aluminum
Project Ball Scale CNC Milling Milled Parts WoodProject Ball Scale CNC Milling Milled Parts Aluminum
Project Ball Scale CNC Milling Wood ConstructionProject Ball Scale Aluminum Construction Acrylic Carbon Fiber Rod Voltage Divider
Project Ball Scale CNC Milling Wood ConstructionProject Ball Scale Aluminum Construction Acrylic Carbon Fiber Rod Voltage DividerProject Ball Scale Aluminum Construction Acrylic Carbon Fiber Rod Voltage Divider

Development Environments for Software Development

For programming the function block editor in VB.NET, Visual Studio was used, while for the microcontroller programming in C++ the ATMEL AVR Studio was used. Additionally, HTerm was used to monitor the serial communication between the microcontroller and the PC during development.

Software Development Development Environments AVR Studio C++ and Visual Studio VB.NETProject Ball Scale HTerm RS232 Serial Interface Screenshot

Fine motor soldering work on the BMA280 accelerometer

Soldering the BMA280 accelerometer was a particular challenge. The LGA-14 package with a pin pitch of 0.5 mm appears tiny even on a 1-cent coin. Despite having a soldering tip that was far too large, patience to wait for the delivery of a suitable one was practically non-existent. ;)
Project Ball Scale AccelerometerProject Ball Scale BMA280 Accelerometer LGA-14 Package Soldered

Handover of the experimental setup to THWS

The THWS (University of Applied Sciences Würzburg-Schweinfurt) has taken over the “Ball Scale” experimental setup for its control engineering laboratory. Prof. Dr. Abid Ali, who leads the lab, expressed his heartfelt thanks for the extraordinary commitment.

Donation THWS Technical University of Würzburg-Schweinfurt Control Engineering Lab Johannes Glaser and Prof Dr Ali

Pioneering spirit from student days strengthens control engineering lab

THWS thanks Johannes Glaser for the “ball scale,” a teaching model that enables students to learn control engineering in a hands-on way. ➔ Learn more now!

View
Quote THWS Control Engineering Lab Prof Dr Ali Logo

Pioneering spirit from student days strengthens control engineering lab

On behalf of the Technical University of Würzburg-Schweinfurt (THWS), Prof. Dr. Abid Ali warmly thanks Mr. Johannes Glaser for donating the experimental setup “ball scale” to the Control Engineering Lab.

More than ten years ago, then-electrical engineering student of the Faculty of Electrical Engineering showed extraordinary commitment. Instead of limiting himself to controlling an existing setup as required, he independently developed and built an entirely new control system. Together with his fellow student Daniel Neeser, a demanding setup was created - the “ball scale.” This teaching model now enables our students to learn the theoretical fundamentals of control engineering in a practical way. The aim of the experiment is to design a stable control loop that uses a propeller drive to regulate a metal ball into the center of a seesaw.

We are delighted with this valuable addition to our control engineering lab and appreciate Mr. Glaser’s contribution to the practical training of our students. We wish him every success and all the best for the future as an independent engineer. His commitment is a shining example of the connection between theory and practice that we especially promote at our university.

To the Control Engineering Lab - THWS

Ball Scale Challenge: Award for Outstanding Performance

The person who takes on the challenge and succeeds in developing a controller that stabilizes the ball precisely in the specified position will be awarded a certificate and a prize by Engineer Glaser. :)

Project Ball Scale THWS Control Engineering Lab Function Block EditorProject Ball Scale THWS Control Engineering Lab

THANK YOU!

Many thanks to Prof. Dr. Ali for the solid teaching of valuable control engineering tools during my studies. The practice-oriented and in-depth exercises complementing the lectures provided me with a solid foundation that still plays a central role in my engineering work today and has significantly contributed to my understanding of complex technical systems.

★★★★★

9 Reviews

View more projects

Project Trade Show Exhibit Hygienic Seal Demonstrator Design

Trade show exhibit for hygienic seal with water - exhibition construction

Noble trade show exhibit made from an acrylic column filled with water that uses granules and UV light to make the benefits of a hygienic seal visible.

View project
Project Radar Demonstrator LED Effect Sunset Night Sky Shooting Stars

Functional model for safety sensor with LED strips - exhibition construction

Interactive demonstration model to showcase the advantages of a dual radar measurement path for safe and reliable distance measurement.

View project
Project Radar Demonstrator - All modules tailored from radar to reflector

Trade show model for radar sensor with display - exhibition construction

Modular trade show model of a robust measurement path that precisely measures distances through water, dust, and plastic with a radar sensor and displays them on a screen.

View project
Project Sensor Box IMU Product Photo Box

Sensor box IMU with AHRS

Spaceflight technology in a box. A measurement unit that assists in decontaminating radioactively contaminated plant components.

View project
Software Development Code-perspective-blue-Free-Pic

Examples from software development

Control software for plant controls in the field of automation technology. Using Visual Studio in C# and VB.NET.

View project
Project-warehouse-robot-Mule-electronics-cable-duct-open

Warehouse robot Mule

The Heavy Mule is a very robust and smart warehouse robot that navigates using an inductive guidance system and RFID tags.

View project
Project-Compact-Winding-Drive-6-Control-Cabinets-open

Compact winding drive

Smart winding motor with speed and torque control, synchronous drive and multifunction footswitch.

Coming soon
Project-Scale-Packaging-System-with-Safety-Fence

Palletizing robot

Robot that measures pallet boxes with variable dimensions and loads them precisely. With digital twin and 3D visualization.

Coming soon
Project-Winding-Machine-3D-Model-Linear-Guide-Brake-Motor-landscape

Winding machine

Adaptive winding robot that wraps arbitrary rotational bodies with fabric tape while applying a uniform contact pressure.

Coming soon
Project-Function-Block-Editor-Screenshot

Function block editor

Real-time function block editor that allows control loops to be created graphically and edited during operation.

Coming soon