This project involves a PID controller which gives the signals to the servo motor to change directions and move the slider back and forth so that the ball balances at a certain set point on the scale at all times.
Items needed :
Arduino Uno
Servo Motor
Ultrasonic Distance Sensor
10k Potentiometer and some knowledge of Analog signals and concepts of the Ultrasonic distance finder/sensor.
See the Fritzing circuit diagram in this repo for how these components were connected.
See the video of this in action.
Some of the links that helped me when learning this component.
https://drive.google.com/folderview?id=0Bx4uoJmyE27YdGRMYi16dnUxVk0&usp=sharing
http://mechatronicstutorials.blogspot.in/2014/07/balancing-of-ball-on-beam-using-arduino.html
http://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/
http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/