Arduino PID Balancing of a Ball on Beam + code

Опубликовано: 01 Октябрь 2024
на канале: AI S
149,240
981

To download code and more info:
http://mechatronicstutorials.blogspot...


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.

Parts used:
- Arduino Uno
- Ping))) ultrasonic sensor
- 20 Kg.cm Digital Servo Motor
- 5 V DC power supply