This is my homemade Ball & Plate system.
System consist of 2 digital servo motors (Hitec HS-7955TG Ultra Torque), microcontroller Arduino MEGA 2560, and 4 wire resistive touchscreen (7"). There is Linear-Quadratic (LQ) regulator with Kalman filter working as Linear-quadratic estimator (LQE). This system can move any ( heavier ) round element to any point of the surface to an accuracy of ± 1 mm .
There are some photos taken before the experiment




🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)
The Ball and Plate system is a classic control theory problem, similar to a self-balancing robot but on two axes instead of one. It demands sub-millimeter precision and aggressive mathematical tuning.
The PID Algorithm
- The Error: The center of the plate is
[X:0, Y:0]. The camera (or resistive touch panel) detects that the ball is at[X:15, Y:-10]. That difference is the "Error". - Proportional: Make an immediate correction based on how big the error is.
- Integral: If the ball isn't moving fast enough to the center, slowly ramp up the correction.
- Derivative: As the ball gets close to the center, apply the brakes (reverse correction) so it doesn't shoot past the center and roll off the other side!
Essential Hardware
- Arduino Mega/Uno: Requires intense mathematical calculations.
- Resistive Touch Panel (4-wire): Pulled from an old tablet, this acts as the "Plate." When the steel ball rolls on it, it instantly outputs its exact X/Y coordinates.
- High-Speed Servos (x2): Placed underneath the plate on a universal joint. One controls the X-axis tilt, the other controls the Y-axis tilt.
Mastering this project means you have mastered PID, making you capable of programming stabilizing gimbals or hovering quadcopters.