The purpose of this research is to construct and investigate the stability of the ball and beam control system with PID coefficients derived from the simulation and compare them. In this research, by first obtaining the mathematical model of the mechanical system and its simulation, the best PID coefficients are selected for it to minimize the settling time and the error. Then, to create this system, the types of mechanisms provided for the ball and beam control system are examined. Depending on the equipment and facilities available, the best design is chosen and built. The best design is the use of the four_bar mechanism using the servo motor and the ultrasonic sensor. The appropriate design is first developed in SolidWorks software to provide accurate measurements for the production of components. Laser cutting and 3D printers are used to produce system components. After the control system is built, the simulation coefficients in the MATLAB software are inserted into the system microcontroller program to check the system responses to the various control coefficients obtained. So doing multiple experiments indicated that the best PID coefficients for this system are PD coefficient. The difference between the experimental graph and the simulation graph is their overshoot. They also have different settling times. One of the reasons for this difference is the use of some approximations as well as disregarding friction.