Ball Balance
Experimental setup for control engineering lab
Teaching model for control engineering
The ball balance is a fascinating teaching model that vividly 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 goal is to control the tilt of the seesaw via a propeller drive so precisely that a metal ball remains stably balanced in the center.
Ball balance as a teaching model for control engineering - THWS Schweinfurt - Engineer Glaser
🎱 The ball balance is a fascinating teaching model that vividly 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 goal is to control the tilt of the seesaw via a propeller drive so precisely that a metal ball remains 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 – Ingenieurbüro 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 ignited?
https://ingenieur-glaser.de/Kontakt/ – Contact
#controlengineering #THWS #electricalengineering #prototyping #hardwaredevelopment #microelectronics #engineer #Matlab #Simulink #ATMEGA32 #Cplusplus #Cnc #teachingmodel
A challenging control plant
At the center of the control plant is a propeller drive connected to a rotatably mounted V-profile. A ball can roll freely on this. A servo motor changes the pitch angle of the rotor blades to generate targeted thrust to the left or right and thus change the tilt of the seesaw.

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 slightest tilt changes set the ball in motion. The ball’s own weight acts as a disturbance just as much as varying propeller speed and airflow turbulence. These factors significantly increase the complexity of achieving stable control.

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


Angle determination via an accelerometer


Thrust reversal thanks to pitch-adjustable rotor blades


Signal and control interface with ATMEGA32 microcontroller

Control with function block editor in VB.NET
A function block editor developed specifically for this setup is available for creating a controller. The editor, programmed 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 course during runtime. Changes take effect immediately without requiring recompilation as, for example, with MATLAB Simulink.

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



Manual control to illustrate the complexity
For better understanding of the complexity, the setup can optionally be manually controlled with a joystick. This quickly demonstrates how challenging or nearly impossible it is to keep the ball balanced without a sophisticated controller.


Manufacture of 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.











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.


fine-motor soldering work on the BMA280 accelerometer


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

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!
Ball Scale Challenge: Award for outstanding performance
The person who accepts the challenge and succeeds in developing a controller that stabilizes the ball precisely at the specified position will be awarded a certificate and a prize by Engineer Glaser. 🙂


THANK YOU!
Sincere thanks to Prof. Dr. Ali for the solid teaching of valuable control engineering tools during my studies. The practical 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 contributed significantly to my understanding of complex technical systems.