This project is constructed using the HC-SR04 Ultrasonic Sensor to detect the position of the sphere and using the PID principle to control the Servo motor to move the object to the specified position.
The control objective is to control the torque applied at the pivot of the beam, such that the ball can roll on the beam and track a desired trajectory. The torque causes thus a change of the beam angle and a movement in the position of the ball.
ESP32 code is placed on my blog :
https://www-winson.blogspot.com/2023/...
#esp32 #ultrasonicsensor #ballandbeam #servomotors