{user_name}
project ball scale control engineering

Ball Balance
Experimental setup for control engineering lab

Ball Balance PIDT1 Controller Project Icon

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.

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 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

To the YouTube channel

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.

ball balance project 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 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.

ball balance project 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’s 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 almost like a wiper contact by transferring this position-dependent voltage to the second rod. This allows the ball position to be determined with millimeter precision.

ball balance project v-profile ball acrylic carbonfiberrod voltage dividerball balance project acrylic carbonfiberrod voltage divider connection

Angle determination via an accelerometer

The tilt angle of the seesaw is measured with an accelerometer mounted on the rotatable axis. The sensor uses the constant gravity vector as a reference to precisely determine the tilt angle of the seesaw.
ball balance project bma280 accelerometer lga 14 housing mountedball balance project bma280 accelerometer lga 14 housing

Thrust reversal thanks to pitch-adjustable rotor blades

A hobby servo changes the pitch angle of the rotor blades, so the propeller can produce thrust in both directions without having to change the rotation direction. This rapid thrust reversal is crucial to stabilizing the complex system.
ball balance project servo propeller drive adjustable propeller pitch adjustmentball balance project motor propeller drive adjustable propeller pitch adjustment

Signal and control interface with ATMEGA32 microcontroller 

A C++ programmed microcontroller reads the sensor data and controls the propeller’s drive controller as well as the servo for blade pitch adjustment. Communication with the notebook running the controller is via the serial RS232 interface.

ball balance project pcb atmega32 isolated

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.

Ball Balance project function block editor software screenshot

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.

ball balance project control loop control pidt1 controllers 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 curve, the thrust or the torque acting on the seesaw was measured with a kitchen scale.

ball balance project torque characteristic thrust propeller pitch adjustment drive

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

ball balance project motornoise audio recording frequency

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.

ball balance project joystick manual controlball balance project power connection mains switch emergency stop

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.

project ball scale construction autocad drawing cadproject ball scale cnc milling acrylic glass
project ball scale 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 wooden constructionproject ball scale aluminum construction acrylic glass carbon fiber rod voltage divider
project ball scale cnc milling wooden constructionproject ball scale aluminum construction acrylic glass carbon fiber rod voltage dividerproject ball scale aluminum construction acrylic glass 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.NET_project 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 0.5 mm pin pitch looks tiny even on a 1-cent coin. Despite having a soldering tip that was far too large, patience to wait for a suitable one to arrive was virtually nonexistent. 😉
IMG_6004 3project ball scale bma280 accelerometer lga 14 package soldered

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.

donation thws würzburg schweinfurt university of applied sciences 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 Würzburg-Schweinfurt University of Applied Sciences (THWS), Prof. Dr. Abid Ali sincerely thanks Mr. Johannes Glaser for donating the “Ball Scale” experimental setup to the Control Engineering Lab.

More than ten years ago the then electrical engineering student of the Faculty of Electrical Engineering showed extraordinary commitment. Instead of restricting himself to controlling an existing experimental setup as required, he independently developed and built a completely new control plant. Together with his fellow student Daniel Neeser, they created a demanding setup — the “Ball Scale”. This teaching model now enables our students to learn the theoretical basics 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 to 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 education 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 particularly promote at our university.

To the Control Engineering Lab - THWS

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. 🙂

project ball scale thws control engineering lab function block editorproject ball scale thws control engineering lab

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.

★★★★★

Rate now!

View more projects

project trade fair exhibit hygienic seal demonstrator design

Trade fair exhibit for hygienic seal with water - exhibition construction

Noble trade fair exhibit made from an acrylic glass column filled with water that makes the advantages of a hygienic seal visible using granulate and UV light.

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 illustrate the advantages of a redundantly implemented radar measurement path for safe and reliable distance measurement.

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

Trade fair model for radar sensor with display - exhibition construction

Modular trade fair 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 parts.

View project
Software development Code perspective blue Free Pic

Examples from software development

Control software for plant controllers from 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 cabinet open

Compact winding drive

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

Coming soon
Project scale model 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 format

Winding machine

Adaptive winding robot that wraps arbitrary rotational bodies with fabric tape while producing an even pressing force.

Coming soon
Project function block editor screenshot

Function block editor

Real-time function block editor with which control loops can be created graphically and edited during operation.

Coming soon