Abstract The use of experimental activities in physics classes mediated by technological tools allows students to become central and active agents in the learning process, and that presents flexibility of use, low cost, and, at the same time, good precision of physical measurements of fundamental importance in the context of modern education. To contemplate these aspects, we propose a study of a physical pendulum composed of a metal bar and a cylinder that is free to move along the bar and modify the period of oscillation. The experimental apparatus was developed using appropriate supports made in a 3D printer so that the sensor could accurately collect the angular movement of the pendulums. Measurements of pendulu’s period with the change of cylinder position are carried out using a rotary optical encoder, a sensor that can be connected to the Arduino platform to measure the angular displacement. The experiment proposed paves the way for investigations of more advanced systems and improvements in data collection modes.