Arduino PID Balancing of a Ball on Beam + code from youtube by Ali M. Ibrahim
recommended video : Ball on Beam Balancing using Arduino
recommended video : Life on a Balance Beam
To download code and more info:
I used Arduino as a PID controller to balance a small ball on a 4-bar mechanism.
An ultrasonic sensor detects the position of the ball.
A PID code is used to compute the angle of the servo motor based on the position of the ball.
I used Matlab to plot the position of the ball vs time.
- Arduino Uno
- Ping))) ultrasonic sensor
- 20 Kg.cm Digital Servo Motor
- 5 V DC power supply