A turbomachine having a longitudinal axis, the turbomachine comprising an
annular rotor centered on the longitudinal axis of the turbomachine, an
annular stator disposed coaxially around the rotor, at least one ball
bearing disposed on the rotor and rotatably supporting said stator, the
inside of the rotor defining part of an oil enclosure for cooling and
lubricating the balls of the bearing, an electricity generator having a
secondary magnetic circuit secured to the stator and a primary magnetic
circuit constrained to rotate with the rotor, and a detector device for
automatically detecting ferromagnetic particles in the oil enclosure,
said detector device being powered electrically by electromagnetic
induction.