Fault diagnosis has been a field of interest in the latest period, especially predictive maintenance, given the advances in artificial intelligence and state of the art machine learning algorithms available in a great number of libraries. In the industrial sector, fault diagnosis plays a very important role in order to avoid as much as possible downtime. Usually, rotating motors are involved in the actuation of the machines used in industry; therefore bearings are an important part of the kinematic chain. Given that faults in bearings can be detected in the frequency spectrum at frequencies that can be mathematically computed based on geometry, this paper proposes an approach to extract features for machine learning algorithms based on the computed frequencies and their harmonics. Since only a few frequencies are needed, the Goertzel algorithm can be used instead of the discrete Fourier transform to give a computational boost and have the feature extraction algorithm available on embedded systems.