Ball-on-Plate Demonstrator
A motorized two-axis plate balances a real ball on a screen. A camera tracks the ball's position, and the ball interacts with arcade-style games for a playful visualization of control theory.
- Now
- Bachelor's thesis: Major hardware redesign, since September 2026. Solo, with supervisor guidance
- Before
- Semester project: Controllers and demos, fall 2025. Team of 6
- Context
- Automatic Control Lab, D-ITET, ETH Zürich
What I do – Bachelor's Thesis
I am doing a major redesign of the old system. Key changes include:
- New screen format: 3:2 instead of 16:18
- New, improved mechanics:
- Belt instead of gear for the torque-heavy axis
- Stronger gear system for the other axis (less wear force on mounting parts)
- Software adapted and improved for the new format
1
1
2
2
3
3
4
5
5
1
2
Key decisions
Mechanics
The old system seemed a little slow to respond. The outer loop controllers became unstable at quite low gains already, because the plate couldn't track the reference angles fast enough. I wanted to fix that, so I ran a few tests to find the issue.
First was a ramp test: I was curious whether IMU and encoder data coincide.
On the x-axis, IMU and encoder coincide, but on the y-axis they do not. The strong deviation, especially at extreme angles, indicates gear slip or bending of mounting parts: the motor thinks it has reached the desired angle, while in reality it has not. We could have used the IMU data as feedback for the inner loop, or combined encoder and IMU data in a Kalman filter, but I wanted to fix the root cause of the problem: the mechanics.
Y-Axis: Belt
The most effective way to reduce torque was to use a belt architecture. My implementation yields an average gear ratio of roughly 30:1, and since the belt pulls the plate far away from the center of rotation, the torque on all parts is significantly reduced.
However, a belt also introduces new challenges:
Dealing with nonlinearity
The distance the belt travels is only approximately linear in the angle of the plate (first-order Taylor approximation of the sine). This brings two issues:
- Measuring the angle from encoder values has to account for the nonlinearity at higher tilt angles.
- Belt common-mode movement (e.g. excessive stretching due to an asymmetrical shift in the angle of attack on either side) has to be minimized.
Minimizing common-mode movement
Deriving the optimal placement of the outer rollers analytically turned out to be very difficult, so I used a simulation of the geometry to find the optimum by hand. The structure of the belt channel constrained the horizontal placement of the outer rollers, so there was only one parameter to tweak. The optimized placement yields a common-mode movement of less than 0.4 mm over all possible tilt angles, a significant improvement over the 5 mm of my first, naive placement.
X-Axis: Gear
Since the x-axis has much less inertia (shorter side of the screen, and only the inner frame has to move), a gear system is sufficient. However, the old gear mechanism was not optimal either. This is what the IMU vs. encoder test revealed:
So the angle is measured correctly, but the plate is too slow to follow. Retuning the inner-loop PID did not help: every attempt to improve the reference tracking made it unstable. My hypothesis is that the root cause is again the mechanics: the gear ratio is too low, so the motor cannot accelerate the plate fast enough. The rebuilt hardware will test this.
I decided to raise the gear ratio by increasing the size of the big gear by roughly 60%. This changed the ratio outside the gearbox from 2:1 to 3.3:1. It also allowed me to mount the outer gear further away from the center of rotation, reducing wear on the screws.
New screen
The old system had a 16:18 screen, which looks nice, but near-square screens are very rare and expensive. I saw an opportunity to use a more common format. 16:9 would sacrifice too much precious space, so I chose 3:2.
This new format is ideal for 1D control games like Flappy Ball, and still allows for 2D games like Racing Track. I then modeled the new panel in CAD to adapt the whole system accordingly.
What's next
CAD is finished, and structural assembly and wiring are under way. Next up is setting up the Raspberry Pi and its GPIO channels. After that: tuning the inner loop, adapting the software and (possibly, as a stretch goal) a new camera system mounted on the plate frame.
Controllers, Games and Demos – Semester Project 2025
This was a team project of 6. I only show my own part here: the PID and LQR controllers, live tuning and the 3 games.
- PID and LQR for the outer control loop.
- Live-tuning: Both controllers are modifiable while the games run, so that users can see the effect of each parameter interactively.
- Three games: a generated racing track, a Flappy Ball PID visualizer, rectangle tracking.
Racing Track
Racing Track is the best example to show students the art of control: it is incredibly difficult to stay on the track and score laps while steering the plate manually. However, as you could see, the automatic controller manages very well! You can see the PID in action in simulation.
An implementation I'm particularly proud of is the random track generation: Racing Track is a class consisting of 4 corner elements placed randomly on the map. After the corner elements are generated, connecting elements made of tanh functions are added.
Flappy Ball
The most counterintuitive part of PID is integral control. My supervisors had the idea of showcasing it in a 1D control situation, color-marking the area between the actual and the reference trajectory. I implemented this visualization in the Flappy Ball game.